From 0b04b6b875b32f2b32263ba46d54d001e05724f9 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 19 Jul 2018 12:26:31 -0700 Subject: xfs: trivial xfs_btree_del_cursor cleanups The error argument to xfs_btree_del_cursor already understands the "nonzero for error" semantics, so remove pointless error testing in the callers and pass it directly. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino Reviewed-by: Christoph Hellwig --- fs/xfs/scrub/bmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/xfs/scrub/bmap.c') diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 3d08589f5c60..ebbfab173e97 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -404,8 +404,7 @@ xfs_scrub_bmap_btree( cur = xfs_bmbt_init_cursor(mp, sc->tp, ip, whichfork); xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, whichfork); error = xfs_scrub_btree(sc, cur, xfs_scrub_bmapbt_rec, &oinfo, info); - xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : - XFS_BTREE_NOERROR); + xfs_btree_del_cursor(cur, error); return error; } @@ -514,7 +513,7 @@ xfs_scrub_bmap_check_ag_rmaps( if (error == XFS_BTREE_QUERY_RANGE_ABORT) error = 0; - xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR); + xfs_btree_del_cursor(cur, error); out_agf: xfs_trans_brelse(sc->tp, agf); return error; -- cgit v1.2.1