summaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/bind.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher2016-09-29 17:48:42 +0200
committerAl Viro2016-10-08 02:10:44 +0200
commit5d6c31910bc0713e37628dc0ce677dcb13c8ccf4 (patch)
treea28f96e71f09da2fbbde50882d56e5d5657c0ede /fs/cachefiles/bind.c
parentlibfs: Use IOP_XATTR flag for empty directory handling (diff)
downloadkernel-qcow2-linux-5d6c31910bc0713e37628dc0ce677dcb13c8ccf4.tar.gz
kernel-qcow2-linux-5d6c31910bc0713e37628dc0ce677dcb13c8ccf4.tar.xz
kernel-qcow2-linux-5d6c31910bc0713e37628dc0ce677dcb13c8ccf4.zip
xattr: Add __vfs_{get,set,remove}xattr helpers
Right now, various places in the kernel check for the existence of getxattr, setxattr, and removexattr inode operations and directly call those operations. Switch to helper functions and test for the IOP_XATTR flag instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Acked-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cachefiles/bind.c')
-rw-r--r--fs/cachefiles/bind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c
index 6af790fc3df8..3ff867f87d73 100644
--- a/fs/cachefiles/bind.c
+++ b/fs/cachefiles/bind.c
@@ -20,6 +20,7 @@
#include <linux/mount.h>
#include <linux/statfs.h>
#include <linux/ctype.h>
+#include <linux/xattr.h>
#include "internal.h"
static int cachefiles_daemon_add_cache(struct cachefiles_cache *caches);
@@ -126,8 +127,7 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
if (d_is_negative(root) ||
!d_backing_inode(root)->i_op->lookup ||
!d_backing_inode(root)->i_op->mkdir ||
- !d_backing_inode(root)->i_op->setxattr ||
- !d_backing_inode(root)->i_op->getxattr ||
+ !(d_backing_inode(root)->i_opflags & IOP_XATTR) ||
!root->d_sb->s_op->statfs ||
!root->d_sb->s_op->sync_fs)
goto error_unsupported;