diff options
author | Hugh Dickins <hugh@veritas.com> | 2007-01-05 19:36:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 02:55:23 -0500 |
commit | b6a60451813bad6a9f57cb159004c3b3e12a1cd3 (patch) | |
tree | 643ae50ba5a1745950eac093e86072473a3d10ca | |
parent | be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8 (diff) |
[PATCH] fix BUG_ON(!PageSlab) from fallback_alloc
pdflush hit the BUG_ON(!PageSlab(page)) in kmem_freepages called from
fallback_alloc: cache_grow already freed those pages when alloc_slabmgmt
failed. But it wouldn't have freed them if __GFP_NO_GROW, so make sure
fallback_alloc doesn't waste its time on that case.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Pekka J Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | mm/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3281,7 +3281,7 @@ retry: | |||
3281 | flags | GFP_THISNODE, nid); | 3281 | flags | GFP_THISNODE, nid); |
3282 | } | 3282 | } |
3283 | 3283 | ||
3284 | if (!obj) { | 3284 | if (!obj && !(flags & __GFP_NO_GROW)) { |
3285 | /* | 3285 | /* |
3286 | * This allocation will be performed within the constraints | 3286 | * This allocation will be performed within the constraints |
3287 | * of the current cpuset / memory policy requirements. | 3287 | * of the current cpuset / memory policy requirements. |
@@ -3310,7 +3310,7 @@ retry: | |||
3310 | */ | 3310 | */ |
3311 | goto retry; | 3311 | goto retry; |
3312 | } else { | 3312 | } else { |
3313 | kmem_freepages(cache, obj); | 3313 | /* cache_grow already freed obj */ |
3314 | obj = NULL; | 3314 | obj = NULL; |
3315 | } | 3315 | } |
3316 | } | 3316 | } |