diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-11 21:53:22 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-13 20:08:01 +0100 |
commit | a71895c5dad1ab8cf30622e208d148298ab602e5 (patch) | |
tree | cb6ab48f015524f584a1a920fbed3709f48763d4 /fs/xfs/libxfs/xfs_alloc.c | |
parent | xfs: kill the XFS_WANT_CORRUPT_* macros (diff) | |
download | linux-a71895c5dad1ab8cf30622e208d148298ab602e5.tar.xz linux-a71895c5dad1ab8cf30622e208d148298ab602e5.zip |
xfs: convert open coded corruption check to use XFS_IS_CORRUPT
Convert the last of the open coded corruption check and report idioms to
use the XFS_IS_CORRUPT macro.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index fcee5e8f1a5b..c284e10af491 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -1071,8 +1071,7 @@ xfs_alloc_ag_vextent_small( struct xfs_buf *bp; bp = xfs_btree_get_bufs(args->mp, args->tp, args->agno, fbno); - if (!bp) { - XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, args->mp); + if (XFS_IS_CORRUPT(args->mp, !bp)) { error = -EFSCORRUPTED; goto error; } @@ -2341,10 +2340,8 @@ xfs_free_agfl_block( return error; bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno); - if (!bp) { - XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, tp->t_mountp); + if (XFS_IS_CORRUPT(tp->t_mountp, !bp)) return -EFSCORRUPTED; - } xfs_trans_binval(tp, bp); return 0; |