+ mm-madvise-replace-with-page_size-in-madvise_inject_error.patch added to -mm tree

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

 



The patch titled
     Subject: mm/madvise.c: replace with page_size() in madvise_inject_error()
has been added to the -mm tree.  Its filename is
     mm-madvise-replace-with-page_size-in-madvise_inject_error.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-madvise-replace-with-page_size-in-madvise_inject_error.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-madvise-replace-with-page_size-in-madvise_inject_error.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: Yunfeng Ye <yeyunfeng@xxxxxxxxxx>
Subject: mm/madvise.c: replace with page_size() in madvise_inject_error()

page_size() is supported after the commit a50b854e073c ("mm: introduce
page_size()").

Use page_size() in madvise_inject_error() for readability.

Link: http://lkml.kernel.org/r/29dce60c-38d6-0220-f292-e298f0c78c4d@xxxxxxxxxx
Signed-off-by: Yunfeng Ye <yeyunfeng@xxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxxxxx>
Cc: Hu Shiyuan <hushiyuan@xxxxxxxxxx>
Cc: Feilong Lin <linfeilong@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/madvise.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/mm/madvise.c~mm-madvise-replace-with-page_size-in-madvise_inject_error
+++ a/mm/madvise.c
@@ -864,13 +864,13 @@ static int madvise_inject_error(int beha
 {
 	struct page *page;
 	struct zone *zone;
-	unsigned int order;
+	unsigned int size;
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
 
-	for (; start < end; start += PAGE_SIZE << order) {
+	for (; start < end; start += size) {
 		unsigned long pfn;
 		int ret;
 
@@ -882,9 +882,9 @@ static int madvise_inject_error(int beha
 		/*
 		 * When soft offlining hugepages, after migrating the page
 		 * we dissolve it, therefore in the second loop "page" will
-		 * no longer be a compound page, and order will be 0.
+		 * no longer be a compound page.
 		 */
-		order = compound_order(compound_head(page));
+		size = page_size(compound_head(page));
 
 		if (PageHWPoison(page)) {
 			put_page(page);
_

Patches currently in -mm which might be from yeyunfeng@xxxxxxxxxx are

mm-support-memblock-alloc-on-the-exact-node-for-sparse_buffer_init.patch
mm-cmac-switch-to-bitmap_zalloc-for-cma-bitmap-allocation.patch
mm-madvise-replace-with-page_size-in-madvise_inject_error.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