diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-01 11:25:35 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-01 11:25:35 -0400 |
commit | 7b0e492e6b80d51db4156996b248522c7b50d467 (patch) | |
tree | 7b7e23b0a4bc9c2a97b1af4cb977cf0a5033ca59 /include/linux/fs.h | |
parent | 5aca284210ce827f780ea2f4f9c6ab8d6e2d6648 (diff) |
vfs: create a generic checking function for FS_IOC_FSSETXATTR
Create a generic checking function for the incoming FS_IOC_FSSETXATTR
fsxattr values so that we can standardize some of the implementation
behaviors.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 41d5175ffdd7..36f9691d7046 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -3549,4 +3549,13 @@ static inline struct sock *io_uring_get_socket(struct file *file) | |||
3549 | int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags, | 3549 | int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags, |
3550 | unsigned int flags); | 3550 | unsigned int flags); |
3551 | 3551 | ||
3552 | int vfs_ioc_fssetxattr_check(struct inode *inode, const struct fsxattr *old_fa, | ||
3553 | struct fsxattr *fa); | ||
3554 | |||
3555 | static inline void simple_fill_fsxattr(struct fsxattr *fa, __u32 xflags) | ||
3556 | { | ||
3557 | memset(fa, 0, sizeof(*fa)); | ||
3558 | fa->fsx_xflags = xflags; | ||
3559 | } | ||
3560 | |||
3552 | #endif /* _LINUX_FS_H */ | 3561 | #endif /* _LINUX_FS_H */ |