Skip to content

Commit

Permalink
mm/filemap.c: add comment for confusing logic in page_cache_tree_inse…
Browse files Browse the repository at this point in the history
…rt()

Unlike THP, hugetlb pages are represented by one entry in the
radix-tree.

[[email protected]: tweak comment]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Kirill A. Shutemov <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Jan Kara <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Dec 13, 2016
1 parent d5e6eff commit c70b647
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct address_space *mapping,
static void page_cache_tree_delete(struct address_space *mapping,
struct page *page, void *shadow)
{
int i, nr = PageHuge(page) ? 1 : hpage_nr_pages(page);
int i, nr;

/* hugetlb pages are represented by one entry in the radix tree */
nr = PageHuge(page) ? 1 : hpage_nr_pages(page);

VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_PAGE(PageTail(page), page);
Expand Down

0 comments on commit c70b647

Please sign in to comment.