mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
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>
This commit is contained in:
parent
d5e6eff265
commit
c70b647d38
1 changed files with 4 additions and 1 deletions
|
@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct address_space *mapping,
|
||||||
static void page_cache_tree_delete(struct address_space *mapping,
|
static void page_cache_tree_delete(struct address_space *mapping,
|
||||||
struct page *page, void *shadow)
|
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(!PageLocked(page), page);
|
||||||
VM_BUG_ON_PAGE(PageTail(page), page);
|
VM_BUG_ON_PAGE(PageTail(page), page);
|
||||||
|
|
Loading…
Reference in a new issue