From 61abd63397f6335a6fc08afaa4d14c4c7401c2b4 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 25 Jul 2007 20:22:23 -0700 Subject: [PATCH] Futex: Fix PAGE SIZE assumption Signed-off-by: Christoph Lameter --- kernel/futex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: mm/kernel/futex.c =================================================================== --- mm.orig/kernel/futex.c 2007-11-16 21:16:36.000000000 -0800 +++ mm/kernel/futex.c 2007-11-28 14:15:18.913227222 -0800 @@ -262,7 +262,8 @@ static int get_futex_key(u32 __user *uad err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL); if (err >= 0) { key->shared.pgoff = - page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); + page->index << + (page_cache_page_shift(page) - PAGE_SHIFT); put_page(page); return 0; }