diff options
author | Christoph Hellwig <hch@lst.de> | 2024-04-22 13:20:12 +0200 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-04-22 18:00:47 +0530 |
commit | f30f656e25eb72c4309e76b16fa45062e183a2ee (patch) | |
tree | b097332fb140ac64fbaa8f7a0d5a66358e8c83e2 /fs/xfs/libxfs/xfs_ag.c | |
parent | 5e1e4d4fc79c6e5f80864860208ceae27dead8a2 (diff) |
xfs: split xfs_mod_freecounter
xfs_mod_freecounter has two entirely separate code paths for adding or
subtracting from the free counters. Only the subtract case looks at the
rsvd flag and can return an error.
Split xfs_mod_freecounter into separate helpers for subtracting or
adding the freecounter, and remove all the impossible to reach error
handling for the addition case.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ag.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ag.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c index 09fe9412eab4..240e079cb3fb 100644 --- a/fs/xfs/libxfs/xfs_ag.c +++ b/fs/xfs/libxfs/xfs_ag.c @@ -963,9 +963,7 @@ xfs_ag_shrink_space( * Disable perag reservations so it doesn't cause the allocation request * to fail. We'll reestablish reservation before we return. */ - error = xfs_ag_resv_free(pag); - if (error) - return error; + xfs_ag_resv_free(pag); /* internal log shouldn't also show up in the free space btrees */ error = xfs_alloc_vextent_exact_bno(&args, |