aboutsummaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-10-11 01:21:30 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 11:14:19 -0700
commit9858db504caedb2424b9a32744c23f9a81ec1731 (patch)
tree516b4735df82feb9b14bea4984769e7ac013373d /mm/page_alloc.c
parentdafb13673c463bc2aade4a4819704dde0f5fa37f (diff)
[PATCH] mm: locks_freed fix
Move the lock debug checks below the page reserved checks. Also, having debug_check_no_locks_freed in kernel_map_pages is wrong. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c5caac2c3c5..40db96a655d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -495,15 +495,13 @@ static void __free_pages_ok(struct page *page, unsigned int order)
int i;
int reserved = 0;
- if (!PageHighMem(page))
- debug_check_no_locks_freed(page_address(page),
- PAGE_SIZE<<order);
-
for (i = 0 ; i < (1 << order) ; ++i)
reserved += free_pages_check(page + i);
if (reserved)
return;
+ if (!PageHighMem(page))
+ debug_check_no_locks_freed(page_address(page),PAGE_SIZE<<order);
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
@@ -787,6 +785,8 @@ static void fastcall free_hot_cold_page(struct page *page, int cold)
if (free_pages_check(page))
return;
+ if (!PageHighMem(page))
+ debug_check_no_locks_freed(page_address(page), PAGE_SIZE);
arch_free_page(page, 0);
kernel_map_pages(page, 1, 0);