On Mon, Feb 17, 2020 at 01:59:52PM +0100, Christoph Hellwig wrote: > Lift the common code to copy the cursor from and to user space into > xfs_ioc_attr_list. Note that this means we copy in twice now as > the cursor is in the middle of the conaining structure, but we never > touch the memory for the original copy. Doing so keeps the cursor > handling isolated in the common helper. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > Reviewed-by: Chandan Rajendra <chandanrlinux@xxxxxxxxx> > Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > fs/xfs/xfs_ioctl.c | 36 +++++++++++++++--------------------- > fs/xfs/xfs_ioctl.h | 2 +- > fs/xfs/xfs_ioctl32.c | 19 ++++--------------- > 3 files changed, 20 insertions(+), 37 deletions(-) Still a maze of twisty passages, but it's a bit straighter now. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx