mm: page_alloc: clear PG_locked before checking flags on free
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 19 Jun 2009 17:30:56 +0000 (19:30 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 20 Jun 2009 23:08:22 +0000 (16:08 -0700)
da456f1 "page allocator: do not disable interrupts in free_page_mlock()" moved
the PG_mlocked clearing after the flag sanity checking which makes mlocked
pages always trigger 'bad page'.  Fix this by clearing the bit up front.

Reported--and-debugged-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found