[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220816022102.582865-1-haiyue.wang@intel.com>
Date: Tue, 16 Aug 2022 10:20:59 +0800
From: Haiyue Wang <haiyue.wang@...el.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: akpm@...ux-foundation.org, david@...hat.com, apopple@...dia.com,
linmiaohe@...wei.com, ying.huang@...el.com,
songmuchun@...edance.com, naoya.horiguchi@...ux.dev,
alex.sierra@....com, Haiyue Wang <haiyue.wang@...el.com>
Subject: [PATCH v6 0/2] fix follow_page related issues
v6: Simplify the multiple layers of conditionals for if {}
- if (page) {
- err = !is_zone_device_page(page) ? page_to_nid(page)
- : -ENOENT;
- if (foll_flags & FOLL_GET)
- put_page(page);
- } else {
- err = -ENOENT;
- }
+ err = -ENOENT;
+ if (!page)
+ goto set_status;
+
+ if (!is_zone_device_page(page))
+ err = page_to_nid(page);
+
+ if (foll_flags & FOLL_GET)
+ put_page(page);
v5: reword the commit message for FOLL_GET with more information.
v4: add '()' for the function for readability.
add more words about the Non-LRU pages fix in commit message.
v3: Merge the fix for handling Non-LRU pages into one patch.
Drop the break_ksm zone device page check.
v2: Add the Non-LRU pages fix with two patches, so that
'mm: migration: fix the FOLL_GET' can be applied directly
on linux-5.19 stable branch.
Haiyue Wang (2):
mm: migration: fix the FOLL_GET failure on following huge page
mm: fix the handling Non-LRU pages returned by follow_page
mm/huge_memory.c | 4 ++--
mm/ksm.c | 12 +++++++++---
mm/migrate.c | 23 +++++++++++++++++------
3 files changed, 28 insertions(+), 11 deletions(-)
--
2.37.2
Powered by blists - more mailing lists