linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix incorrect compound page flags store
@ 2020-09-02 11:24 yaoaili [么爱利]
  2020-09-02 11:35 ` Matthew Wilcox
  0 siblings, 1 reply; 21+ messages in thread
From: yaoaili [么爱利] @ 2020-09-02 11:24 UTC (permalink / raw)
  To: naoya.horiguchi; +Cc: linux-mm, YANGFENG1 [杨峰]

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index f1aa6433f404..e6995976b11d 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
         * page_remove_rmap() in try_to_unmap_one(). So to determine page status
         * correctly, we save a copy of the page flags at this time.
         */
-       if (PageHuge(p))
+       if (PageCompound(p))
                page_flags = hpage->flags;
        else
                page_flags = p->flags;
--
2.25.1

[-- Attachment #2: Type: text/html, Size: 3865 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCH] Fix incorrect compound page flags store
@ 2020-09-08  3:44 yaoaili126
  2020-09-08  7:02 ` HORIGUCHI NAOYA(堀口 直也)
  0 siblings, 1 reply; 21+ messages in thread
From: yaoaili126 @ 2020-09-08  3:44 UTC (permalink / raw)
  To: naoya.horiguchi; +Cc: linux-mm, YANGFENG1, Aili Yao, willy, Yang Feng

From: Aili Yao <yaoaili@kingsoft.com>

PageHuge(p) branch will never be true,but for compound page we need to set page_flags to correct value.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Yang Feng < yangfeng1@kingsoft.com>
Signed-off-by: Aili Yao <yaoaili@kingsoft.com>
---
 mm/memory-failure.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index f1aa6433f404..e6995976b11d 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1382,7 +1382,7 @@ int memory_failure(unsigned long pfn, int flags)
 	 * page_remove_rmap() in try_to_unmap_one(). So to determine page status
 	 * correctly, we save a copy of the page flags at this time.
 	 */
-	if (PageHuge(p))
+	if (PageCompound(p))
 		page_flags = hpage->flags;
 	else
 		page_flags = p->flags;
-- 
2.18.4




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-09-25  5:53 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02 11:24 [PATCH] fix incorrect compound page flags store yaoaili [么爱利]
2020-09-02 11:35 ` Matthew Wilcox
2020-09-02 11:46   ` 答复: " yaoaili [么爱利]
2020-09-04  2:26     ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  3:44 [PATCH] Fix " yaoaili126
2020-09-08  7:02 ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  7:18   ` yaoaili [么爱利]
2020-09-08  7:26   ` Oscar Salvador
2020-09-08  8:02     ` yaoaili [么爱利]
2020-09-08  8:09       ` Oscar Salvador
2020-09-08  8:36     ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  8:48       ` yaoaili [么爱利]
2020-09-08  9:00         ` HORIGUCHI NAOYA(堀口 直也)
2020-09-08  9:10           ` yaoaili [么爱利]
2020-09-08  8:51       ` Oscar Salvador
2020-09-08  9:05         ` HORIGUCHI NAOYA(堀口 直也)
2020-09-18  9:35           ` Oscar Salvador
2020-09-25  1:18             ` HORIGUCHI NAOYA(堀口 直也)
2020-09-25  1:55               ` yaoaili [么爱利]
2020-09-25  4:35                 ` HORIGUCHI NAOYA(堀口 直也)
2020-09-25  5:52                   ` yaoaili [么爱利]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox