diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-09-29 17:48:42 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-10-08 02:10:44 +0200 |
commit | 5d6c31910bc0713e37628dc0ce677dcb13c8ccf4 (patch) | |
tree | a28f96e71f09da2fbbde50882d56e5d5657c0ede /include | |
parent | libfs: Use IOP_XATTR flag for empty directory handling (diff) | |
download | linux-5d6c31910bc0713e37628dc0ce677dcb13c8ccf4.tar.xz 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 'include')
-rw-r--r-- | include/linux/xattr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 94079bab9243..6ae6b2e68efb 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -46,10 +46,13 @@ struct xattr { }; ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); +ssize_t __vfs_getxattr(struct dentry *, struct inode *, const char *, void *, size_t); ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t); ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); +int __vfs_setxattr(struct dentry *, struct inode *, const char *, const void *, size_t, int); int __vfs_setxattr_noperm(struct dentry *, const char *, const void *, size_t, int); int vfs_setxattr(struct dentry *, const char *, const void *, size_t, int); +int __vfs_removexattr(struct dentry *, const char *); int vfs_removexattr(struct dentry *, const char *); ssize_t generic_getxattr(struct dentry *dentry, struct inode *inode, const char *name, void *buffer, size_t size); |