提交 c81a0f08 编写于 作者: D Darrick J. Wong 提交者: Yang Yingliang

xfs: fix flags argument to rmap lookup when converting shared file rmaps

stable inclusion
from linux-4.19.158
commit 83e65294aff8635877dfd0a019dbb9cd1abcab8a

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

[ Upstream commit ea843989 ]

Pass the same oldext argument (which contains the existing rmapping's
unwritten state) to xfs_rmap_lookup_le_range at the start of
xfs_rmap_convert_shared.  At this point in the code, flags is zero,
which means that we perform lookups using the wrong key.

Fixes: 3f165b33 ("xfs: convert unwritten status of reverse mappings for shared files")
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 c931e185
...@@ -1387,7 +1387,7 @@ xfs_rmap_convert_shared( ...@@ -1387,7 +1387,7 @@ xfs_rmap_convert_shared(
* record for our insertion point. This will also give us the record for * record for our insertion point. This will also give us the record for
* start block contiguity tests. * start block contiguity tests.
*/ */
error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags, error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext,
&PREV, &i); &PREV, &i);
if (error) if (error)
goto done; goto done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册