xfs: move inode locking from xfs_reflink_remap_range to xfs_file_share_range
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2016 04:49:19 +0000 (15:49 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 20 Oct 2016 04:49:19 +0000 (15:49 +1100)
commit576177818e6f1e65f6109ed4a8fae8b60131c861
treeee1426d9ce974c71f8ecdfbb5f2001b085786d95
parenta62e82b35b97e60e9e22a4e303900f342139822f
xfs: move inode locking from xfs_reflink_remap_range to xfs_file_share_range

We need the iolock protection to stabilizie the IS_SWAPFILE and
IS_IMMUTABLE values, as well as preventing new buffered writers
re-dirtying the file data that we just wrote out.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_reflink.c