diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:15:56 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-09-17 18:55:12 -0700 |
commit | dd47b1682299880dcb15e3d621b4c342b0ede13e (patch) | |
tree | c18d0fcaae7f39d97c43ee9245f2dfea98b3b175 /fs/xfs/xfs_fsops.c | |
parent | cff07db0cda88793056f7130a07f9e9962cb0dd7 (diff) |
xfs: simplify xfs_ag_resv_free signature
It's not possible to fail at increasing fdblocks, so get rid of all the
error returns here.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r-- | fs/xfs/xfs_fsops.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 33e26690a8c4..126f3474c1f6 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -201,11 +201,10 @@ xfs_growfs_data_private( struct xfs_perag *pag; pag = xfs_perag_get(mp, id.agno); - error = xfs_ag_resv_free(pag); + xfs_ag_resv_free(pag); xfs_perag_put(pag); - if (error) - return error; } + /* * Reserve AG metadata blocks. ENOSPC here does not mean there * was a growfs failure, just that there still isn't space for @@ -589,24 +588,13 @@ xfs_fs_reserve_ag_blocks( /* * Free space reserved for per-AG metadata. */ -int +void xfs_fs_unreserve_ag_blocks( struct xfs_mount *mp) { - xfs_agnumber_t agno; struct xfs_perag *pag; - int error = 0; - int err2; - - for_each_perag(mp, agno, pag) { - err2 = xfs_ag_resv_free(pag); - if (err2 && !error) - error = err2; - } - - if (error) - xfs_warn(mp, - "Error %d freeing per-AG metadata reserve pool.", error); + xfs_agnumber_t agno; - return error; + for_each_perag(mp, agno, pag) + xfs_ag_resv_free(pag); } |