summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/xattr_trusted.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-11 02:48:24 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-04-11 02:48:24 +0200
commitb296821a7c42fa58baa17513b2b7b30ae66f3336 (patch)
tree5cb6593218b793ff77df1c21ea74b756af9c8540 /fs/reiserfs/xattr_trusted.c
parentreiserfs: switch to generic_{get,set,remove}xattr() (diff)
downloadlinux-b296821a7c42fa58baa17513b2b7b30ae66f3336.tar.xz
linux-b296821a7c42fa58baa17513b2b7b30ae66f3336.zip
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/reiserfs/xattr_trusted.c')
-rw-r--r--fs/reiserfs/xattr_trusted.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/reiserfs/xattr_trusted.c b/fs/reiserfs/xattr_trusted.c
index cc248a581b60..31837f031f59 100644
--- a/fs/reiserfs/xattr_trusted.c
+++ b/fs/reiserfs/xattr_trusted.c
@@ -8,14 +8,13 @@
#include <linux/uaccess.h>
static int
-trusted_get(const struct xattr_handler *handler, struct dentry *dentry,
- const char *name, void *buffer, size_t size)
+trusted_get(const struct xattr_handler *handler, struct dentry *unused,
+ struct inode *inode, const char *name, void *buffer, size_t size)
{
- if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(d_inode(dentry)))
+ if (!capable(CAP_SYS_ADMIN) || IS_PRIVATE(inode))
return -EPERM;
- return reiserfs_xattr_get(d_inode(dentry),
- xattr_full_name(handler, name),
+ return reiserfs_xattr_get(inode, xattr_full_name(handler, name),
buffer, size);
}