summary refs log tree commit diff
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-08-26 17:06:01 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-08-28 08:31:01 -0700
commit7380e8fec16b3527baa1153255da9cc8d5d4d309 (patch)
treed3d6712c1839637da312ba078d60cd4846eef80a
parentc94613feefd7714ad0d03a1914632c15782114ff (diff)
downloadlinux-7380e8fec16b3527baa1153255da9cc8d5d4d309.tar.gz
xfs: don't return _QUERY_ABORT from xfs_rmap_has_other_keys
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>
-rw-r--r--fs/xfs/libxfs/xfs_rmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 12a61f0c1e6a..0769aca4192b 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -2540,8 +2540,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 = {