[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <db2459c4a8c31cba597680bd9dd7c868534e00be.1676342827.git.baolin.wang@linux.alibaba.com>
Date: Tue, 14 Feb 2023 11:18:08 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: akpm@...ux-foundation.org
Cc: torvalds@...ux-foundation.org, sj@...nel.org, hannes@...xchg.org,
mhocko@...nel.org, roman.gushchin@...ux.dev, shakeelb@...gle.com,
muchun.song@...ux.dev, baolin.wang@...ux.alibaba.com,
damon@...ts.linux.dev, cgroups@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] mm: mempolicy: check negative error of isolate_hugetlb() when failed to isolate a hugetlb
Better to check the negative error of isolate_hugetlb() when failed to
isolate a hugetlb page, which makes the code more clear.
No functional changes.
Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 0919c7a719d4..e3d87b21516b 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -609,7 +609,7 @@ static int queue_folios_hugetlb(pte_t *pte, unsigned long hmask,
if (flags & (MPOL_MF_MOVE_ALL) ||
(flags & MPOL_MF_MOVE && folio_estimated_sharers(folio) == 1 &&
!hugetlb_pmd_shared(pte))) {
- if (isolate_hugetlb(folio, qp->pagelist) &&
+ if (isolate_hugetlb(folio, qp->pagelist) < 0 &&
(flags & MPOL_MF_STRICT))
/*
* Failed to isolate folio but allow migrating pages
--
2.27.0
Powered by blists - more mailing lists