Skip to content

Commit d4f74e1

Browse files
author
Darrick J. Wong
committed
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: 46afb06 ("xfs: only flush the unshared range in xfs_reflink_unshare") Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Chandan Babu R <[email protected]> Reviewed-by: Brian Foster <[email protected]>
1 parent fd43cf6 commit d4f74e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/xfs_reflink.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,8 @@ xfs_reflink_unshare(
15221522
if (error)
15231523
goto out;
15241524

1525-
error = filemap_write_and_wait_range(inode->i_mapping, offset, len);
1525+
error = filemap_write_and_wait_range(inode->i_mapping, offset,
1526+
offset + len - 1);
15261527
if (error)
15271528
goto out;
15281529

0 commit comments

Comments
 (0)