diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-24 02:01:20 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-26 23:32:27 +0100 |
commit | 706b8c5bc70391be510a5454f307db90b622b279 (patch) | |
tree | 879091617e5a0b9614d5ab212b3a125ef8993bb6 /fs/xfs/xfs_discard.c | |
parent | xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers (diff) | |
download | linux-706b8c5bc70391be510a5454f307db90b622b279.tar.xz linux-706b8c5bc70391be510a5454f307db90b622b279.zip |
xfs: remove unnecessary null pointer checks from _read_agf callers
Drop the null buffer pointer checks in all code that calls
xfs_alloc_read_agf and doesn't pass XFS_ALLOC_FLAG_TRYLOCK because
they're no longer necessary.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_discard.c')
-rw-r--r-- | fs/xfs/xfs_discard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c index cae613620175..0b8350e84d28 100644 --- a/fs/xfs/xfs_discard.c +++ b/fs/xfs/xfs_discard.c @@ -45,7 +45,7 @@ xfs_trim_extents( xfs_log_force(mp, XFS_LOG_SYNC); error = xfs_alloc_read_agf(mp, NULL, agno, 0, &agbp); - if (error || !agbp) + if (error) goto out_put_perag; cur = xfs_allocbt_init_cursor(mp, NULL, agbp, agno, XFS_BTNUM_CNT); |