OSDN Git Service

xfs: factor out a helper for a single XFS_IOC_ATTRMULTI_BY_HANDLE op
authorChristoph Hellwig <hch@lst.de>
Thu, 27 Feb 2020 01:30:31 +0000 (17:30 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 3 Mar 2020 04:55:52 +0000 (20:55 -0800)
commitd0ce643911280a0f281156674203a2ca8048aed1
tree307b78f0980a4d12828468503ec8fa94b653ab3e
parent2282a9e65177b425aaab4d8228f98f5c09fc778a
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>
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl.h
fs/xfs/xfs_ioctl32.c