From: Darrick J. Wong Date: Fri, 13 Dec 2019 00:54:33 +0000 (-0500) Subject: xfs: don't return _QUERY_ABORT from xfs_rmap_has_other_keys X-Git-Tag: v5.4.0-rc0~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c3013adde40bf366a985c6e5e0d3d59d2d138f4;p=thirdparty%2Fxfsprogs-dev.git xfs: don't return _QUERY_ABORT from xfs_rmap_has_other_keys 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 Reviewed-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c index 5c305ec59..745121392 100644 --- a/libxfs/xfs_rmap.c +++ b/libxfs/xfs_rmap.c @@ -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 = {