Skip to content

Commit e7720af

Browse files
author
Darrick J. Wong
committed
xfs: remove kmem_zone typedef
Remove these typedefs by referencing kmem_cache directly. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Chandan Babu R <[email protected]>
1 parent 9fa47bd commit e7720af

37 files changed

+50
-54
lines changed

fs/xfs/kmem.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ kmem_zalloc(size_t size, xfs_km_flags_t flags)
7272
/*
7373
* Zone interfaces
7474
*/
75-
76-
#define kmem_zone kmem_cache
77-
#define kmem_zone_t struct kmem_cache
78-
7975
static inline struct page *
8076
kmem_to_page(void *addr)
8177
{

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 1 addition & 1 deletion
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 kmem_zone_t *xfs_bmap_free_item_zone;
30+
extern struct kmem_cache *xfs_bmap_free_item_zone;
3131

3232
struct workqueue_struct *xfs_alloc_wq;
3333

fs/xfs/libxfs/xfs_alloc_btree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "xfs_trans.h"
2121
#include "xfs_ag.h"
2222

23-
static kmem_zone_t *xfs_allocbt_cur_cache;
23+
static struct kmem_cache *xfs_allocbt_cur_cache;
2424

2525
STATIC struct xfs_btree_cur *
2626
xfs_allocbt_dup_cursor(

fs/xfs/libxfs/xfs_bmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#include "xfs_iomap.h"
3939

4040

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

4343
/*
4444
* Miscellaneous helper functions

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 kmem_zone_t *xfs_bmap_free_item_zone;
16+
extern struct kmem_cache *xfs_bmap_free_item_zone;
1717

1818
/*
1919
* Argument structure for xfs_bmap_alloc.

fs/xfs/libxfs/xfs_bmap_btree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "xfs_trace.h"
2323
#include "xfs_rmap.h"
2424

25-
static kmem_zone_t *xfs_bmbt_cur_cache;
25+
static struct kmem_cache *xfs_bmbt_cur_cache;
2626

2727
/*
2828
* Convert on-disk form of btree root to in-memory form.

fs/xfs/libxfs/xfs_btree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ struct xfs_btree_cur
230230
struct xfs_trans *bc_tp; /* transaction we're in, if any */
231231
struct xfs_mount *bc_mp; /* file system mount struct */
232232
const struct xfs_btree_ops *bc_ops;
233-
kmem_zone_t *bc_cache; /* cursor cache */
233+
struct kmem_cache *bc_cache; /* cursor cache */
234234
unsigned int bc_flags; /* btree features - below */
235235
xfs_btnum_t bc_btnum; /* identifies which btree type */
236236
union xfs_btree_irec bc_rec; /* current insert/search record value */
@@ -586,7 +586,7 @@ xfs_btree_alloc_cursor(
586586
struct xfs_trans *tp,
587587
xfs_btnum_t btnum,
588588
uint8_t maxlevels,
589-
kmem_zone_t *cache)
589+
struct kmem_cache *cache)
590590
{
591591
struct xfs_btree_cur *cur;
592592

fs/xfs/libxfs/xfs_da_btree.c

Lines changed: 1 addition & 1 deletion
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-
kmem_zone_t *xfs_da_state_zone; /* anchor for state struct zone */
75+
struct kmem_cache *xfs_da_state_zone; /* anchor for state struct zone */
7676

7777
/*
7878
* Allocate a dir-state structure.

fs/xfs/libxfs/xfs_da_btree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,6 @@ void xfs_da3_node_hdr_from_disk(struct xfs_mount *mp,
227227
void xfs_da3_node_hdr_to_disk(struct xfs_mount *mp,
228228
struct xfs_da_intnode *to, struct xfs_da3_icnode_hdr *from);
229229

230-
extern struct kmem_zone *xfs_da_state_zone;
230+
extern struct kmem_cache *xfs_da_state_zone;
231231

232232
#endif /* __XFS_DA_BTREE_H__ */

fs/xfs/libxfs/xfs_ialloc_btree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "xfs_rmap.h"
2323
#include "xfs_ag.h"
2424

25-
static kmem_zone_t *xfs_inobt_cur_cache;
25+
static struct kmem_cache *xfs_inobt_cur_cache;
2626

2727
STATIC int
2828
xfs_inobt_get_minrecs(

0 commit comments

Comments
 (0)