From 876a4fb3540bc66542c2b3632f967552b4c5bd4d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 31 Jan 2004 12:29:35 +1100 Subject: [PATCH] [XFS] Don't fail pagebuf allocations SGI Modid: xfs-linux:xfs-kern:165648a --- fs/xfs/linux/xfs_buf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/xfs/linux/xfs_buf.c b/fs/xfs/linux/xfs_buf.c index a6c09faca0b09..07edfd5247851 100644 --- a/fs/xfs/linux/xfs_buf.c +++ b/fs/xfs/linux/xfs_buf.c @@ -193,10 +193,14 @@ EXPORT_SYMBOL(pagebuf_trace_buf); (((flags) & PBF_READ_AHEAD) ? GFP_READAHEAD : \ ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) +#define pb_to_km(flags) \ + (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP) + + #define pagebuf_allocate(flags) \ - kmem_cache_alloc(pagebuf_cache, pb_to_gfp(flags)) + kmem_zone_alloc(pagebuf_cache, pb_to_km(flags)) #define pagebuf_deallocate(pb) \ - kmem_cache_free(pagebuf_cache, (pb)); + kmem_zone_free(pagebuf_cache, (pb)); /* * Pagebuf hashing -- 2.53.0