Skip to content

Commit bae633a

Browse files
cmaiolinodjwong
authored andcommitted
xfs: remove xfs_zone_{alloc,zalloc} helpers
All their users have been converted to use MM API directly, no need to keep them around anymore. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]>
1 parent ca4f258 commit bae633a

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

fs/xfs/kmem.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,24 +115,3 @@ kmem_realloc(const void *old, size_t newsize, xfs_km_flags_t flags)
115115
congestion_wait(BLK_RW_ASYNC, HZ/50);
116116
} while (1);
117117
}
118-
119-
void *
120-
kmem_zone_alloc(kmem_zone_t *zone, xfs_km_flags_t flags)
121-
{
122-
int retries = 0;
123-
gfp_t lflags = kmem_flags_convert(flags);
124-
void *ptr;
125-
126-
trace_kmem_zone_alloc(kmem_cache_size(zone), flags, _RET_IP_);
127-
do {
128-
ptr = kmem_cache_alloc(zone, lflags);
129-
if (ptr || (flags & KM_MAYFAIL))
130-
return ptr;
131-
if (!(++retries % 100))
132-
xfs_err(NULL,
133-
"%s(%u) possible memory allocation deadlock in %s (mode:0x%x)",
134-
current->comm, current->pid,
135-
__func__, lflags);
136-
congestion_wait(BLK_RW_ASYNC, HZ/50);
137-
} while (1);
138-
}

fs/xfs/kmem.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ kmem_zalloc_large(size_t size, xfs_km_flags_t flags)
8585
#define kmem_zone kmem_cache
8686
#define kmem_zone_t struct kmem_cache
8787

88-
extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t);
89-
90-
static inline void *
91-
kmem_zone_zalloc(kmem_zone_t *zone, xfs_km_flags_t flags)
92-
{
93-
return kmem_zone_alloc(zone, flags | KM_ZERO);
94-
}
95-
9688
static inline struct page *
9789
kmem_to_page(void *addr)
9890
{

fs/xfs/xfs_trace.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3677,7 +3677,6 @@ DEFINE_KMEM_EVENT(kmem_alloc);
36773677
DEFINE_KMEM_EVENT(kmem_alloc_io);
36783678
DEFINE_KMEM_EVENT(kmem_alloc_large);
36793679
DEFINE_KMEM_EVENT(kmem_realloc);
3680-
DEFINE_KMEM_EVENT(kmem_zone_alloc);
36813680

36823681
TRACE_EVENT(xfs_check_new_dalign,
36833682
TP_PROTO(struct xfs_mount *mp, int new_dalign, xfs_ino_t calc_rootino),

0 commit comments

Comments
 (0)