diff options
author | Christoph Hellwig <hch@lst.de> | 2020-02-26 17:30:31 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-02 20:55:52 -0800 |
commit | d0ce643911280a0f281156674203a2ca8048aed1 (patch) | |
tree | 307b78f0980a4d12828468503ec8fa94b653ab3e /fs/xfs/xfs_ioctl.h | |
parent | 2282a9e65177b425aaab4d8228f98f5c09fc778a (diff) | |
download | linux-rpi-d0ce643911280a0f281156674203a2ca8048aed1.tar.gz linux-rpi-d0ce643911280a0f281156674203a2ca8048aed1.tar.bz2 linux-rpi-d0ce643911280a0f281156674203a2ca8048aed1.zip |
xfs: factor out a helper for a single XFS_IOC_ATTRMULTI_BY_HANDLE op
Add a new helper to handle a single attr multi ioctl operation that
can be shared between the native and compat ioctl implementation.
There is a slight change in behaviour in that we don't break out of the
loop when copying in the attribute name fails. The previous behaviour
was rather inconsistent here as it continued for any other kind of
error, and that we don't clear the flags in the structure returned
to userspace, a behavior only introduced as a bug fix in the last
merge window.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.h')
-rw-r--r-- | fs/xfs/xfs_ioctl.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/xfs/xfs_ioctl.h b/fs/xfs/xfs_ioctl.h index 819504df00ae..bb50cb3dc61f 100644 --- a/fs/xfs/xfs_ioctl.h +++ b/fs/xfs/xfs_ioctl.h @@ -30,21 +30,9 @@ xfs_readlink_by_handle( struct file *parfilp, xfs_fsop_handlereq_t *hreq); -extern int -xfs_attrmulti_attr_get( - struct inode *inode, - unsigned char *name, - unsigned char __user *ubuf, - uint32_t *len, - uint32_t flags); - -extern int -xfs_attrmulti_attr_set( - struct inode *inode, - unsigned char *name, - const unsigned char __user *ubuf, - uint32_t len, - uint32_t flags); +int xfs_ioc_attrmulti_one(struct file *parfilp, struct inode *inode, + uint32_t opcode, void __user *uname, void __user *value, + uint32_t *len, uint32_t flags); extern struct dentry * xfs_handle_to_dentry( |