mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch added to -mm tree
@ 2016-11-16  0:11 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-11-16  0:11 UTC (permalink / raw)
  To: kirill.shutemov, hannes, jack, mm-commits


The patch titled
     Subject: mm/filemap.c: add comment for confusing logic in page_cache_tree_insert()
has been added to the -mm tree.  Its filename is
     filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: 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.

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>
---

 mm/filemap.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff -puN mm/filemap.c~filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert mm/filemap.c
--- a/mm/filemap.c~filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert
+++ a/mm/filemap.c
@@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct
 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 represented by one entry on radix-tree */
+	nr = PageHuge(page) ? 1 : hpage_nr_pages(page);
 
 	VM_BUG_ON_PAGE(!PageLocked(page), page);
 	VM_BUG_ON_PAGE(PageTail(page), page);
_

Patches currently in -mm which might be from kirill.shutemov@linux.intel.com are

mm-bug-in-munlock_vma_pages_range.patch
filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-16  0:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16  0:11 + filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).