[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190801184244.3169074-4-songliubraving@fb.com>
Date: Thu, 1 Aug 2019 11:42:40 -0700
From: Song Liu <songliubraving@...com>
To: <linux-mm@...ck.org>, <linux-fsdevel@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <matthew.wilcox@...cle.com>, <kirill.shutemov@...ux.intel.com>,
<kernel-team@...com>, <william.kucharski@...cle.com>,
<akpm@...ux-foundation.org>, <hdanton@...a.com>,
Song Liu <songliubraving@...com>
Subject: [PATCH v10 3/7] filemap: update offset check in filemap_fault()
With THP, current check of offset:
VM_BUG_ON_PAGE(page->index != offset, page);
is no longer accurate. Update it to:
VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page);
Acked-by: Rik van Riel <riel@...riel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
Acked-by: Johannes Weiner <hannes@...xchg.org>
Signed-off-by: Song Liu <songliubraving@...com>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index aaee1ef96f6d..97c7b7b92c20 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2542,7 +2542,7 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
put_page(page);
goto retry_find;
}
- VM_BUG_ON_PAGE(page->index != offset, page);
+ VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page);
/*
* We have a locked page in the page cache, now we need to check
--
2.17.1
Powered by blists - more mailing lists