diff options
| author | Joseph Qi <[email protected]> | 2020-12-04 21:38:42 +0000 |
|---|---|---|
| committer | Darrick J. Wong <[email protected]> | 2020-12-09 17:49:38 +0000 |
| commit | 2e984badbcc0f1cf284441c566ca4309fe59ac05 (patch) | |
| tree | 8c6196c52bcabcaa0d34a7623a1bb73618018870 /fs/xfs/libxfs/xfs_ialloc_btree.c | |
| parent | xfs: introduce xfs_validate_stripe_geometry() (diff) | |
| download | kernel-2e984badbcc0f1cf284441c566ca4309fe59ac05.tar.gz kernel-2e984badbcc0f1cf284441c566ca4309fe59ac05.zip | |
xfs: remove unneeded return value check for *init_cursor()
Since *init_cursor() can always return a valid cursor, the NULL check
in caller is unneeded. So clean them up.
This also keeps the behavior consistent with other callers.
Signed-off-by: Joseph Qi <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index cc919a2ee870..4c5831646bd9 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -672,11 +672,6 @@ xfs_inobt_cur( return error; cur = xfs_inobt_init_cursor(mp, tp, *agi_bpp, agno, which); - if (!cur) { - xfs_trans_brelse(tp, *agi_bpp); - *agi_bpp = NULL; - return -ENOMEM; - } *curpp = cur; return 0; } |
