Kirill A. Shutemov
5cbc198ae0
mm: fix false-positive WARN_ON() in truncate/invalidate for hugetlb
...
Hugetlb pages have ->index in size of the huge pages (PMD_SIZE or
PUD_SIZE), not in PAGE_SIZE as other types of pages. This means we
cannot user page_to_pgoff() to check whether we've got the right page
for the radix-tree index.
Let's introduce page_to_index() which would return radix-tree index for
given page.
We will be able to get rid of this once hugetlb will be switched to
multi-order entries.
Fixes: fc127da085c2 ("truncate: handle file thp")
Link: http://lkml.kernel.org/r/20161123093053.mjbnvn5zwxw5e6lk@black.fi.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Doug Nelson <doug.nelson@intel.com>
Tested-by: Doug Nelson <doug.nelson@intel.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-11-30 16:32:52 -08:00
..
2016-11-30 16:32:52 -08:00
2016-08-04 14:19:16 -06:00
2016-07-26 16:19:19 -07:00
2016-10-11 15:06:33 -07:00
2016-01-27 09:09:57 -05:00
2016-11-11 08:12:37 -08:00
2016-10-07 18:46:29 -07:00
2016-03-17 15:09:34 -07:00
2016-10-07 18:46:29 -07:00
2016-03-17 15:09:34 -07:00
2015-11-05 19:34:48 -08:00
2016-06-09 14:23:11 -07:00
2016-03-15 16:55:16 -07:00
2016-11-11 08:12:37 -08:00
2016-10-19 08:11:24 -07:00
2016-07-26 16:19:19 -07:00
2016-10-24 19:13:20 -07:00
2016-05-19 19:12:14 -07:00
2016-11-29 08:20:24 -08:00
2016-05-20 17:58:30 -07:00
2016-11-11 08:12:37 -08:00
2016-10-07 18:46:29 -07:00
2016-10-27 16:23:01 -07:00
2016-09-13 02:35:27 +02:00
2016-11-30 16:32:52 -08:00
2016-03-17 15:09:34 -07:00
2016-03-17 15:09:34 -07:00
2016-11-11 08:12:37 -08:00
2016-10-07 18:46:29 -07:00
2016-10-27 18:43:42 -07:00
2016-05-22 17:21:27 -07:00
2016-05-23 17:04:14 -07:00
2016-10-12 10:23:41 -07:00
2016-10-11 15:06:33 -07:00
2016-10-27 18:43:43 -07:00
2016-10-27 15:49:12 -07:00
2016-11-11 08:12:37 -08:00
2016-10-19 08:31:25 -07:00
2016-10-19 08:11:43 -07:00
2016-07-28 16:07:41 -07:00
2016-10-07 18:46:29 -07:00
2016-10-07 18:46:28 -07:00
2016-11-30 16:32:52 -08:00
2016-03-17 15:09:34 -07:00
2016-10-07 18:46:29 -07:00
2016-04-28 11:44:19 +02:00
2016-03-17 15:09:34 -07:00
2016-05-19 19:12:14 -07:00
2016-10-19 17:28:48 +02:00
2016-11-29 08:20:24 -08:00
2015-11-05 19:34:48 -08:00
2016-10-11 15:06:33 -07:00
2016-10-24 19:13:20 -07:00
2016-10-07 18:46:29 -07:00
2016-11-11 08:12:37 -08:00
2015-11-05 19:34:48 -08:00
2016-10-07 18:46:27 -07:00
2016-07-28 16:07:41 -07:00
2016-10-07 18:46:29 -07:00
2016-10-07 18:46:29 -07:00
2016-10-07 18:46:27 -07:00
2016-06-03 15:06:22 -07:00
2016-10-07 18:46:28 -07:00
2016-01-15 17:56:32 -08:00
2016-03-17 15:09:34 -07:00
2016-10-05 11:52:55 -04:00
2016-03-17 15:09:34 -07:00
2016-10-18 14:13:37 -07:00
2016-03-17 15:09:34 -07:00
2016-08-26 17:39:35 -07:00
2016-08-10 16:40:56 -07:00
2016-11-11 08:12:37 -08:00
2016-11-11 08:12:37 -08:00
2016-10-27 18:43:43 -07:00
2016-10-27 18:43:43 -07:00
2016-02-18 16:23:24 -08:00
2016-09-06 18:30:20 +02:00
2016-08-02 17:31:41 -04:00
2016-08-02 17:31:41 -04:00
2016-03-17 15:09:34 -07:00
2016-10-07 18:46:28 -07:00
2016-10-07 18:46:28 -07:00
2016-11-11 08:12:37 -08:00
2016-11-30 16:32:52 -08:00
2016-09-20 16:07:39 -07:00
2016-04-04 10:41:08 -07:00
2016-10-22 09:39:10 -07:00
2016-10-07 18:46:27 -07:00
2016-10-07 18:46:29 -07:00
2016-02-03 08:28:43 -08:00
2016-10-27 18:43:43 -07:00
2016-10-07 18:46:30 -07:00
2016-09-30 15:26:52 -07:00
2016-06-03 16:02:55 -07:00
2016-01-15 11:40:52 -08:00
2015-11-06 17:50:42 -08:00
2016-07-28 16:07:41 -07:00
2016-05-20 17:58:30 -07:00