summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>2014-07-23 14:00:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-23 15:10:54 -0700
commita0f7a756c2f7543585657cdeeefdfcc11b567293 (patch)
tree05ddd356f6aa17f826a1923d8601dd3c78f7fbbc /drivers/block
parentaed8adb7688d5744cb484226820163af31d2499a (diff)
downloadop-kernel-dev-a0f7a756c2f7543585657cdeeefdfcc11b567293.zip
op-kernel-dev-a0f7a756c2f7543585657cdeeefdfcc11b567293.tar.gz
mm/rmap.c: fix pgoff calculation to handle hugepage correctly
I triggered VM_BUG_ON() in vma_address() when I tried to migrate an anonymous hugepage with mbind() in the kernel v3.16-rc3. This is because pgoff's calculation in rmap_walk_anon() fails to consider compound_order() only to have an incorrect value. This patch introduces page_to_pgoff(), which gets the page's offset in PAGE_CACHE_SIZE. Kirill pointed out that page cache tree should natively handle hugepages, and in order to make hugetlbfs fit it, page->index of hugetlbfs page should be in PAGE_CACHE_SIZE. This is beyond this patch, but page_to_pgoff() contains the point to be fixed in a single function. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Hugh Dickins <hughd@google.com> Cc: Rik van Riel <riel@redhat.com> Cc: Hillf Danton <dhillf@gmail.com> Cc: Naoya Horiguchi <nao.horiguchi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud