forked from luck/tmp_suning_uos_patched
xfs: only flush the unshared range in xfs_reflink_unshare
There's no reason to flush an entire file when we're unsharing part of a file. Therefore, only initiate writeback on the selected range. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
This commit is contained in:
parent
c1f6b1ac00
commit
46afb0628b
|
@ -1502,7 +1502,8 @@ xfs_reflink_unshare(
|
|||
&xfs_buffered_write_iomap_ops);
|
||||
if (error)
|
||||
goto out;
|
||||
error = filemap_write_and_wait(inode->i_mapping);
|
||||
|
||||
error = filemap_write_and_wait_range(inode->i_mapping, offset, len);
|
||||
if (error)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user