summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong2017-10-18 06:37:33 +0200
committerDarrick J. Wong2017-10-27 00:38:23 +0200
commitf135761a73b18877bdfb44018fe993172c7be203 (patch)
treed85500b46f1681192e9c8c9d5a7d81144a72dd66 /fs/xfs/libxfs/xfs_bmap.c
parentxfs: create block pointer check functions (diff)
downloadkernel-qcow2-linux-f135761a73b18877bdfb44018fe993172c7be203.tar.gz
kernel-qcow2-linux-f135761a73b18877bdfb44018fe993172c7be203.tar.xz
kernel-qcow2-linux-f135761a73b18877bdfb44018fe993172c7be203.zip
xfs: refactor btree pointer checks
Refactor the btree pointer checks so that we can call them from the scrub code without logging errors to dmesg. Preserve the existing error reporting for regular operations. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index dd6672b81c26..7eac21a310bf 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -646,8 +646,8 @@ xfs_bmap_btree_to_extents(
cbno = be64_to_cpu(*pp);
*logflagsp = 0;
#ifdef DEBUG
- if ((error = xfs_btree_check_lptr(cur, cbno, 1)))
- return error;
+ XFS_WANT_CORRUPTED_RETURN(cur->bc_mp,
+ xfs_btree_check_lptr(cur, cbno, 1));
#endif
error = xfs_btree_read_bufl(mp, tp, cbno, 0, &cbp, XFS_BMAP_BTREE_REF,
&xfs_bmbt_buf_ops);