diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-12-12 19:43:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-12 21:55:08 -0500 |
commit | c70b647d381cba1899c953b0016b7dc185892f90 (patch) | |
tree | 69e6fe37d37e0db4297f9e08d7b48ec38ed6b3cb /mm/filemap.c | |
parent | d5e6eff265fe7537fa494e6ab125747813be76a0 (diff) |
mm/filemap.c: add comment for confusing logic in page_cache_tree_insert()
Unlike THP, hugetlb pages are represented by one entry in the
radix-tree.
[akpm@linux-foundation.org: tweak comment]
Link: http://lkml.kernel.org/r/20161110163640.126124-1-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 50b52fe51937..caa779f8797f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct address_space *mapping, | |||
169 | static void page_cache_tree_delete(struct address_space *mapping, | 169 | static void page_cache_tree_delete(struct address_space *mapping, |
170 | struct page *page, void *shadow) | 170 | struct page *page, void *shadow) |
171 | { | 171 | { |
172 | int i, nr = PageHuge(page) ? 1 : hpage_nr_pages(page); | 172 | int i, nr; |
173 | |||
174 | /* hugetlb pages are represented by one entry in the radix tree */ | ||
175 | nr = PageHuge(page) ? 1 : hpage_nr_pages(page); | ||
173 | 176 | ||
174 | VM_BUG_ON_PAGE(!PageLocked(page), page); | 177 | VM_BUG_ON_PAGE(!PageLocked(page), page); |
175 | VM_BUG_ON_PAGE(PageTail(page), page); | 178 | VM_BUG_ON_PAGE(PageTail(page), page); |