+ mm-page-cache-store-only-head-pages-in-i_pages-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm-page-cache-store-only-head-pages-in-i_pages-fix
has been added to the -mm tree.  Its filename is
     mm-page-cache-store-only-head-pages-in-i_pages-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-page-cache-store-only-head-pages-in-i_pages-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-page-cache-store-only-head-pages-in-i_pages-fix.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/process/submit-checklist.rst when testing your code ***

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

------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>
Subject: mm-page-cache-store-only-head-pages-in-i_pages-fix

use compound_nr, squish uninit-var warning

Cc: Jan Kara <jack@xxxxxxx>
Cc: Kirill Shutemov <kirill@xxxxxxxxxxxxx>
Cc: Song Liu <songliubraving@xxxxxx>
Cc: William Kucharski <william.kucharski@xxxxxxxxxx>
Cc: William Kucharski <william.kucharski@xxxxxxxxxx>
Cc: Qian Cai <cai@xxxxxx>
Cc: Mikhail Gavrilov <mikhail.v.gavrilov@xxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Song Liu <songliubraving@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/pagemap.h |    5 +----
 mm/filemap.c            |    3 +--
 mm/huge_memory.c        |    2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

--- a/include/linux/pagemap.h~mm-page-cache-store-only-head-pages-in-i_pages-fix
+++ a/include/linux/pagemap.h
@@ -335,15 +335,12 @@ static inline struct page *grab_cache_pa
 
 static inline struct page *find_subpage(struct page *page, pgoff_t offset)
 {
-	unsigned long mask;
-
 	if (PageHuge(page))
 		return page;
 
 	VM_BUG_ON_PAGE(PageTail(page), page);
 
-	mask = (1UL << compound_order(page)) - 1;
-	return page + (offset & mask);
+	return page + (offset & (compound_nr(page) - 1));
 }
 
 struct page *find_get_entry(struct address_space *mapping, pgoff_t offset);
--- a/mm/filemap.c~mm-page-cache-store-only-head-pages-in-i_pages-fix
+++ a/mm/filemap.c
@@ -329,8 +329,7 @@ static void page_cache_delete_batch(stru
 		 * page or the index is of the last sub-page of this compound
 		 * page.
 		 */
-		if (page->index + (1UL << compound_order(page)) - 1 ==
-				xas.xa_index)
+		if (page->index + compound_nr(page) - 1 == xas.xa_index)
 			i++;
 		xas_store(&xas, NULL);
 		total_pages++;
--- a/mm/huge_memory.c~mm-page-cache-store-only-head-pages-in-i_pages-fix
+++ a/mm/huge_memory.c
@@ -2486,7 +2486,7 @@ static void __split_huge_page(struct pag
 	pg_data_t *pgdat = page_pgdat(head);
 	struct lruvec *lruvec;
 	struct address_space *swap_cache = NULL;
-	unsigned long offset;
+	unsigned long offset = 0;
 	int i;
 
 	lruvec = mem_cgroup_page_lruvec(head, pgdat);
_

Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are

mm-introduce-page_size.patch
mm-introduce-page_shift.patch
mm-introduce-compound_nr.patch
mm-page-cache-store-only-head-pages-in-i_pages.patch
mm-page-cache-store-only-head-pages-in-i_pages-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux