Skip to content

Commit 182696f

Browse files
author
Darrick J. Wong
committed
xfs: rename _zone variables to _cache
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 <[email protected]> Reviewed-by: Chandan Babu R <[email protected]>
1 parent e7720af commit 182696f

36 files changed

+215
-216
lines changed

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "xfs_ag_resv.h"
2828
#include "xfs_bmap.h"
2929

30-
extern struct kmem_cache *xfs_bmap_free_item_zone;
30+
extern struct kmem_cache *xfs_bmap_free_item_cache;
3131

3232
struct workqueue_struct *xfs_alloc_wq;
3333

@@ -2459,10 +2459,10 @@ xfs_defer_agfl_block(
24592459
struct xfs_mount *mp = tp->t_mountp;
24602460
struct xfs_extent_free_item *new; /* new element */
24612461

2462-
ASSERT(xfs_bmap_free_item_zone != NULL);
2462+
ASSERT(xfs_bmap_free_item_cache != NULL);
24632463
ASSERT(oinfo != NULL);
24642464

2465-
new = kmem_cache_alloc(xfs_bmap_free_item_zone,
2465+
new = kmem_cache_alloc(xfs_bmap_free_item_cache,
24662466
GFP_KERNEL | __GFP_NOFAIL);
24672467
new->xefi_startblock = XFS_AGB_TO_FSB(mp, agno, agbno);
24682468
new->xefi_blockcount = 1;

fs/xfs/libxfs/xfs_attr_leaf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ xfs_attr_fork_remove(
770770
ASSERT(ip->i_afp->if_nextents == 0);
771771

772772
xfs_idestroy_fork(ip->i_afp);
773-
kmem_cache_free(xfs_ifork_zone, ip->i_afp);
773+
kmem_cache_free(xfs_ifork_cache, ip->i_afp);
774774
ip->i_afp = NULL;
775775
ip->i_forkoff = 0;
776776
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "xfs_iomap.h"
3939

4040

41-
struct kmem_cache *xfs_bmap_free_item_zone;
41+
struct kmem_cache *xfs_bmap_free_item_cache;
4242

4343
/*
4444
* Miscellaneous helper functions
@@ -555,9 +555,9 @@ __xfs_bmap_add_free(
555555
ASSERT(len < mp->m_sb.sb_agblocks);
556556
ASSERT(agbno + len <= mp->m_sb.sb_agblocks);
557557
#endif
558-
ASSERT(xfs_bmap_free_item_zone != NULL);
558+
ASSERT(xfs_bmap_free_item_cache != NULL);
559559

560-
new = kmem_cache_alloc(xfs_bmap_free_item_zone,
560+
new = kmem_cache_alloc(xfs_bmap_free_item_cache,
561561
GFP_KERNEL | __GFP_NOFAIL);
562562
new->xefi_startblock = bno;
563563
new->xefi_blockcount = (xfs_extlen_t)len;

fs/xfs/libxfs/xfs_bmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct xfs_inode;
1313
struct xfs_mount;
1414
struct xfs_trans;
1515

16-
extern struct kmem_cache *xfs_bmap_free_item_zone;
16+
extern struct kmem_cache *xfs_bmap_free_item_cache;
1717

1818
/*
1919
* Argument structure for xfs_bmap_alloc.

fs/xfs/libxfs/xfs_da_btree.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ STATIC int xfs_da3_blk_unlink(xfs_da_state_t *state,
7272
xfs_da_state_blk_t *save_blk);
7373

7474

75-
struct kmem_cache *xfs_da_state_zone; /* anchor for state struct zone */
75+
struct kmem_cache *xfs_da_state_cache; /* anchor for dir/attr state */
7676

7777
/*
7878
* Allocate a dir-state structure.
@@ -84,7 +84,7 @@ xfs_da_state_alloc(
8484
{
8585
struct xfs_da_state *state;
8686

87-
state = kmem_cache_zalloc(xfs_da_state_zone, GFP_NOFS | __GFP_NOFAIL);
87+
state = kmem_cache_zalloc(xfs_da_state_cache, GFP_NOFS | __GFP_NOFAIL);
8888
state->args = args;
8989
state->mp = args->dp->i_mount;
9090
return state;
@@ -113,7 +113,7 @@ xfs_da_state_free(xfs_da_state_t *state)
113113
#ifdef DEBUG
114114
memset((char *)state, 0, sizeof(*state));
115115
#endif /* DEBUG */
116-
kmem_cache_free(xfs_da_state_zone, state);
116+
kmem_cache_free(xfs_da_state_cache, state);
117117
}
118118

119119
static inline int xfs_dabuf_nfsb(struct xfs_mount *mp, int whichfork)

fs/xfs/libxfs/xfs_da_btree.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
struct xfs_inode;
1111
struct xfs_trans;
12-
struct zone;
1312

1413
/*
1514
* 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,
227226
void xfs_da3_node_hdr_to_disk(struct xfs_mount *mp,
228227
struct xfs_da_intnode *to, struct xfs_da3_icnode_hdr *from);
229228

230-
extern struct kmem_cache *xfs_da_state_zone;
229+
extern struct kmem_cache *xfs_da_state_cache;
231230

232231
#endif /* __XFS_DA_BTREE_H__ */

fs/xfs/libxfs/xfs_inode_fork.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "xfs_types.h"
2727
#include "xfs_errortag.h"
2828

29-
struct kmem_cache *xfs_ifork_zone;
29+
struct kmem_cache *xfs_ifork_cache;
3030

3131
void
3232
xfs_init_local_fork(
@@ -284,7 +284,7 @@ xfs_ifork_alloc(
284284
{
285285
struct xfs_ifork *ifp;
286286

287-
ifp = kmem_cache_zalloc(xfs_ifork_zone, GFP_NOFS | __GFP_NOFAIL);
287+
ifp = kmem_cache_zalloc(xfs_ifork_cache, GFP_NOFS | __GFP_NOFAIL);
288288
ifp->if_format = format;
289289
ifp->if_nextents = nextents;
290290
return ifp;
@@ -325,7 +325,7 @@ xfs_iformat_attr_fork(
325325
}
326326

327327
if (error) {
328-
kmem_cache_free(xfs_ifork_zone, ip->i_afp);
328+
kmem_cache_free(xfs_ifork_cache, ip->i_afp);
329329
ip->i_afp = NULL;
330330
}
331331
return error;
@@ -676,7 +676,7 @@ xfs_ifork_init_cow(
676676
if (ip->i_cowfp)
677677
return;
678678

679-
ip->i_cowfp = kmem_cache_zalloc(xfs_ifork_zone,
679+
ip->i_cowfp = kmem_cache_zalloc(xfs_ifork_cache,
680680
GFP_NOFS | __GFP_NOFAIL);
681681
ip->i_cowfp->if_format = XFS_DINODE_FMT_EXTENTS;
682682
}

fs/xfs/libxfs/xfs_inode_fork.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static inline bool xfs_iext_peek_prev_extent(struct xfs_ifork *ifp,
221221
xfs_iext_get_extent((ifp), (ext), (got)); \
222222
xfs_iext_next((ifp), (ext)))
223223

224-
extern struct kmem_cache *xfs_ifork_zone;
224+
extern struct kmem_cache *xfs_ifork_cache;
225225

226226
extern void xfs_ifork_init_cow(struct xfs_inode *ip);
227227

fs/xfs/xfs_attr_inactive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ xfs_attr_inactive(
390390
/* kill the in-core attr fork before we drop the inode lock */
391391
if (dp->i_afp) {
392392
xfs_idestroy_fork(dp->i_afp);
393-
kmem_cache_free(xfs_ifork_zone, dp->i_afp);
393+
kmem_cache_free(xfs_ifork_cache, dp->i_afp);
394394
dp->i_afp = NULL;
395395
}
396396
if (lock_mode)

fs/xfs/xfs_bmap_item.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#include "xfs_log_priv.h"
2626
#include "xfs_log_recover.h"
2727

28-
struct kmem_cache *xfs_bui_zone;
29-
struct kmem_cache *xfs_bud_zone;
28+
struct kmem_cache *xfs_bui_cache;
29+
struct kmem_cache *xfs_bud_cache;
3030

3131
static const struct xfs_item_ops xfs_bui_item_ops;
3232

@@ -39,7 +39,7 @@ STATIC void
3939
xfs_bui_item_free(
4040
struct xfs_bui_log_item *buip)
4141
{
42-
kmem_cache_free(xfs_bui_zone, buip);
42+
kmem_cache_free(xfs_bui_cache, buip);
4343
}
4444

4545
/*
@@ -138,7 +138,7 @@ xfs_bui_init(
138138
{
139139
struct xfs_bui_log_item *buip;
140140

141-
buip = kmem_cache_zalloc(xfs_bui_zone, GFP_KERNEL | __GFP_NOFAIL);
141+
buip = kmem_cache_zalloc(xfs_bui_cache, GFP_KERNEL | __GFP_NOFAIL);
142142

143143
xfs_log_item_init(mp, &buip->bui_item, XFS_LI_BUI, &xfs_bui_item_ops);
144144
buip->bui_format.bui_nextents = XFS_BUI_MAX_FAST_EXTENTS;
@@ -198,7 +198,7 @@ xfs_bud_item_release(
198198
struct xfs_bud_log_item *budp = BUD_ITEM(lip);
199199

200200
xfs_bui_release(budp->bud_buip);
201-
kmem_cache_free(xfs_bud_zone, budp);
201+
kmem_cache_free(xfs_bud_cache, budp);
202202
}
203203

204204
static const struct xfs_item_ops xfs_bud_item_ops = {
@@ -215,7 +215,7 @@ xfs_trans_get_bud(
215215
{
216216
struct xfs_bud_log_item *budp;
217217

218-
budp = kmem_cache_zalloc(xfs_bud_zone, GFP_KERNEL | __GFP_NOFAIL);
218+
budp = kmem_cache_zalloc(xfs_bud_cache, GFP_KERNEL | __GFP_NOFAIL);
219219
xfs_log_item_init(tp->t_mountp, &budp->bud_item, XFS_LI_BUD,
220220
&xfs_bud_item_ops);
221221
budp->bud_buip = buip;

0 commit comments

Comments
 (0)