aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
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/hfsplus
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/hfsplus')
-rw-r--r--fs/hfsplus/xattr.c10
-rw-r--r--fs/hfsplus/xattr_security.c10
-rw-r--r--fs/hfsplus/xattr_trusted.c10
-rw-r--r--fs/hfsplus/xattr_user.c10
4 files changed, 24 insertions, 16 deletions
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
index e8984990ee3b..e41a010cd89c 100644
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -849,8 +849,9 @@ end_removexattr:
849 return err; 849 return err;
850} 850}
851 851
852static int hfsplus_osx_getxattr(struct dentry *dentry, const char *name, 852static int hfsplus_osx_getxattr(const struct xattr_handler *handler,
853 void *buffer, size_t size, int type) 853 struct dentry *dentry, const char *name,
854 void *buffer, size_t size)
854{ 855{
855 if (!strcmp(name, "")) 856 if (!strcmp(name, ""))
856 return -EINVAL; 857 return -EINVAL;
@@ -871,8 +872,9 @@ static int hfsplus_osx_getxattr(struct dentry *dentry, const char *name,
871 return __hfsplus_getxattr(d_inode(dentry), name, buffer, size); 872 return __hfsplus_getxattr(d_inode(dentry), name, buffer, size);
872} 873}
873 874
874static int hfsplus_osx_setxattr(struct dentry *dentry, const char *name, 875static int hfsplus_osx_setxattr(const struct xattr_handler *handler,
875 const void *buffer, size_t size, int flags, int type) 876 struct dentry *dentry, const char *name,
877 const void *buffer, size_t size, int flags)
876{ 878{
877 if (!strcmp(name, "")) 879 if (!strcmp(name, ""))
878 return -EINVAL; 880 return -EINVAL;
diff --git a/fs/hfsplus/xattr_security.c b/fs/hfsplus/xattr_security.c
index 024e61cc5969..72a68a3a0c99 100644
--- a/fs/hfsplus/xattr_security.c
+++ b/fs/hfsplus/xattr_security.c
@@ -13,16 +13,18 @@
13#include "xattr.h" 13#include "xattr.h"
14#include "acl.h" 14#include "acl.h"
15 15
16static int hfsplus_security_getxattr(struct dentry *dentry, const char *name, 16static int hfsplus_security_getxattr(const struct xattr_handler *handler,
17 void *buffer, size_t size, int type) 17 struct dentry *dentry, const char *name,
18 void *buffer, size_t size)
18{ 19{
19 return hfsplus_getxattr(dentry, name, buffer, size, 20 return hfsplus_getxattr(dentry, name, buffer, size,
20 XATTR_SECURITY_PREFIX, 21 XATTR_SECURITY_PREFIX,
21 XATTR_SECURITY_PREFIX_LEN); 22 XATTR_SECURITY_PREFIX_LEN);
22} 23}
23 24
24static int hfsplus_security_setxattr(struct dentry *dentry, const char *name, 25static int hfsplus_security_setxattr(const struct xattr_handler *handler,
25 const void *buffer, size_t size, int flags, int type) 26 struct dentry *dentry, const char *name,
27 const void *buffer, size_t size, int flags)
26{ 28{
27 return hfsplus_setxattr(dentry, name, buffer, size, flags, 29 return hfsplus_setxattr(dentry, name, buffer, size, flags,
28 XATTR_SECURITY_PREFIX, 30 XATTR_SECURITY_PREFIX,
diff --git a/fs/hfsplus/xattr_trusted.c b/fs/hfsplus/xattr_trusted.c
index 61861573391b..95a7704c7abb 100644
--- a/fs/hfsplus/xattr_trusted.c
+++ b/fs/hfsplus/xattr_trusted.c
@@ -11,16 +11,18 @@
11#include "hfsplus_fs.h" 11#include "hfsplus_fs.h"
12#include "xattr.h" 12#include "xattr.h"
13 13
14static int hfsplus_trusted_getxattr(struct dentry *dentry, const char *name, 14static int hfsplus_trusted_getxattr(const struct xattr_handler *handler,
15 void *buffer, size_t size, int type) 15 struct dentry *dentry, const char *name,
16 void *buffer, size_t size)
16{ 17{
17 return hfsplus_getxattr(dentry, name, buffer, size, 18 return hfsplus_getxattr(dentry, name, buffer, size,
18 XATTR_TRUSTED_PREFIX, 19 XATTR_TRUSTED_PREFIX,
19 XATTR_TRUSTED_PREFIX_LEN); 20 XATTR_TRUSTED_PREFIX_LEN);
20} 21}
21 22
22static int hfsplus_trusted_setxattr(struct dentry *dentry, const char *name, 23static int hfsplus_trusted_setxattr(const struct xattr_handler *handler,
23 const void *buffer, size_t size, int flags, int type) 24 struct dentry *dentry, const char *name,
25 const void *buffer, size_t size, int flags)
24{ 26{
25 return hfsplus_setxattr(dentry, name, buffer, size, flags, 27 return hfsplus_setxattr(dentry, name, buffer, size, flags,
26 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN); 28 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
diff --git a/fs/hfsplus/xattr_user.c b/fs/hfsplus/xattr_user.c
index 3b4caba0b39d..6fc269baf959 100644
--- a/fs/hfsplus/xattr_user.c
+++ b/fs/hfsplus/xattr_user.c
@@ -11,16 +11,18 @@
11#include "hfsplus_fs.h" 11#include "hfsplus_fs.h"
12#include "xattr.h" 12#include "xattr.h"
13 13
14static int hfsplus_user_getxattr(struct dentry *dentry, const char *name, 14static int hfsplus_user_getxattr(const struct xattr_handler *handler,
15 void *buffer, size_t size, int type) 15 struct dentry *dentry, const char *name,
16 void *buffer, size_t size)
16{ 17{
17 18
18 return hfsplus_getxattr(dentry, name, buffer, size, 19 return hfsplus_getxattr(dentry, name, buffer, size,
19 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN); 20 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
20} 21}
21 22
22static int hfsplus_user_setxattr(struct dentry *dentry, const char *name, 23static int hfsplus_user_setxattr(const struct xattr_handler *handler,
23 const void *buffer, size_t size, int flags, int type) 24 struct dentry *dentry, const char *name,
25 const void *buffer, size_t size, int flags)
24{ 26{
25 return hfsplus_setxattr(dentry, name, buffer, size, flags, 27 return hfsplus_setxattr(dentry, name, buffer, size, flags,
26 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN); 28 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);