]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: merge the perag freeing helpers
authorChristoph Hellwig <hch@lst.de>
Sun, 1 Sep 2024 08:09:32 +0000 (11:09 +0300)
committerChristoph Hellwig <hch@lst.de>
Fri, 20 Sep 2024 12:06:17 +0000 (14:06 +0200)
commitb997f797b8039bf2f42474fb84e096b8bdc1030c
tree0f36b6719e43fdc489794493934dccfdfe3576c2
parent72becb8941e97454c4c9c5481d326faa9004c867
xfs: merge the perag freeing helpers

There is no good reason to have two different routines for freeing perag
structures for the unmount and error cases.  Add two arguments to specify
the range of AGs to free to xfs_free_perag, and use that to replace
xfs_free_unused_perag_range.

The addition RCU grace period for the error case is harmless, and the
extra check for the AG to actually exist is not required now that the
callers pass the exact known allocated range.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_ag.c
fs/xfs/libxfs/xfs_ag.h
fs/xfs/xfs_fsops.c
fs/xfs/xfs_mount.c