]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename _zone variables to _cache
authorDarrick J. Wong <djwong@kernel.org>
Thu, 6 Jan 2022 22:13:23 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:53 +0000 (16:02 -0800)
Source kernel commit: 182696fb021fc196e5cbe641565ca40fcf0f885a

Now that we've gotten rid of the kmem_zone_t typedef, rename the
variables to _cache since that's what they are.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libxfs/init.c
libxfs/rdwr.c
libxfs/xfs_alloc.c
libxfs/xfs_attr_leaf.c
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h
libxfs/xfs_da_btree.c
libxfs/xfs_da_btree.h
libxfs/xfs_inode_fork.c
libxfs/xfs_inode_fork.h

index 155b12facdba0368612544545f4d9346209b7302..4a5b0d2e19152e14fab0f656811d978ad7a8e50d 100644 (file)
@@ -238,13 +238,13 @@ init_zones(void)
                        sizeof(struct xfs_buf), 0, 0, NULL);
        xfs_inode_zone = kmem_cache_create("xfs_inode",
                        sizeof(struct xfs_inode), 0, 0, NULL);
-       xfs_ifork_zone = kmem_cache_create("xfs_ifork",
+       xfs_ifork_cache = kmem_cache_create("xfs_ifork",
                        sizeof(struct xfs_ifork), 0, 0, NULL);
        xfs_ili_zone = kmem_cache_create("xfs_inode_log_item",
                        sizeof(struct xfs_inode_log_item), 0, 0, NULL);
        xfs_buf_item_zone = kmem_cache_create("xfs_buf_log_item",
                        sizeof(struct xfs_buf_log_item), 0, 0, NULL);
-       xfs_da_state_zone = kmem_cache_create("xfs_da_state",
+       xfs_da_state_cache = kmem_cache_create("xfs_da_state",
                        sizeof(struct xfs_da_state), 0, 0, NULL);
 
        error = xfs_btree_init_cur_caches();
@@ -253,7 +253,7 @@ init_zones(void)
                abort();
        }
 
-       xfs_bmap_free_item_zone = kmem_cache_create("xfs_bmap_free_item",
+       xfs_bmap_free_item_cache = kmem_cache_create("xfs_bmap_free_item",
                        sizeof(struct xfs_extent_free_item), 0, 0, NULL);
        xfs_trans_zone = kmem_cache_create("xfs_trans",
                        sizeof(struct xfs_trans), 0, 0, NULL);
@@ -265,11 +265,11 @@ destroy_kmem_caches(void)
        kmem_cache_destroy(xfs_buf_zone);
        kmem_cache_destroy(xfs_ili_zone);
        kmem_cache_destroy(xfs_inode_zone);
-       kmem_cache_destroy(xfs_ifork_zone);
+       kmem_cache_destroy(xfs_ifork_cache);
        kmem_cache_destroy(xfs_buf_item_zone);
-       kmem_cache_destroy(xfs_da_state_zone);
+       kmem_cache_destroy(xfs_da_state_cache);
        xfs_btree_destroy_cur_caches();
-       kmem_cache_destroy(xfs_bmap_free_item_zone);
+       kmem_cache_destroy(xfs_bmap_free_item_cache);
        kmem_cache_destroy(xfs_trans_zone);
 }
 
index 315e6d1f5696fbed33f014ea9a8c828dcbba097b..c6a2c60736fa0064c7d8baa8dbbc20da9a354352 100644 (file)
@@ -1115,11 +1115,11 @@ libxfs_idestroy(xfs_inode_t *ip)
        }
        if (ip->i_afp) {
                libxfs_idestroy_fork(ip->i_afp);
-               kmem_cache_free(xfs_ifork_zone, ip->i_afp);
+               kmem_cache_free(xfs_ifork_cache, ip->i_afp);
        }
        if (ip->i_cowfp) {
                libxfs_idestroy_fork(ip->i_cowfp);
-               kmem_cache_free(xfs_ifork_zone, ip->i_cowfp);
+               kmem_cache_free(xfs_ifork_cache, ip->i_cowfp);
        }
 }
 
index c99497fd94651ff72f9297d0304e3bc7d987c504..06e870a8e3c0670882842c21e3307a17d419c078 100644 (file)
@@ -23,7 +23,7 @@
 #include "xfs_ag_resv.h"
 #include "xfs_bmap.h"
 
-extern struct kmem_cache       *xfs_bmap_free_item_zone;
+extern struct kmem_cache       *xfs_bmap_free_item_cache;
 
 struct workqueue_struct *xfs_alloc_wq;
 
@@ -2455,10 +2455,10 @@ xfs_defer_agfl_block(
        struct xfs_mount                *mp = tp->t_mountp;
        struct xfs_extent_free_item     *new;           /* new element */
 
-       ASSERT(xfs_bmap_free_item_zone != NULL);
+       ASSERT(xfs_bmap_free_item_cache != NULL);
        ASSERT(oinfo != NULL);
 
-       new = kmem_cache_alloc(xfs_bmap_free_item_zone,
+       new = kmem_cache_alloc(xfs_bmap_free_item_cache,
                               GFP_KERNEL | __GFP_NOFAIL);
        new->xefi_startblock = XFS_AGB_TO_FSB(mp, agno, agbno);
        new->xefi_blockcount = 1;
index 76a525735a68256ea46f5c6f48a5825f33c873f2..31eddb543308357a967b5983e9420a018bcb5fc8 100644 (file)
@@ -767,7 +767,7 @@ xfs_attr_fork_remove(
        ASSERT(ip->i_afp->if_nextents == 0);
 
        xfs_idestroy_fork(ip->i_afp);
-       kmem_cache_free(xfs_ifork_zone, ip->i_afp);
+       kmem_cache_free(xfs_ifork_cache, ip->i_afp);
        ip->i_afp = NULL;
        ip->i_forkoff = 0;
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
index ecf79e2447838a32e4817fb774d5d0737a22796f..0514d6e5c150f02226a4207394458733416736f8 100644 (file)
@@ -31,7 +31,7 @@
 #include "xfs_refcount.h"
 
 
-struct kmem_cache              *xfs_bmap_free_item_zone;
+struct kmem_cache              *xfs_bmap_free_item_cache;
 
 /*
  * Miscellaneous helper functions
@@ -548,9 +548,9 @@ __xfs_bmap_add_free(
        ASSERT(len < mp->m_sb.sb_agblocks);
        ASSERT(agbno + len <= mp->m_sb.sb_agblocks);
 #endif
-       ASSERT(xfs_bmap_free_item_zone != NULL);
+       ASSERT(xfs_bmap_free_item_cache != NULL);
 
-       new = kmem_cache_alloc(xfs_bmap_free_item_zone,
+       new = kmem_cache_alloc(xfs_bmap_free_item_cache,
                               GFP_KERNEL | __GFP_NOFAIL);
        new->xefi_startblock = bno;
        new->xefi_blockcount = (xfs_extlen_t)len;
index 171a72ee9f3194baff44ba5d3f24ff2a87822d56..2cd7717cf7531e4d5d975eda8edb22908a3e1067 100644 (file)
@@ -13,7 +13,7 @@ struct xfs_inode;
 struct xfs_mount;
 struct xfs_trans;
 
-extern struct kmem_cache       *xfs_bmap_free_item_zone;
+extern struct kmem_cache       *xfs_bmap_free_item_cache;
 
 /*
  * Argument structure for xfs_bmap_alloc.
index f1ae5d4d749dadb75523b5227657f92b682e4702..50f3ec661a421bdd09489433e8f878a7c46871b8 100644 (file)
@@ -69,7 +69,7 @@ STATIC int    xfs_da3_blk_unlink(xfs_da_state_t *state,
                                  xfs_da_state_blk_t *save_blk);
 
 
-struct kmem_cache *xfs_da_state_zone;  /* anchor for state struct zone */
+struct kmem_cache      *xfs_da_state_cache;    /* anchor for dir/attr state */
 
 /*
  * Allocate a dir-state structure.
@@ -81,7 +81,7 @@ xfs_da_state_alloc(
 {
        struct xfs_da_state     *state;
 
-       state = kmem_cache_zalloc(xfs_da_state_zone, GFP_NOFS | __GFP_NOFAIL);
+       state = kmem_cache_zalloc(xfs_da_state_cache, GFP_NOFS | __GFP_NOFAIL);
        state->args = args;
        state->mp = args->dp->i_mount;
        return state;
@@ -110,7 +110,7 @@ xfs_da_state_free(xfs_da_state_t *state)
 #ifdef DEBUG
        memset((char *)state, 0, sizeof(*state));
 #endif /* DEBUG */
-       kmem_cache_free(xfs_da_state_zone, state);
+       kmem_cache_free(xfs_da_state_cache, state);
 }
 
 static inline int xfs_dabuf_nfsb(struct xfs_mount *mp, int whichfork)
index da845e32a678276b9340be0d14c09c391a591a80..0faf7d9ac241fbda34bdccb8a2772c0bc347415f 100644 (file)
@@ -9,7 +9,6 @@
 
 struct xfs_inode;
 struct xfs_trans;
-struct zone;
 
 /*
  * Directory/attribute geometry information. There will be one of these for each
@@ -227,6 +226,6 @@ void        xfs_da3_node_hdr_from_disk(struct xfs_mount *mp,
 void   xfs_da3_node_hdr_to_disk(struct xfs_mount *mp,
                struct xfs_da_intnode *to, struct xfs_da3_icnode_hdr *from);
 
-extern struct kmem_cache *xfs_da_state_zone;
+extern struct kmem_cache       *xfs_da_state_cache;
 
 #endif /* __XFS_DA_BTREE_H__ */
index c80b4066190e7a4ed05537d47f85abe92cc9cecf..d6ac13eea764ac0a3e824a97abc5b205f6637383 100644 (file)
@@ -24,7 +24,7 @@
 #include "xfs_types.h"
 #include "xfs_errortag.h"
 
-struct kmem_cache *xfs_ifork_zone;
+struct kmem_cache *xfs_ifork_cache;
 
 void
 xfs_init_local_fork(
@@ -282,7 +282,7 @@ xfs_ifork_alloc(
 {
        struct xfs_ifork        *ifp;
 
-       ifp = kmem_cache_zalloc(xfs_ifork_zone, GFP_NOFS | __GFP_NOFAIL);
+       ifp = kmem_cache_zalloc(xfs_ifork_cache, GFP_NOFS | __GFP_NOFAIL);
        ifp->if_format = format;
        ifp->if_nextents = nextents;
        return ifp;
@@ -323,7 +323,7 @@ xfs_iformat_attr_fork(
        }
 
        if (error) {
-               kmem_cache_free(xfs_ifork_zone, ip->i_afp);
+               kmem_cache_free(xfs_ifork_cache, ip->i_afp);
                ip->i_afp = NULL;
        }
        return error;
@@ -674,7 +674,7 @@ xfs_ifork_init_cow(
        if (ip->i_cowfp)
                return;
 
-       ip->i_cowfp = kmem_cache_zalloc(xfs_ifork_zone,
+       ip->i_cowfp = kmem_cache_zalloc(xfs_ifork_cache,
                                       GFP_NOFS | __GFP_NOFAIL);
        ip->i_cowfp->if_format = XFS_DINODE_FMT_EXTENTS;
 }
index cb296bd5baae0f0d40825d5eb42b32806e3089a4..3d64a3acb0edc07ed7ce3503af74bef0e168f977 100644 (file)
@@ -221,7 +221,7 @@ static inline bool xfs_iext_peek_prev_extent(struct xfs_ifork *ifp,
             xfs_iext_get_extent((ifp), (ext), (got));  \
             xfs_iext_next((ifp), (ext)))
 
-extern struct kmem_cache       *xfs_ifork_zone;
+extern struct kmem_cache       *xfs_ifork_cache;
 
 extern void xfs_ifork_init_cow(struct xfs_inode *ip);