]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: don't return _QUERY_ABORT from xfs_rmap_has_other_keys
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
Source kernel commit: 7380e8fec16b3527baa1153255da9cc8d5d4d309

The xfs_rmap_has_other_keys helper aborts the iteration as soon as it
has an answer.  Don't let this abort leak out to callers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_rmap.c

index 5c305ec599bb065a3fd4fddd29d2386aff07b4bd..745121392d6888b8271fce2e41c0fc2b33332b46 100644 (file)
@@ -2538,8 +2538,11 @@ xfs_rmap_has_other_keys(
 
        error = xfs_rmap_query_range(cur, &low, &high,
                        xfs_rmap_has_other_keys_helper, &rks);
+       if (error < 0)
+               return error;
+
        *has_rmap = rks.has_rmap;
-       return error;
+       return 0;
 }
 
 const struct xfs_owner_info XFS_RMAP_OINFO_SKIP_UPDATE = {