diff options
author | Brian Behlendorf <[email protected]> | 2009-12-23 12:57:10 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-12-23 12:57:10 -0800 |
commit | ef1c7a069131512458be75aae1e4857fcd8f133b (patch) | |
tree | 3c80cec225cb181bde7032eec33d6f6c20b9e701 /module/spl/spl-kmem.c | |
parent | 641bebe35f0675489357fd2db5d20e1bfc055648 (diff) |
Strip __GFP_ZERO from kmalloc it is not available for older kernels.
This is needed to avoid a BUG_ON() on RHEL5.4 kernel 2.6.18-164.6.1,
since __GFP_ZERO is not a valid flag for kmalloc().
Diffstat (limited to 'module/spl/spl-kmem.c')
-rw-r--r-- | module/spl/spl-kmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index 64498ee5d..f87d2b55a 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -505,7 +505,8 @@ vmem_alloc_track(size_t size, int flags, const char *func, int line) ASSERT(flags & KM_SLEEP); - dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), flags); + dptr = (kmem_debug_t *) kmalloc_nofail(sizeof(kmem_debug_t), + flags & ~__GFP_ZERO); if (dptr == NULL) { CWARN("vmem_alloc(%ld, 0x%x) debug failed\n", sizeof(kmem_debug_t), flags); |