]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xfs: fix flags argument to rmap lookup when converting shared file rmaps
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Nov 2020 00:32:43 +0000 (16:32 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:06:29 +0000 (12:06 +0100)
commitebb2ce3bfa6306fd27d62c08c2e6ab780dc335f4
tree6ae2259e1059fdbab39aea0e64bd8db4c63fb254
parenta19a699148a0c60519dea5e5dd22e637324cf353
xfs: fix flags argument to rmap lookup when converting shared file rmaps

BugLink: https://bugs.launchpad.net/bugs/1905618
[ Upstream commit ea8439899c0b15a176664df62aff928010fad276 ]

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: 3f165b334e51 ("xfs: convert unwritten status of reverse mappings for shared files")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/xfs/libxfs/xfs_rmap.c