summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2023-02-13 01:14:55 +0300
committerDave Chinner <dchinner@redhat.com>2023-02-13 01:14:55 +0300
commit3e43877a9dac13771ac722462c87bea0bdc50759 (patch)
tree42a3160639eae8c5d501b553604ec8ecb50a3221 /fs/xfs
parentba34de8defe013e4062bdc2ed57d748d6807a96a (diff)
downloadlinux-3e43877a9dac13771ac722462c87bea0bdc50759.tar.xz
xfs: remove xfs_filestream_select_ag() longest extent check
Picking a new AG checks the longest free extent in the AG is valid, so there's no need to repeat the check in xfs_filestream_select_ag(). Remove it. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_filestream.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index 713766729dcf..95e28aae35ab 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -276,7 +276,7 @@ xfs_filestream_select_ag(
xfs_agnumber_t agno = NULLAGNUMBER;
struct xfs_mru_cache_elem *mru;
int flags = 0;
- int error;
+ int error = 0;
args->total = ap->total;
*blen = 0;
@@ -351,27 +351,11 @@ xfs_filestream_select_ag(
goto out_error;
if (agno == NULLAGNUMBER) {
agno = 0;
- goto out_irele;
- }
-
- pag = xfs_perag_grab(mp, agno);
- if (!pag)
- goto out_irele;
-
- error = xfs_bmap_longest_free_extent(pag, args->tp, blen);
- xfs_perag_rele(pag);
- if (error) {
- if (error != -EAGAIN)
- goto out_error;
*blen = 0;
}
-out_irele:
- xfs_irele(pip);
out_select:
ap->blkno = XFS_AGB_TO_FSB(mp, agno, 0);
- return 0;
-
out_error:
xfs_irele(pip);
return error;