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>
This commit is contained in:
@@ -659,8 +659,6 @@ xrep_agfl(
|
||||
error = xfs_alloc_read_agf(mp, sc->tp, sc->sa.agno, 0, &agf_bp);
|
||||
if (error)
|
||||
return error;
|
||||
if (!agf_bp)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* Make sure we have the AGFL buffer, as scrub might have decided it
|
||||
@@ -735,8 +733,6 @@ xrep_agi_find_btrees(
|
||||
error = xfs_alloc_read_agf(mp, sc->tp, sc->sa.agno, 0, &agf_bp);
|
||||
if (error)
|
||||
return error;
|
||||
if (!agf_bp)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Find the btree roots. */
|
||||
error = xrep_find_ag_btree_roots(sc, agf_bp, fab, NULL);
|
||||
|
@@ -83,9 +83,6 @@ xchk_fscount_warmup(
|
||||
error = xfs_alloc_read_agf(mp, sc->tp, agno, 0, &agf_bp);
|
||||
if (error)
|
||||
break;
|
||||
error = -ENOMEM;
|
||||
if (!agf_bp || !agi_bp)
|
||||
break;
|
||||
|
||||
/*
|
||||
* These are supposed to be initialized by the header read
|
||||
|
@@ -546,8 +546,6 @@ xrep_reap_block(
|
||||
error = xfs_alloc_read_agf(sc->mp, sc->tp, agno, 0, &agf_bp);
|
||||
if (error)
|
||||
return error;
|
||||
if (!agf_bp)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
agf_bp = sc->sa.agf_bp;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user