From: Becky Bruce Date: Tue, 26 Jul 2011 00:11:49 +0000 (-0700) Subject: fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit X-Git-Tag: v3.1-rc1~241^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b37c35e6552b0d04d5db9728bc7af22d53f731a;p=pandora-kernel.git fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit This: vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT) is incorrect on 32-bit. It causes us to & the pgoff with something that looks like this (for a 4m hugepage): 0xfff003ff. The mask should be flipped and *then* shifted, to give you 0x0000_03fff. Signed-off-by: Becky Bruce Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed