forked from Minki/linux
xfs: remove kmem_zone typedef
Remove these typedefs by referencing kmem_cache directly. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
This commit is contained in:
parent
9fa47bdcd3
commit
e7720afad0
@ -72,10 +72,6 @@ kmem_zalloc(size_t size, xfs_km_flags_t flags)
|
||||
/*
|
||||
* Zone interfaces
|
||||
*/
|
||||
|
||||
#define kmem_zone kmem_cache
|
||||
#define kmem_zone_t struct kmem_cache
|
||||
|
||||
static inline struct page *
|
||||
kmem_to_page(void *addr)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "xfs_ag_resv.h"
|
||||
#include "xfs_bmap.h"
|
||||
|
||||
extern kmem_zone_t *xfs_bmap_free_item_zone;
|
||||
extern struct kmem_cache *xfs_bmap_free_item_zone;
|
||||
|
||||
struct workqueue_struct *xfs_alloc_wq;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "xfs_trans.h"
|
||||
#include "xfs_ag.h"
|
||||
|
||||
static kmem_zone_t *xfs_allocbt_cur_cache;
|
||||
static struct kmem_cache *xfs_allocbt_cur_cache;
|
||||
|
||||
STATIC struct xfs_btree_cur *
|
||||
xfs_allocbt_dup_cursor(
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "xfs_iomap.h"
|
||||
|
||||
|
||||
kmem_zone_t *xfs_bmap_free_item_zone;
|
||||
struct kmem_cache *xfs_bmap_free_item_zone;
|
||||
|
||||
/*
|
||||
* Miscellaneous helper functions
|
||||
|
@ -13,7 +13,7 @@ struct xfs_inode;
|
||||
struct xfs_mount;
|
||||
struct xfs_trans;
|
||||
|
||||
extern kmem_zone_t *xfs_bmap_free_item_zone;
|
||||
extern struct kmem_cache *xfs_bmap_free_item_zone;
|
||||
|
||||
/*
|
||||
* Argument structure for xfs_bmap_alloc.
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "xfs_trace.h"
|
||||
#include "xfs_rmap.h"
|
||||
|
||||
static kmem_zone_t *xfs_bmbt_cur_cache;
|
||||
static struct kmem_cache *xfs_bmbt_cur_cache;
|
||||
|
||||
/*
|
||||
* Convert on-disk form of btree root to in-memory form.
|
||||
|
@ -230,7 +230,7 @@ struct xfs_btree_cur
|
||||
struct xfs_trans *bc_tp; /* transaction we're in, if any */
|
||||
struct xfs_mount *bc_mp; /* file system mount struct */
|
||||
const struct xfs_btree_ops *bc_ops;
|
||||
kmem_zone_t *bc_cache; /* cursor cache */
|
||||
struct kmem_cache *bc_cache; /* cursor cache */
|
||||
unsigned int bc_flags; /* btree features - below */
|
||||
xfs_btnum_t bc_btnum; /* identifies which btree type */
|
||||
union xfs_btree_irec bc_rec; /* current insert/search record value */
|
||||
@ -586,7 +586,7 @@ xfs_btree_alloc_cursor(
|
||||
struct xfs_trans *tp,
|
||||
xfs_btnum_t btnum,
|
||||
uint8_t maxlevels,
|
||||
kmem_zone_t *cache)
|
||||
struct kmem_cache *cache)
|
||||
{
|
||||
struct xfs_btree_cur *cur;
|
||||
|
||||
|
@ -72,7 +72,7 @@ STATIC int xfs_da3_blk_unlink(xfs_da_state_t *state,
|
||||
xfs_da_state_blk_t *save_blk);
|
||||
|
||||
|
||||
kmem_zone_t *xfs_da_state_zone; /* anchor for state struct zone */
|
||||
struct kmem_cache *xfs_da_state_zone; /* anchor for state struct zone */
|
||||
|
||||
/*
|
||||
* Allocate a dir-state structure.
|
||||
|
@ -227,6 +227,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_zone *xfs_da_state_zone;
|
||||
extern struct kmem_cache *xfs_da_state_zone;
|
||||
|
||||
#endif /* __XFS_DA_BTREE_H__ */
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "xfs_rmap.h"
|
||||
#include "xfs_ag.h"
|
||||
|
||||
static kmem_zone_t *xfs_inobt_cur_cache;
|
||||
static struct kmem_cache *xfs_inobt_cur_cache;
|
||||
|
||||
STATIC int
|
||||
xfs_inobt_get_minrecs(
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "xfs_types.h"
|
||||
#include "xfs_errortag.h"
|
||||
|
||||
kmem_zone_t *xfs_ifork_zone;
|
||||
struct kmem_cache *xfs_ifork_zone;
|
||||
|
||||
void
|
||||
xfs_init_local_fork(
|
||||
|
@ -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_zone *xfs_ifork_zone;
|
||||
extern struct kmem_cache *xfs_ifork_zone;
|
||||
|
||||
extern void xfs_ifork_init_cow(struct xfs_inode *ip);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "xfs_rmap.h"
|
||||
#include "xfs_ag.h"
|
||||
|
||||
static kmem_zone_t *xfs_refcountbt_cur_cache;
|
||||
static struct kmem_cache *xfs_refcountbt_cur_cache;
|
||||
|
||||
static struct xfs_btree_cur *
|
||||
xfs_refcountbt_dup_cursor(
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "xfs_ag.h"
|
||||
#include "xfs_ag_resv.h"
|
||||
|
||||
static kmem_zone_t *xfs_rmapbt_cur_cache;
|
||||
static struct kmem_cache *xfs_rmapbt_cur_cache;
|
||||
|
||||
/*
|
||||
* Reverse map btree.
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "xfs_log_priv.h"
|
||||
#include "xfs_log_recover.h"
|
||||
|
||||
kmem_zone_t *xfs_bui_zone;
|
||||
kmem_zone_t *xfs_bud_zone;
|
||||
struct kmem_cache *xfs_bui_zone;
|
||||
struct kmem_cache *xfs_bud_zone;
|
||||
|
||||
static const struct xfs_item_ops xfs_bui_item_ops;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
/* kernel only BUI/BUD definitions */
|
||||
|
||||
struct xfs_mount;
|
||||
struct kmem_zone;
|
||||
struct kmem_cache;
|
||||
|
||||
/*
|
||||
* Max number of extents in fast allocation path.
|
||||
@ -65,7 +65,7 @@ struct xfs_bud_log_item {
|
||||
struct xfs_bud_log_format bud_format;
|
||||
};
|
||||
|
||||
extern struct kmem_zone *xfs_bui_zone;
|
||||
extern struct kmem_zone *xfs_bud_zone;
|
||||
extern struct kmem_cache *xfs_bui_zone;
|
||||
extern struct kmem_cache *xfs_bud_zone;
|
||||
|
||||
#endif /* __XFS_BMAP_ITEM_H__ */
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "xfs_error.h"
|
||||
#include "xfs_ag.h"
|
||||
|
||||
static kmem_zone_t *xfs_buf_zone;
|
||||
static struct kmem_cache *xfs_buf_zone;
|
||||
|
||||
/*
|
||||
* Locking orders
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "xfs_log.h"
|
||||
|
||||
|
||||
kmem_zone_t *xfs_buf_item_zone;
|
||||
struct kmem_cache *xfs_buf_item_zone;
|
||||
|
||||
static inline struct xfs_buf_log_item *BUF_ITEM(struct xfs_log_item *lip)
|
||||
{
|
||||
|
@ -71,6 +71,6 @@ static inline void xfs_buf_dquot_io_fail(struct xfs_buf *bp)
|
||||
void xfs_buf_iodone(struct xfs_buf *);
|
||||
bool xfs_buf_log_check_iovec(struct xfs_log_iovec *iovec);
|
||||
|
||||
extern kmem_zone_t *xfs_buf_item_zone;
|
||||
extern struct kmem_cache *xfs_buf_item_zone;
|
||||
|
||||
#endif /* __XFS_BUF_ITEM_H__ */
|
||||
|
@ -38,8 +38,8 @@
|
||||
* otherwise by the lowest id first, see xfs_dqlock2.
|
||||
*/
|
||||
|
||||
struct kmem_zone *xfs_qm_dqtrxzone;
|
||||
static struct kmem_zone *xfs_qm_dqzone;
|
||||
struct kmem_cache *xfs_qm_dqtrxzone;
|
||||
static struct kmem_cache *xfs_qm_dqzone;
|
||||
|
||||
static struct lock_class_key xfs_dquot_group_class;
|
||||
static struct lock_class_key xfs_dquot_project_class;
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "xfs_log_priv.h"
|
||||
#include "xfs_log_recover.h"
|
||||
|
||||
kmem_zone_t *xfs_efi_zone;
|
||||
kmem_zone_t *xfs_efd_zone;
|
||||
struct kmem_cache *xfs_efi_zone;
|
||||
struct kmem_cache *xfs_efd_zone;
|
||||
|
||||
static const struct xfs_item_ops xfs_efi_item_ops;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
/* kernel only EFI/EFD definitions */
|
||||
|
||||
struct xfs_mount;
|
||||
struct kmem_zone;
|
||||
struct kmem_cache;
|
||||
|
||||
/*
|
||||
* Max number of extents in fast allocation path.
|
||||
@ -69,7 +69,7 @@ struct xfs_efd_log_item {
|
||||
*/
|
||||
#define XFS_EFD_MAX_FAST_EXTENTS 16
|
||||
|
||||
extern struct kmem_zone *xfs_efi_zone;
|
||||
extern struct kmem_zone *xfs_efd_zone;
|
||||
extern struct kmem_cache *xfs_efi_zone;
|
||||
extern struct kmem_cache *xfs_efd_zone;
|
||||
|
||||
#endif /* __XFS_EXTFREE_ITEM_H__ */
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "xfs_ialloc.h"
|
||||
#include "xfs_trace.h"
|
||||
|
||||
kmem_zone_t *xfs_icreate_zone; /* inode create item zone */
|
||||
struct kmem_cache *xfs_icreate_zone; /* inode create item zone */
|
||||
|
||||
static inline struct xfs_icreate_item *ICR_ITEM(struct xfs_log_item *lip)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ struct xfs_icreate_item {
|
||||
struct xfs_icreate_log ic_format;
|
||||
};
|
||||
|
||||
extern kmem_zone_t *xfs_icreate_zone; /* inode create item zone */
|
||||
extern struct kmem_cache *xfs_icreate_zone; /* inode create item zone */
|
||||
|
||||
void xfs_icreate_log(struct xfs_trans *tp, xfs_agnumber_t agno,
|
||||
xfs_agblock_t agbno, unsigned int count,
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "xfs_reflink.h"
|
||||
#include "xfs_ag.h"
|
||||
|
||||
kmem_zone_t *xfs_inode_zone;
|
||||
struct kmem_cache *xfs_inode_zone;
|
||||
|
||||
/*
|
||||
* Used in xfs_itruncate_extents(). This is the maximum number of extents
|
||||
|
@ -504,7 +504,7 @@ static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
|
||||
|
||||
void xfs_irele(struct xfs_inode *ip);
|
||||
|
||||
extern struct kmem_zone *xfs_inode_zone;
|
||||
extern struct kmem_cache *xfs_inode_zone;
|
||||
|
||||
/* The default CoW extent size hint. */
|
||||
#define XFS_DEFAULT_COWEXTSZ_HINT 32
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <linux/iversion.h>
|
||||
|
||||
kmem_zone_t *xfs_ili_zone; /* inode log item zone */
|
||||
struct kmem_cache *xfs_ili_zone; /* inode log item zone */
|
||||
|
||||
static inline struct xfs_inode_log_item *INODE_ITEM(struct xfs_log_item *lip)
|
||||
{
|
||||
|
@ -47,6 +47,6 @@ extern void xfs_iflush_abort(struct xfs_inode *);
|
||||
extern int xfs_inode_item_format_convert(xfs_log_iovec_t *,
|
||||
struct xfs_inode_log_format *);
|
||||
|
||||
extern struct kmem_zone *xfs_ili_zone;
|
||||
extern struct kmem_cache *xfs_ili_zone;
|
||||
|
||||
#endif /* __XFS_INODE_ITEM_H__ */
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "xfs_sb.h"
|
||||
#include "xfs_health.h"
|
||||
|
||||
kmem_zone_t *xfs_log_ticket_zone;
|
||||
struct kmem_cache *xfs_log_ticket_zone;
|
||||
|
||||
/* Local miscellaneous function prototypes */
|
||||
STATIC struct xlog *
|
||||
|
@ -497,7 +497,7 @@ xlog_recover_cancel(struct xlog *);
|
||||
extern __le32 xlog_cksum(struct xlog *log, struct xlog_rec_header *rhead,
|
||||
char *dp, int size);
|
||||
|
||||
extern kmem_zone_t *xfs_log_ticket_zone;
|
||||
extern struct kmem_cache *xfs_log_ticket_zone;
|
||||
struct xlog_ticket *
|
||||
xlog_ticket_alloc(
|
||||
struct xlog *log,
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
struct xfs_inode;
|
||||
|
||||
extern struct kmem_zone *xfs_qm_dqtrxzone;
|
||||
extern struct kmem_cache *xfs_qm_dqtrxzone;
|
||||
|
||||
/*
|
||||
* Number of bmaps that we ask from bmapi when doing a quotacheck.
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "xfs_log_priv.h"
|
||||
#include "xfs_log_recover.h"
|
||||
|
||||
kmem_zone_t *xfs_cui_zone;
|
||||
kmem_zone_t *xfs_cud_zone;
|
||||
struct kmem_cache *xfs_cui_zone;
|
||||
struct kmem_cache *xfs_cud_zone;
|
||||
|
||||
static const struct xfs_item_ops xfs_cui_item_ops;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
/* kernel only CUI/CUD definitions */
|
||||
|
||||
struct xfs_mount;
|
||||
struct kmem_zone;
|
||||
struct kmem_cache;
|
||||
|
||||
/*
|
||||
* Max number of extents in fast allocation path.
|
||||
@ -68,7 +68,7 @@ struct xfs_cud_log_item {
|
||||
struct xfs_cud_log_format cud_format;
|
||||
};
|
||||
|
||||
extern struct kmem_zone *xfs_cui_zone;
|
||||
extern struct kmem_zone *xfs_cud_zone;
|
||||
extern struct kmem_cache *xfs_cui_zone;
|
||||
extern struct kmem_cache *xfs_cud_zone;
|
||||
|
||||
#endif /* __XFS_REFCOUNT_ITEM_H__ */
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "xfs_log_priv.h"
|
||||
#include "xfs_log_recover.h"
|
||||
|
||||
kmem_zone_t *xfs_rui_zone;
|
||||
kmem_zone_t *xfs_rud_zone;
|
||||
struct kmem_cache *xfs_rui_zone;
|
||||
struct kmem_cache *xfs_rud_zone;
|
||||
|
||||
static const struct xfs_item_ops xfs_rui_item_ops;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
/* kernel only RUI/RUD definitions */
|
||||
|
||||
struct xfs_mount;
|
||||
struct kmem_zone;
|
||||
struct kmem_cache;
|
||||
|
||||
/*
|
||||
* Max number of extents in fast allocation path.
|
||||
@ -68,7 +68,7 @@ struct xfs_rud_log_item {
|
||||
struct xfs_rud_log_format rud_format;
|
||||
};
|
||||
|
||||
extern struct kmem_zone *xfs_rui_zone;
|
||||
extern struct kmem_zone *xfs_rud_zone;
|
||||
extern struct kmem_cache *xfs_rui_zone;
|
||||
extern struct kmem_cache *xfs_rud_zone;
|
||||
|
||||
#endif /* __XFS_RMAP_ITEM_H__ */
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "xfs_dquot.h"
|
||||
#include "xfs_icache.h"
|
||||
|
||||
kmem_zone_t *xfs_trans_zone;
|
||||
struct kmem_cache *xfs_trans_zone;
|
||||
|
||||
#if defined(CONFIG_TRACEPOINTS)
|
||||
static void
|
||||
|
@ -237,7 +237,7 @@ void xfs_trans_buf_set_type(struct xfs_trans *, struct xfs_buf *,
|
||||
void xfs_trans_buf_copy_type(struct xfs_buf *dst_bp,
|
||||
struct xfs_buf *src_bp);
|
||||
|
||||
extern kmem_zone_t *xfs_trans_zone;
|
||||
extern struct kmem_cache *xfs_trans_zone;
|
||||
|
||||
static inline struct xfs_log_item *
|
||||
xfs_trans_item_relog(
|
||||
|
Loading…
Reference in New Issue
Block a user