From: alex Date: Mon, 17 Nov 2003 17:32:56 +0000 (+0000) Subject: - lustre patch of b1933 X-Git-Tag: v1_7_0_51~2^7~224 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b33061ca700cc1abe6bb6823df86c79291e301bf;p=fs%2Flustre-release.git - lustre patch of b1933 NOTE: don't forget to apply gfp_memalloc patche first --- diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index 138643f..14be8aa 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -285,7 +285,7 @@ do { \ if ((size) > PORTAL_VMALLOC_SIZE) \ (ptr) = vmalloc(size); \ else \ - (ptr) = kmalloc((size), GFP_NOFS); \ + (ptr) = kmalloc((size), (GFP_KERNEL | GFP_MEMALLOC)); \ if ((ptr) == NULL) \ CERROR("PORTALS: out of memory at %s:%d (tried to alloc '"\ #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));\ @@ -317,7 +317,7 @@ do { \ #define PORTAL_SLAB_ALLOC(ptr, slab, size) \ do { \ LASSERT(!in_interrupt()); \ - (ptr) = kmem_cache_alloc((slab), SLAB_KERNEL); \ + (ptr) = kmem_cache_alloc((slab), (SLAB_KERNEL | SLAB_MEMALLOC)); \ if ((ptr) == NULL) { \ CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \ " '" #ptr "' from slab '" #slab "')\n", __FILE__, \ diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index 138643f..14be8aa 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -285,7 +285,7 @@ do { \ if ((size) > PORTAL_VMALLOC_SIZE) \ (ptr) = vmalloc(size); \ else \ - (ptr) = kmalloc((size), GFP_NOFS); \ + (ptr) = kmalloc((size), (GFP_KERNEL | GFP_MEMALLOC)); \ if ((ptr) == NULL) \ CERROR("PORTALS: out of memory at %s:%d (tried to alloc '"\ #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));\ @@ -317,7 +317,7 @@ do { \ #define PORTAL_SLAB_ALLOC(ptr, slab, size) \ do { \ LASSERT(!in_interrupt()); \ - (ptr) = kmem_cache_alloc((slab), SLAB_KERNEL); \ + (ptr) = kmem_cache_alloc((slab), (SLAB_KERNEL | SLAB_MEMALLOC)); \ if ((ptr) == NULL) { \ CERROR("PORTALS: out of memory at %s:%d (tried to alloc" \ " '" #ptr "' from slab '" #slab "')\n", __FILE__, \