summaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_xattr.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-03-30 14:02:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 12:16:38 -0700
commit48b32a3553a54740d236b79a90f20147a25875e3 (patch)
treefaf6807facb5825608469a9e33c9127f90b974df /include/linux/reiserfs_xattr.h
parent8ecbe550a142fe604874afa477ea68986f89b86c (diff)
downloadop-kernel-dev-48b32a3553a54740d236b79a90f20147a25875e3.zip
op-kernel-dev-48b32a3553a54740d236b79a90f20147a25875e3.tar.gz
reiserfs: use generic xattr handlers
Christoph Hellwig had asked me quite some time ago to port the reiserfs xattrs to the generic xattr interface. This patch replaces the reiserfs-specific xattr handling code with the generic struct xattr_handler. However, since reiserfs doesn't split the prefix and name when accessing xattrs, it can't leverage generic_{set,get,list,remove}xattr without needlessly reconstructing the name on the back end. Update 7/26/07: Added missing dput() to deletion path. Update 8/30/07: Added missing mark_inode_dirty when i_mode is used to represent an ACL and no previous ACL existed. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/reiserfs_xattr.h')
-rw-r--r--include/linux/reiserfs_xattr.h25
1 files changed, 6 insertions, 19 deletions
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 3bd154f..958fcac 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -29,20 +29,6 @@ struct iattr;
struct super_block;
struct nameidata;
-struct reiserfs_xattr_handler {
- char *prefix;
- int (*init) (void);
- void (*exit) (void);
- int (*get) (struct inode * inode, const char *name, void *buffer,
- size_t size);
- int (*set) (struct inode * inode, const char *name, const void *buffer,
- size_t size, int flags);
- int (*del) (struct inode * inode, const char *name);
- int (*list) (struct inode * inode, const char *name, int namelen,
- char *out);
- struct list_head handlers;
-};
-
int reiserfs_xattr_register_handlers(void) __init;
void reiserfs_xattr_unregister_handlers(void);
int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
@@ -59,13 +45,14 @@ ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
int reiserfs_removexattr(struct dentry *dentry, const char *name);
int reiserfs_permission(struct inode *inode, int mask);
-int reiserfs_xattr_del(struct inode *, const char *);
-int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t);
+int reiserfs_xattr_get(struct inode *, const char *, void *, size_t);
+int __reiserfs_xattr_set(struct inode *, const char *, const void *,
+ size_t, int);
int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
-extern struct reiserfs_xattr_handler user_handler;
-extern struct reiserfs_xattr_handler trusted_handler;
-extern struct reiserfs_xattr_handler security_handler;
+extern struct xattr_handler reiserfs_xattr_user_handler;
+extern struct xattr_handler reiserfs_xattr_trusted_handler;
+extern struct xattr_handler reiserfs_xattr_security_handler;
static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
{
OpenPOWER on IntegriCloud