diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-19 12:26:31 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-23 09:08:00 -0700 |
commit | 0b04b6b875b32f2b32263ba46d54d001e05724f9 (patch) | |
tree | 584698190b272fbe00283d5b902eca1009a1e075 /fs/xfs/scrub | |
parent | 81b549aa626b650bbf00423c084c0fd5581169b9 (diff) |
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 <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 5 | ||||
-rw-r--r-- | fs/xfs/scrub/repair.c | 2 |
2 files changed, 3 insertions, 4 deletions
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; diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 326be4e8b71e..35c589a04fac 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -1009,7 +1009,7 @@ xfs_repair_find_ag_btree_roots( cur = xfs_rmapbt_init_cursor(mp, sc->tp, agf_bp, sc->sa.agno); error = xfs_rmap_query_all(cur, xfs_repair_findroot_rmap, &ri); - xfs_btree_del_cursor(cur, error ? XFS_BTREE_ERROR : XFS_BTREE_NOERROR); + xfs_btree_del_cursor(cur, error); return error; } |