]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: fix flags argument to rmap lookup when converting shared file rmaps
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 14 Nov 2020 17:08:47 +0000 (12:08 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Sat, 14 Nov 2020 17:08:47 +0000 (12:08 -0500)
Source kernel 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: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_rmap.c

index f02f38ac45650bc8ee115fb176efd5187e7d20c3..6205b8ed484d34c1cbfe9638fcb1796d0e1fd445 100644 (file)
@@ -1513,7 +1513,7 @@ xfs_rmap_convert_shared(
         * record for our insertion point. This will also give us the record for
         * 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);
        if (error)
                goto done;