]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename _zone variables to _cache
authorDarrick J. Wong <djwong@kernel.org>
Thu, 28 Apr 2022 19:39:04 +0000 (15:39 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 28 Apr 2022 19:39:04 +0000 (15:39 -0400)
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: Eric Sandeen <sandeen@sandeen.net>
16 files changed:
include/kmem.h
libxfs/defer_item.c
libxfs/init.c
libxfs/kmem.c
libxfs/libxfs_priv.h
libxfs/logitem.c
libxfs/rdwr.c
libxfs/trans.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 e330e0e883d69486bd878d721a57077e7e348882..20e4bfe3c0a855da674a1d14cd6b6f0e01ef1950 100644 (file)
 #define KM_NOLOCKDEP   0x0020u
 
 struct kmem_cache {
-       int             zone_unitsize;  /* Size in bytes of zone unit */
+       int             cache_unitsize; /* Size in bytes of cache unit */
        int             allocated;      /* debug: How many allocated? */
        unsigned int    align;
-       const char      *zone_name;     /* tag name */
+       const char      *cache_name;    /* tag name */
        void            (*ctor)(void *);
 };
 
@@ -33,25 +33,19 @@ struct kmem_cache * kmem_cache_create(const char *name, unsigned int size,
                void (*ctor)(void *));
 
 static inline struct kmem_cache *
-kmem_zone_init(unsigned int size, const char *name)
+kmem_cache_init(unsigned int size, const char *name)
 {
        return kmem_cache_create(name, size, 0, 0, NULL);
 }
 
 extern void    *kmem_cache_alloc(struct kmem_cache *, gfp_t);
 extern void    *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
-extern int     kmem_zone_destroy(struct kmem_cache *);
+extern int     kmem_cache_destroy(struct kmem_cache *);
 
 static inline void
-kmem_cache_destroy(struct kmem_cache *zone)
+kmem_cache_free(struct kmem_cache *cache, void *ptr)
 {
-       kmem_zone_destroy(zone);
-}
-
-static inline void
-kmem_cache_free(struct kmem_cache *zone, void *ptr)
-{
-       zone->allocated--;
+       cache->allocated--;
        free(ptr);
 }
 
index a985f02800ae679db17a373a0eb09fd79c32d570..1412d08907d2cf7ce8ddfc63a1cb71b593989bdb 100644 (file)
@@ -82,7 +82,7 @@ xfs_extent_free_finish_item(
        error = xfs_free_extent(tp, free->xefi_startblock,
                        free->xefi_blockcount, &free->xefi_oinfo,
                        XFS_AG_RESV_NONE);
-       kmem_cache_free(xfs_bmap_free_item_zone, free);
+       kmem_cache_free(xfs_bmap_free_item_cache, free);
        return error;
 }
 
@@ -101,7 +101,7 @@ xfs_extent_free_cancel_item(
        struct xfs_extent_free_item     *free;
 
        free = container_of(item, struct xfs_extent_free_item, xefi_list);
-       kmem_cache_free(xfs_bmap_free_item_zone, free);
+       kmem_cache_free(xfs_bmap_free_item_cache, free);
 }
 
 const struct xfs_defer_op_type xfs_extent_free_defer_type = {
@@ -139,7 +139,7 @@ xfs_agfl_free_finish_item(
        if (!error)
                error = xfs_free_agfl_block(tp, agno, agbno, agbp,
                                            &free->xefi_oinfo);
-       kmem_cache_free(xfs_bmap_free_item_zone, free);
+       kmem_cache_free(xfs_bmap_free_item_cache, free);
        return error;
 }
 
index fcfd45c5f79d6de9233f23422a2a8b90bf851380..e258f938d630364649735de3ce64d7b9bb5852ce 100644 (file)
@@ -226,49 +226,49 @@ check_open(char *path, int flags, char **rawfile, char **blockfile)
 }
 
 /*
- * Initialize/destroy all of the zone allocators we use.
+ * Initialize/destroy all of the cache allocators we use.
  */
 static void
-init_zones(void)
+init_caches(void)
 {
        int     error;
 
-       /* initialise zone allocation */
-       xfs_buf_zone = kmem_zone_init(sizeof(struct xfs_buf), "xfs_buffer");
-       xfs_inode_zone = kmem_zone_init(sizeof(struct xfs_inode), "xfs_inode");
-       xfs_ifork_zone = kmem_zone_init(sizeof(struct xfs_ifork), "xfs_ifork");
-       xfs_ili_zone = kmem_zone_init(
+       /* initialise cache allocation */
+       xfs_buf_cache = kmem_cache_init(sizeof(struct xfs_buf), "xfs_buffer");
+       xfs_inode_cache = kmem_cache_init(sizeof(struct xfs_inode), "xfs_inode");
+       xfs_ifork_cache = kmem_cache_init(sizeof(struct xfs_ifork), "xfs_ifork");
+       xfs_ili_cache = kmem_cache_init(
                        sizeof(struct xfs_inode_log_item),"xfs_inode_log_item");
-       xfs_buf_item_zone = kmem_zone_init(
+       xfs_buf_item_cache = kmem_cache_init(
                        sizeof(struct xfs_buf_log_item), "xfs_buf_log_item");
-       xfs_da_state_zone = kmem_zone_init(
+       xfs_da_state_cache = kmem_cache_init(
                        sizeof(struct xfs_da_state), "xfs_da_state");
        error = xfs_btree_init_cur_caches();
        if (error) {
                fprintf(stderr, "Could not allocate btree cursor caches.\n");
                abort();
        }
-       xfs_bmap_free_item_zone = kmem_zone_init(
+       xfs_bmap_free_item_cache = kmem_cache_init(
                        sizeof(struct xfs_extent_free_item),
                        "xfs_bmap_free_item");
-       xfs_trans_zone = kmem_zone_init(
+       xfs_trans_cache = kmem_cache_init(
                        sizeof(struct xfs_trans), "xfs_trans");
 }
 
 static int
-destroy_zones(void)
+destroy_caches(void)
 {
        int     leaked = 0;
 
-       leaked += kmem_zone_destroy(xfs_buf_zone);
-       leaked += kmem_zone_destroy(xfs_ili_zone);
-       leaked += kmem_zone_destroy(xfs_inode_zone);
-       leaked += kmem_zone_destroy(xfs_ifork_zone);
-       leaked += kmem_zone_destroy(xfs_buf_item_zone);
-       leaked += kmem_zone_destroy(xfs_da_state_zone);
+       leaked += kmem_cache_destroy(xfs_buf_cache);
+       leaked += kmem_cache_destroy(xfs_ili_cache);
+       leaked += kmem_cache_destroy(xfs_inode_cache);
+       leaked += kmem_cache_destroy(xfs_ifork_cache);
+       leaked += kmem_cache_destroy(xfs_buf_item_cache);
+       leaked += kmem_cache_destroy(xfs_da_state_cache);
        xfs_btree_destroy_cur_caches();
-       leaked += kmem_zone_destroy(xfs_bmap_free_item_zone);
-       leaked += kmem_zone_destroy(xfs_trans_zone);
+       leaked += kmem_cache_destroy(xfs_bmap_free_item_cache);
+       leaked += kmem_cache_destroy(xfs_trans_cache);
 
        return leaked;
 }
@@ -405,7 +405,7 @@ libxfs_init(libxfs_init_t *a)
                                   &libxfs_bcache_operations);
        use_xfs_buf_lock = a->usebuflock;
        xfs_dir_startup();
-       init_zones();
+       init_caches();
        rval = 1;
 done:
        if (dpath[0])
@@ -1031,11 +1031,11 @@ libxfs_destroy(
 
        libxfs_close_devices(li);
 
-       /* Free everything from the buffer cache before freeing buffer zone */
+       /* Free everything from the buffer cache before freeing buffer cache */
        libxfs_bcache_purge();
        libxfs_bcache_free();
        cache_destroy(libxfs_bcache);
-       leaked = destroy_zones();
+       leaked = destroy_caches();
        rcu_unregister_thread();
        if (getenv("LIBXFS_LEAK_CHECK") && leaked)
                exit(1);
index daacd2c6bbe49332c33b34a6b2c2945963721cf1..42d813088d6ada92842f5ce0fd3c6a5fb9533cd9 100644 (file)
@@ -13,13 +13,13 @@ kmem_cache_create(const char *name, unsigned int size, unsigned int align,
        struct kmem_cache       *ptr = malloc(sizeof(struct kmem_cache));
 
        if (ptr == NULL) {
-               fprintf(stderr, _("%s: zone init failed (%s, %d bytes): %s\n"),
+               fprintf(stderr, _("%s: cache init failed (%s, %d bytes): %s\n"),
                        progname, name, (int)sizeof(struct kmem_cache),
                        strerror(errno));
                exit(1);
        }
-       ptr->zone_unitsize = size;
-       ptr->zone_name = name;
+       ptr->cache_unitsize = size;
+       ptr->cache_name = name;
        ptr->allocated = 0;
        ptr->align = align;
        ptr->ctor = ctor;
@@ -28,40 +28,40 @@ kmem_cache_create(const char *name, unsigned int size, unsigned int align,
 }
 
 int
-kmem_zone_destroy(struct kmem_cache *zone)
+kmem_cache_destroy(struct kmem_cache *cache)
 {
        int     leaked = 0;
 
-       if (getenv("LIBXFS_LEAK_CHECK") && zone->allocated) {
+       if (getenv("LIBXFS_LEAK_CHECK") && cache->allocated) {
                leaked = 1;
-               fprintf(stderr, "zone %s freed with %d items allocated\n",
-                               zone->zone_name, zone->allocated);
+               fprintf(stderr, "cache %s freed with %d items allocated\n",
+                               cache->cache_name, cache->allocated);
        }
-       free(zone);
+       free(cache);
        return leaked;
 }
 
 void *
-kmem_cache_alloc(struct kmem_cache *zone, gfp_t flags)
+kmem_cache_alloc(struct kmem_cache *cache, gfp_t flags)
 {
-       void    *ptr = malloc(zone->zone_unitsize);
+       void    *ptr = malloc(cache->cache_unitsize);
 
        if (ptr == NULL) {
-               fprintf(stderr, _("%s: zone alloc failed (%s, %d bytes): %s\n"),
-                       progname, zone->zone_name, zone->zone_unitsize,
+               fprintf(stderr, _("%s: cache alloc failed (%s, %d bytes): %s\n"),
+                       progname, cache->cache_name, cache->cache_unitsize,
                        strerror(errno));
                exit(1);
        }
-       zone->allocated++;
+       cache->allocated++;
        return ptr;
 }
 
 void *
-kmem_cache_zalloc(struct kmem_cache *zone, gfp_t flags)
+kmem_cache_zalloc(struct kmem_cache *cache, gfp_t flags)
 {
-       void    *ptr = kmem_cache_alloc(zone, flags);
+       void    *ptr = kmem_cache_alloc(cache, flags);
 
-       memset(ptr, 0, zone->zone_unitsize);
+       memset(ptr, 0, cache->cache_unitsize);
        return ptr;
 }
 
index 2c888fb74600befeff5a93efca5554ea565799c5..53f45d5a5340d35e66a5d1be12f6d5666d1fa644 100644 (file)
 #include <sys/xattr.h>
 
 /* Zones used in libxfs allocations that aren't in shared header files */
-extern struct kmem_cache *xfs_buf_item_zone;
-extern struct kmem_cache *xfs_ili_zone;
-extern struct kmem_cache *xfs_buf_zone;
-extern struct kmem_cache *xfs_inode_zone;
-extern struct kmem_cache *xfs_trans_zone;
+extern struct kmem_cache *xfs_buf_item_cache;
+extern struct kmem_cache *xfs_ili_cache;
+extern struct kmem_cache *xfs_buf_cache;
+extern struct kmem_cache *xfs_inode_cache;
+extern struct kmem_cache *xfs_trans_cache;
 
 /* fake up iomap, (not) used in xfs_bmap.[ch] */
 #define IOMAP_F_SHARED                 0x04
index dde90502cff2d2edca997da76fbe0cbad499c091..98ccdaefb18fed265eac37127f733a10f6f6c5b6 100644 (file)
@@ -16,8 +16,8 @@
 #include "xfs_inode.h"
 #include "xfs_trans.h"
 
-struct kmem_cache      *xfs_buf_item_zone;
-struct kmem_cache      *xfs_ili_zone;          /* inode log item zone */
+struct kmem_cache      *xfs_buf_item_cache;
+struct kmem_cache      *xfs_ili_cache;         /* inode log item cache */
 
 /*
  * Following functions from fs/xfs/xfs_trans_buf.c
@@ -96,7 +96,7 @@ xfs_buf_item_init(
                }
        }
 
-       bip = kmem_cache_zalloc(xfs_buf_item_zone, 0);
+       bip = kmem_cache_zalloc(xfs_buf_item_cache, 0);
 #ifdef LI_DEBUG
        fprintf(stderr, "adding buf item %p for not-logged buffer %p\n",
                bip, bp);
@@ -138,7 +138,7 @@ xfs_inode_item_init(
        struct xfs_inode_log_item       *iip;
 
        ASSERT(ip->i_itemp == NULL);
-       iip = ip->i_itemp = kmem_cache_zalloc(xfs_ili_zone, 0);
+       iip = ip->i_itemp = kmem_cache_zalloc(xfs_ili_cache, 0);
 #ifdef LI_DEBUG
        fprintf(stderr, "inode_item_init for inode %llu, iip=%p\n",
                ip->i_ino, iip);
index d23827158b73c8336b8bf6fc7c37f406af8d3d80..c283928b1a7b307cbcaca1188d05a10b269d3165 100644 (file)
@@ -161,7 +161,7 @@ libxfs_getsb(
        return bp;
 }
 
-struct kmem_cache                      *xfs_buf_zone;
+struct kmem_cache                      *xfs_buf_cache;
 
 static struct cache_mru                xfs_buf_freelist =
        {{&xfs_buf_freelist.cm_list, &xfs_buf_freelist.cm_list},
@@ -327,7 +327,7 @@ __libxfs_getbufr(int blen)
                        bp->b_maps = NULL;
                }
        } else
-               bp = kmem_cache_zalloc(xfs_buf_zone, 0);
+               bp = kmem_cache_zalloc(xfs_buf_cache, 0);
        pthread_mutex_unlock(&xfs_buf_freelist.cm_mutex);
        bp->b_ops = NULL;
        if (bp->b_flags & LIBXFS_B_DIRTY)
@@ -964,7 +964,7 @@ libxfs_bcache_free(void)
                free(bp->b_addr);
                if (bp->b_maps != &bp->__b_map)
                        free(bp->b_maps);
-               kmem_cache_free(xfs_buf_zone, bp);
+               kmem_cache_free(xfs_buf_cache, bp);
        }
 }
 
@@ -1056,8 +1056,8 @@ xfs_verify_magic16(
  * Inode cache stubs.
  */
 
-struct kmem_cache              *xfs_inode_zone;
-extern struct kmem_cache       *xfs_ili_zone;
+struct kmem_cache              *xfs_inode_cache;
+extern struct kmem_cache       *xfs_ili_cache;
 
 int
 libxfs_iget(
@@ -1071,7 +1071,7 @@ libxfs_iget(
        struct xfs_buf          *bp;
        int                     error = 0;
 
-       ip = kmem_cache_zalloc(xfs_inode_zone, 0);
+       ip = kmem_cache_zalloc(xfs_inode_cache, 0);
        if (!ip)
                return -ENOMEM;
 
@@ -1101,7 +1101,7 @@ libxfs_iget(
        return 0;
 
 out_destroy:
-       kmem_cache_free(xfs_inode_zone, ip);
+       kmem_cache_free(xfs_inode_cache, ip);
        *ipp = NULL;
        return error;
 }
@@ -1118,11 +1118,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);
        }
 }
 
@@ -1135,7 +1135,7 @@ libxfs_irele(
        if (VFS_I(ip)->i_count == 0) {
                ASSERT(ip->i_itemp == NULL);
                libxfs_idestroy(ip);
-               kmem_cache_free(xfs_inode_zone, ip);
+               kmem_cache_free(xfs_inode_cache, ip);
        }
 }
 
index f87a65c573c920c9e6bbd5e6f4571bc471c0ff99..50d9c23de3e22d370f0a2c0ef19a37c71fd5a18d 100644 (file)
@@ -30,7 +30,7 @@ static int __xfs_trans_commit(struct xfs_trans *tp, bool regrant);
  * Simple transaction interface
  */
 
-struct kmem_cache      *xfs_trans_zone;
+struct kmem_cache      *xfs_trans_cache;
 
 /*
  * Initialize the precomputed transaction reservation values
@@ -124,7 +124,7 @@ static void
 xfs_trans_free(
        struct xfs_trans        *tp)
 {
-       kmem_cache_free(xfs_trans_zone, tp);
+       kmem_cache_free(xfs_trans_cache, tp);
 }
 
 /*
@@ -141,7 +141,7 @@ xfs_trans_dup(
 {
        struct xfs_trans        *ntp;
 
-       ntp = kmem_cache_zalloc(xfs_trans_zone, 0);
+       ntp = kmem_cache_zalloc(xfs_trans_cache, 0);
 
        /*
         * Initialize the new transaction structure.
@@ -259,7 +259,7 @@ libxfs_trans_alloc(
        struct xfs_trans        *tp;
        int                     error;
 
-       tp = kmem_cache_zalloc(xfs_trans_zone, 0);
+       tp = kmem_cache_zalloc(xfs_trans_cache, 0);
        tp->t_mountp = mp;
        INIT_LIST_HEAD(&tp->t_items);
        INIT_LIST_HEAD(&tp->t_dfops);
@@ -354,7 +354,7 @@ xfs_buf_item_put(
        struct xfs_buf          *bp = bip->bli_buf;
 
        bp->b_log_item = NULL;
-       kmem_cache_free(xfs_buf_item_zone, bip);
+       kmem_cache_free(xfs_buf_item_cache, bip);
 }
 
 /* from xfs_trans_buf.c */
@@ -816,7 +816,7 @@ xfs_inode_item_put(
        ip->i_itemp = NULL;
 
        list_del_init(&iip->ili_item.li_bio_list);
-       kmem_cache_free(xfs_ili_zone, iip);
+       kmem_cache_free(xfs_ili_cache, iip);
 }
 
 
@@ -868,7 +868,7 @@ buf_item_done(
 {
        struct xfs_buf          *bp;
        int                     hold;
-       extern struct kmem_cache        *xfs_buf_item_zone;
+       extern struct kmem_cache        *xfs_buf_item_cache;
 
        bp = bip->bli_buf;
        ASSERT(bp != NULL);
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);