xfs: rename xfs_bmap_add_free to xfs_free_extent_later

xfs_bmap_add_free isn't a block mapping function; it schedules deferred
freeing operations for a later point in a compound transaction chain.
While it's primarily used by bunmapi, its use has expanded beyond that.
Move it to xfs_alloc.c and rename the function since it's now general
freeing functionality.  Bring the slab cache bits in line with the
way we handle the other intent items.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
This commit is contained in:
Darrick J. Wong
2021-10-12 14:17:01 -07:00
parent f3c799c22c
commit c201d9ca53
12 changed files with 118 additions and 106 deletions

View File

@ -21,6 +21,7 @@
#include "xfs_rmap.h"
#include "xfs_refcount.h"
#include "xfs_bmap.h"
#include "xfs_alloc.h"
static struct kmem_cache *xfs_defer_pending_cache;
@ -848,6 +849,9 @@ xfs_defer_init_item_caches(void)
if (error)
goto err;
error = xfs_bmap_intent_init_cache();
if (error)
goto err;
error = xfs_extfree_intent_init_cache();
if (error)
goto err;
@ -861,6 +865,7 @@ err:
void
xfs_defer_destroy_item_caches(void)
{
xfs_extfree_intent_destroy_cache();
xfs_bmap_intent_destroy_cache();
xfs_refcount_intent_destroy_cache();
xfs_rmap_intent_destroy_cache();