]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range
authorDarrick J. Wong <djwong@kernel.org>
Thu, 29 Apr 2021 05:41:39 +0000 (22:41 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 29 Apr 2021 14:45:44 +0000 (07:45 -0700)
commit8ab81c43bca350d103fef09690c6f6ca40fb9d0b
tree58cf13fd2f1879bf8292965b9d66500989e80dfa
parent2d5f10038a360a5c28d55ef152d596930c0f5322
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: 39363af90721 ("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>
fs/xfs/xfs_reflink.c