diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-09-29 18:48:42 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-10-08 03:10:44 +0300 |
commit | 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4 (patch) | |
tree | a28f96e71f09da2fbbde50882d56e5d5657c0ede /fs/overlayfs/super.c | |
parent | f5c244383725a6de06bc62fa7c54c0ea0d942eec (diff) | |
download | linux-5d6c31910bc0713e37628dc0ce677dcb13c8ccf4.tar.xz |
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/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index e2a94a26767b..f170114481f7 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -275,10 +275,10 @@ static bool ovl_is_opaquedir(struct dentry *dentry) char val; struct inode *inode = dentry->d_inode; - if (!S_ISDIR(inode->i_mode) || !inode->i_op->getxattr) + if (!S_ISDIR(inode->i_mode) || !(inode->i_opflags & IOP_XATTR)) return false; - res = inode->i_op->getxattr(dentry, inode, OVL_XATTR_OPAQUE, &val, 1); + res = __vfs_getxattr(dentry, inode, OVL_XATTR_OPAQUE, &val, 1); if (res == 1 && val == 'y') return true; |