]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: put attr[id] log item cache init with the others
authorDarrick J. Wong <djwong@kernel.org>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
Source kernel commit: 4136e38af728eddcab2e51aecde28e94d0782b9b

Initialize and destroy the xattr log item caches in the same places that
we do all the other log item caches.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/libxfs_priv.h
libxfs/xfs_attr.c
libxfs/xfs_attr.h
libxfs/xfs_defer.c

index f71c7d8e6a1a82ea045019802fe7a944ec3c41e2..678db44c16672f530563104df6054f1f71c4fac8 100644 (file)
@@ -720,12 +720,4 @@ int xfs_bmap_last_extent(struct xfs_trans *tp, struct xfs_inode *ip,
 /* xfs_inode.h */
 #define xfs_iflags_set(ip, flags)      do { } while (0)
 
-/* xfs_attr_item.h */
-struct xfs_attri_log_item {
-/* intentionally empty to allow build and retain identical libxfs files */
-};
-struct xfs_attrd_log_item {
-/* intentionally empty to allow build and retain identical libxfs files */
-};
-
 #endif /* __LIBXFS_INTERNAL_XFS_H__ */
index 23608614a2cf806b8c0dddfac3432baa011b9f1a..0190e03c7a3a02d8d8a4206da9426cdad3f9f96b 100644 (file)
@@ -25,8 +25,6 @@
 #include "xfs_trans_space.h"
 #include "xfs_trace.h"
 
-struct kmem_cache              *xfs_attri_cache;
-struct kmem_cache              *xfs_attrd_cache;
 struct kmem_cache              *xfs_attr_intent_cache;
 
 /*
@@ -1111,40 +1109,6 @@ out_trans_cancel:
        goto out_unlock;
 }
 
-int __init
-xfs_attri_init_cache(void)
-{
-       xfs_attri_cache = kmem_cache_create("xfs_attri",
-                                           sizeof(struct xfs_attri_log_item),
-                                           0, 0, NULL);
-
-       return xfs_attri_cache != NULL ? 0 : -ENOMEM;
-}
-
-void
-xfs_attri_destroy_cache(void)
-{
-       kmem_cache_destroy(xfs_attri_cache);
-       xfs_attri_cache = NULL;
-}
-
-int __init
-xfs_attrd_init_cache(void)
-{
-       xfs_attrd_cache = kmem_cache_create("xfs_attrd",
-                                           sizeof(struct xfs_attrd_log_item),
-                                           0, 0, NULL);
-
-       return xfs_attrd_cache != NULL ? 0 : -ENOMEM;
-}
-
-void
-xfs_attrd_destroy_cache(void)
-{
-       kmem_cache_destroy(xfs_attrd_cache);
-       xfs_attrd_cache = NULL;
-}
-
 /*========================================================================
  * External routines when attribute list is inside the inode
  *========================================================================*/
index f0b93515c1e8ffd6b43e412634e9c4feddc3459a..22a2f288c1c0ed1cac4d77deed4ef7bfd32c93f3 100644 (file)
@@ -558,14 +558,6 @@ int xfs_attr_calc_size(struct xfs_da_args *args, int *local);
 void xfs_init_attr_trans(struct xfs_da_args *args, struct xfs_trans_res *tres,
                         unsigned int *total);
 
-extern struct kmem_cache       *xfs_attri_cache;
-extern struct kmem_cache       *xfs_attrd_cache;
-
-int __init xfs_attri_init_cache(void);
-void xfs_attri_destroy_cache(void);
-int __init xfs_attrd_init_cache(void);
-void xfs_attrd_destroy_cache(void);
-
 /*
  * Check to see if the attr should be upgraded from non-existent or shortform to
  * single-leaf-block attribute list.
index 4d0ed4ad0a735d245dbb649840b0383d163fc65f..8382e8a17d09b0e8b9877b1f8958af4d8521f063 100644 (file)
@@ -866,12 +866,6 @@ xfs_defer_init_item_caches(void)
        if (error)
                goto err;
        error = xfs_extfree_intent_init_cache();
-       if (error)
-               goto err;
-       error = xfs_attri_init_cache();
-       if (error)
-               goto err;
-       error = xfs_attrd_init_cache();
        if (error)
                goto err;
        error = xfs_attr_intent_init_cache();
@@ -888,8 +882,6 @@ void
 xfs_defer_destroy_item_caches(void)
 {
        xfs_attr_intent_destroy_cache();
-       xfs_attri_destroy_cache();
-       xfs_attrd_destroy_cache();
        xfs_extfree_intent_destroy_cache();
        xfs_bmap_intent_destroy_cache();
        xfs_refcount_intent_destroy_cache();