Commit 46afb062 authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
parent c1f6b1ac
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment