]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault()
authorDean Nelson <dnelson@redhat.com>
Thu, 2 Dec 2010 22:31:12 +0000 (14:31 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:33:15 +0000 (13:33 -0800)
commitbefb3a2d6721ecdc380d2047cffe24419c11fa24
treedf4572e54b087991a047d665953aa1cb322b5b2e
parent9b504ae860868e8d0c8376b14235ebdfbfaf7fb5
mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault()

commit 1f64d69c7ad2e48e697493e45590679f7a69b7b2 upstream.

Have hugetlb_fault() call unlock_page(page) only if it had previously
called lock_page(page).

Setting CONFIG_DEBUG_VM=y and then running the libhugetlbfs test suite,
resulted in the tripping of VM_BUG_ON(!PageLocked(page)) in
unlock_page() having been called by hugetlb_fault() when page ==
pagecache_page.  This patch remedied the problem.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/hugetlb.c