mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range
The final parameter of filemap_write_and_wait_range is the end of the
range to flush, not the length of the range to flush.
Fixes: 46afb0628b
("xfs: only flush the unshared range in xfs_reflink_unshare")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
parent
fd43cf600c
commit
d4f74e162d
@ -1522,7 +1522,8 @@ xfs_reflink_unshare(
|
||||
if (error)
|
||||
goto out;
|
||||
|
||||
error = filemap_write_and_wait_range(inode->i_mapping, offset, len);
|
||||
error = filemap_write_and_wait_range(inode->i_mapping, offset,
|
||||
offset + len - 1);
|
||||
if (error)
|
||||
goto out;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user