Commit 75fc2296 authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Zheng Zengkai
Browse files

xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range

mainline-inclusion
from mainline-v5.12-rc4
commit d4f74e16
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KIAO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d4f74e162d238ce00a640af5f0611c3f51dad70e



-------------------------------------------------

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: 46afb062 ("xfs: only flush the unshared range in xfs_reflink_unshare")
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarGuo Xuenan <guoxuenan@huawei.com>
Reviewed-by: default avatarLihong Kou <koulihong@huawei.com>
Reviewed-by: default avatarZhang Yi <yi.zhang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 2dcb6818
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment