aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/xattr_user.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-10-04 13:18:51 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-11-13 20:34:32 -0500
commitd9a82a04033f87bbd06efb29f78c0170a38154a8 (patch)
treeac074d813cda2a29a5f8a12a063e058ea588cb7c /fs/jffs2/xattr_user.c
parentbf781714b3e1421a0ebcd0137d081e6566a89f15 (diff)
xattr handlers: Pass handler to operations instead of flags
The xattr_handler operations are currently all passed a file system specific flags value which the operations can use to disambiguate between different handlers; some file systems use that to distinguish the xattr namespace, for example. In some oprations, it would be useful to also have access to the handler prefix. To allow that, pass a pointer to the handler to operations instead of the flags value alone. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jffs2/xattr_user.c')
-rw-r--r--fs/jffs2/xattr_user.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/jffs2/xattr_user.c b/fs/jffs2/xattr_user.c
index a71391eba514..cbc0472e59a8 100644
--- a/fs/jffs2/xattr_user.c
+++ b/fs/jffs2/xattr_user.c
@@ -16,8 +16,9 @@
16#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
17#include "nodelist.h" 17#include "nodelist.h"
18 18
19static int jffs2_user_getxattr(struct dentry *dentry, const char *name, 19static int jffs2_user_getxattr(const struct xattr_handler *handler,
20 void *buffer, size_t size, int type) 20 struct dentry *dentry, const char *name,
21 void *buffer, size_t size)
21{ 22{
22 if (!strcmp(name, "")) 23 if (!strcmp(name, ""))
23 return -EINVAL; 24 return -EINVAL;
@@ -25,8 +26,9 @@ static int jffs2_user_getxattr(struct dentry *dentry, const char *name,
25 name, buffer, size); 26 name, buffer, size);
26} 27}
27 28
28static int jffs2_user_setxattr(struct dentry *dentry, const char *name, 29static int jffs2_user_setxattr(const struct xattr_handler *handler,
29 const void *buffer, size_t size, int flags, int type) 30 struct dentry *dentry, const char *name,
31 const void *buffer, size_t size, int flags)
30{ 32{
31 if (!strcmp(name, "")) 33 if (!strcmp(name, ""))
32 return -EINVAL; 34 return -EINVAL;
@@ -34,8 +36,10 @@ static int jffs2_user_setxattr(struct dentry *dentry, const char *name,
34 name, buffer, size, flags); 36 name, buffer, size, flags);
35} 37}
36 38
37static size_t jffs2_user_listxattr(struct dentry *dentry, char *list, 39static size_t jffs2_user_listxattr(const struct xattr_handler *handler,
38 size_t list_size, const char *name, size_t name_len, int type) 40 struct dentry *dentry, char *list,
41 size_t list_size, const char *name,
42 size_t name_len)
39{ 43{
40 size_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1; 44 size_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1;
41 45