aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-10 20:48:24 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-04-10 20:48:24 -0400
commitb296821a7c42fa58baa17513b2b7b30ae66f3336 (patch)
tree5cb6593218b793ff77df1c21ea74b756af9c8540 /fs/hfsplus
parent79a628d14ec7ee9adfdc3ce04343d5ff7ec20c18 (diff)
xattr_handler: pass dentry and inode as separate arguments of ->get()
... and do not assume they are already attached to each other 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.h2
-rw-r--r--fs/hfsplus/xattr_security.c6
-rw-r--r--fs/hfsplus/xattr_trusted.c6
-rw-r--r--fs/hfsplus/xattr_user.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
index ab01530b4930..45dc4ae3791a 100644
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -579,7 +579,7 @@ failed_getxattr_init:
579 return res; 579 return res;
580} 580}
581 581
582ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name, 582ssize_t hfsplus_getxattr(struct inode *inode, const char *name,
583 void *value, size_t size, 583 void *value, size_t size,
584 const char *prefix, size_t prefixlen) 584 const char *prefix, size_t prefixlen)
585{ 585{
@@ -594,7 +594,7 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
594 strcpy(xattr_name, prefix); 594 strcpy(xattr_name, prefix);
595 strcpy(xattr_name + prefixlen, name); 595 strcpy(xattr_name + prefixlen, name);
596 596
597 res = __hfsplus_getxattr(d_inode(dentry), xattr_name, value, size); 597 res = __hfsplus_getxattr(inode, xattr_name, value, size);
598 kfree(xattr_name); 598 kfree(xattr_name);
599 return res; 599 return res;
600 600
@@ -844,8 +844,8 @@ end_removexattr:
844} 844}
845 845
846static int hfsplus_osx_getxattr(const struct xattr_handler *handler, 846static int hfsplus_osx_getxattr(const struct xattr_handler *handler,
847 struct dentry *dentry, const char *name, 847 struct dentry *unused, struct inode *inode,
848 void *buffer, size_t size) 848 const char *name, void *buffer, size_t size)
849{ 849{
850 /* 850 /*
851 * Don't allow retrieving properly prefixed attributes 851 * Don't allow retrieving properly prefixed attributes
@@ -860,7 +860,7 @@ static int hfsplus_osx_getxattr(const struct xattr_handler *handler,
860 * creates), so we pass the name through unmodified (after 860 * creates), so we pass the name through unmodified (after
861 * ensuring it doesn't conflict with another namespace). 861 * ensuring it doesn't conflict with another namespace).
862 */ 862 */
863 return __hfsplus_getxattr(d_inode(dentry), name, buffer, size); 863 return __hfsplus_getxattr(inode, name, buffer, size);
864} 864}
865 865
866static int hfsplus_osx_setxattr(const struct xattr_handler *handler, 866static int hfsplus_osx_setxattr(const struct xattr_handler *handler,
diff --git a/fs/hfsplus/xattr.h b/fs/hfsplus/xattr.h
index f9b0955b3d28..d04ba6f58df2 100644
--- a/fs/hfsplus/xattr.h
+++ b/fs/hfsplus/xattr.h
@@ -28,7 +28,7 @@ int hfsplus_setxattr(struct dentry *dentry, const char *name,
28ssize_t __hfsplus_getxattr(struct inode *inode, const char *name, 28ssize_t __hfsplus_getxattr(struct inode *inode, const char *name,
29 void *value, size_t size); 29 void *value, size_t size);
30 30
31ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name, 31ssize_t hfsplus_getxattr(struct inode *inode, const char *name,
32 void *value, size_t size, 32 void *value, size_t size,
33 const char *prefix, size_t prefixlen); 33 const char *prefix, size_t prefixlen);
34 34
diff --git a/fs/hfsplus/xattr_security.c b/fs/hfsplus/xattr_security.c
index 72a68a3a0c99..ae2ca8c2e335 100644
--- a/fs/hfsplus/xattr_security.c
+++ b/fs/hfsplus/xattr_security.c
@@ -14,10 +14,10 @@
14#include "acl.h" 14#include "acl.h"
15 15
16static int hfsplus_security_getxattr(const struct xattr_handler *handler, 16static int hfsplus_security_getxattr(const struct xattr_handler *handler,
17 struct dentry *dentry, const char *name, 17 struct dentry *unused, struct inode *inode,
18 void *buffer, size_t size) 18 const char *name, void *buffer, size_t size)
19{ 19{
20 return hfsplus_getxattr(dentry, name, buffer, size, 20 return hfsplus_getxattr(inode, name, buffer, size,
21 XATTR_SECURITY_PREFIX, 21 XATTR_SECURITY_PREFIX,
22 XATTR_SECURITY_PREFIX_LEN); 22 XATTR_SECURITY_PREFIX_LEN);
23} 23}
diff --git a/fs/hfsplus/xattr_trusted.c b/fs/hfsplus/xattr_trusted.c
index 95a7704c7abb..eae2947060aa 100644
--- a/fs/hfsplus/xattr_trusted.c
+++ b/fs/hfsplus/xattr_trusted.c
@@ -12,10 +12,10 @@
12#include "xattr.h" 12#include "xattr.h"
13 13
14static int hfsplus_trusted_getxattr(const struct xattr_handler *handler, 14static int hfsplus_trusted_getxattr(const struct xattr_handler *handler,
15 struct dentry *dentry, const char *name, 15 struct dentry *unused, struct inode *inode,
16 void *buffer, size_t size) 16 const char *name, void *buffer, size_t size)
17{ 17{
18 return hfsplus_getxattr(dentry, name, buffer, size, 18 return hfsplus_getxattr(inode, name, buffer, size,
19 XATTR_TRUSTED_PREFIX, 19 XATTR_TRUSTED_PREFIX,
20 XATTR_TRUSTED_PREFIX_LEN); 20 XATTR_TRUSTED_PREFIX_LEN);
21} 21}
diff --git a/fs/hfsplus/xattr_user.c b/fs/hfsplus/xattr_user.c
index 6fc269baf959..3c9eec3e4c7b 100644
--- a/fs/hfsplus/xattr_user.c
+++ b/fs/hfsplus/xattr_user.c
@@ -12,11 +12,11 @@
12#include "xattr.h" 12#include "xattr.h"
13 13
14static int hfsplus_user_getxattr(const struct xattr_handler *handler, 14static int hfsplus_user_getxattr(const struct xattr_handler *handler,
15 struct dentry *dentry, const char *name, 15 struct dentry *unused, struct inode *inode,
16 void *buffer, size_t size) 16 const char *name, void *buffer, size_t size)
17{ 17{
18 18
19 return hfsplus_getxattr(dentry, name, buffer, size, 19 return hfsplus_getxattr(inode, name, buffer, size,
20 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN); 20 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
21} 21}
22 22