diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 20:11:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 20:11:50 -0400 |
| commit | 97d2116708ca0fd6ad8b00811ee4349b7e19e96f (patch) | |
| tree | 81f73fc1a6daee60737b591cf1be73cc4f79de37 /include/linux/fs.h | |
| parent | 30066ce675d3af350bc5a53858991c0b518dda00 (diff) | |
| parent | fd50ecaddf8372a1d96e0daeaac0f93cf04e4d42 (diff) | |
Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs xattr updates from Al Viro:
"xattr stuff from Andreas
This completes the switch to xattr_handler ->get()/->set() from
->getxattr/->setxattr/->removexattr"
* 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
vfs: Remove {get,set,remove}xattr inode operations
xattr: Stop calling {get,set,remove}xattr inode operations
vfs: Check for the IOP_XATTR flag in listxattr
xattr: Add __vfs_{get,set,remove}xattr helpers
libfs: Use IOP_XATTR flag for empty directory handling
vfs: Use IOP_XATTR flag for bad-inode handling
vfs: Add IOP_XATTR inode operations flag
vfs: Move xattr_resolve_name to the front of fs/xattr.c
ecryptfs: Switch to generic xattr handlers
sockfs: Get rid of getxattr iop
sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names
kernfs: Switch to generic xattr handlers
hfs: Switch to generic xattr handlers
jffs2: Remove jffs2_{get,set,remove}xattr macros
xattr: Remove unnecessary NULL attribute name check
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4ba5957ae089..7e09f5926b3b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -592,6 +592,7 @@ is_uncached_acl(struct posix_acl *acl) | |||
| 592 | #define IOP_FASTPERM 0x0001 | 592 | #define IOP_FASTPERM 0x0001 |
| 593 | #define IOP_LOOKUP 0x0002 | 593 | #define IOP_LOOKUP 0x0002 |
| 594 | #define IOP_NOFOLLOW 0x0004 | 594 | #define IOP_NOFOLLOW 0x0004 |
| 595 | #define IOP_XATTR 0x0008 | ||
| 595 | 596 | ||
| 596 | /* | 597 | /* |
| 597 | * Keep mostly read-only and often accessed (especially for | 598 | * Keep mostly read-only and often accessed (especially for |
| @@ -1751,12 +1752,7 @@ struct inode_operations { | |||
| 1751 | struct inode *, struct dentry *, unsigned int); | 1752 | struct inode *, struct dentry *, unsigned int); |
| 1752 | int (*setattr) (struct dentry *, struct iattr *); | 1753 | int (*setattr) (struct dentry *, struct iattr *); |
| 1753 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1754 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
| 1754 | int (*setxattr) (struct dentry *, struct inode *, | ||
| 1755 | const char *, const void *, size_t, int); | ||
| 1756 | ssize_t (*getxattr) (struct dentry *, struct inode *, | ||
| 1757 | const char *, void *, size_t); | ||
| 1758 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 1755 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
| 1759 | int (*removexattr) (struct dentry *, const char *); | ||
| 1760 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1756 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
| 1761 | u64 len); | 1757 | u64 len); |
| 1762 | int (*update_time)(struct inode *, struct timespec *, int); | 1758 | int (*update_time)(struct inode *, struct timespec *, int); |
| @@ -2087,10 +2083,19 @@ struct super_block *sget(struct file_system_type *type, | |||
| 2087 | int (*test)(struct super_block *,void *), | 2083 | int (*test)(struct super_block *,void *), |
| 2088 | int (*set)(struct super_block *,void *), | 2084 | int (*set)(struct super_block *,void *), |
| 2089 | int flags, void *data); | 2085 | int flags, void *data); |
| 2090 | extern struct dentry *mount_pseudo(struct file_system_type *, char *, | 2086 | extern struct dentry *mount_pseudo_xattr(struct file_system_type *, char *, |
| 2091 | const struct super_operations *ops, | 2087 | const struct super_operations *ops, |
| 2092 | const struct dentry_operations *dops, | 2088 | const struct xattr_handler **xattr, |
| 2093 | unsigned long); | 2089 | const struct dentry_operations *dops, |
| 2090 | unsigned long); | ||
| 2091 | |||
| 2092 | static inline struct dentry * | ||
| 2093 | mount_pseudo(struct file_system_type *fs_type, char *name, | ||
| 2094 | const struct super_operations *ops, | ||
| 2095 | const struct dentry_operations *dops, unsigned long magic) | ||
| 2096 | { | ||
| 2097 | return mount_pseudo_xattr(fs_type, name, ops, NULL, dops, magic); | ||
| 2098 | } | ||
| 2094 | 2099 | ||
| 2095 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 2100 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
| 2096 | #define fops_get(fops) \ | 2101 | #define fops_get(fops) \ |
