From patchwork Wed Sep 2 11:24:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?eWFvYWlsaSBb5LmI54ix5YipXQ==?= X-Patchwork-Id: 11750381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81DB7109B for ; Wed, 2 Sep 2020 11:25:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F1C32065E for ; Wed, 2 Sep 2020 11:25:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F1C32065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kingsoft.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 056D96B0002; Wed, 2 Sep 2020 07:25:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0058E6B0003; Wed, 2 Sep 2020 07:25:06 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E39336B0037; Wed, 2 Sep 2020 07:25:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id CCF536B0002 for ; Wed, 2 Sep 2020 07:25:06 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 88BD2180AD806 for ; Wed, 2 Sep 2020 11:25:06 +0000 (UTC) X-FDA: 77217889812.05.loss47_0115172270a0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 63CF118015865 for ; Wed, 2 Sep 2020 11:25:06 +0000 (UTC) X-Spam-Summary: 1,0,0,c9ac59d964821a3c,d41d8cd98f00b204,yaoaili@kingsoft.com,,RULES_HIT:10:41:355:379:582:960:962:967:968:973:981:988:989:1021:1029:1152:1189:1221:1260:1261:1263:1313:1314:1345:1436:1437:1516:1517:1518:1535:1543:1568:1575:1588:1589:1592:1594:1691:1711:1714:1730:1776:1792:2525:2526:2527:2528:2559:2562:2682:2685:2693:2859:2899:2902:2917:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3865:3866:3867:3870:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4048:4119:4321:4379:4605:5007:6117:6261:6658:6678:6697:7688:8603:8957:9025:9121:9388:9868:10004:10026:10049:10197:10215:10400:10919:11026:11656:11658:11783:11914:12043:12296:12297:12438:12519:12555:12895:13139:14096:14181:14394:14721:14885:21080:21433:21451:21499:21627:21819:21939:21990:30046:30054:30079,0,RBL:114.255.44.145:@kingsoft.com:.lbl8.mailshell.net-62.14.2.100 64.201.201.201;04yg6pmc867dgm668kn4xj87epodxoffy48sm91w4er6mfrhic4or1n3ag7orrg.bjmtyb7disbdt7cu4ihpdiiumdn1i3tsttiarpn8q7h87 oej7i3hz X-HE-Tag: loss47_0115172270a0 X-Filterd-Recvd-Size: 8015 Received: from mail.kingsoft.com (unknown [114.255.44.145]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Sep 2020 11:25:04 +0000 (UTC) X-AuditID: 0a580157-b25ff70000003991-d6-5f4f7fa6dec6 Received: from mail.kingsoft.com (localhost [10.88.1.32]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.kingsoft.com (SMG-1-NODE-87) with SMTP id 71.4F.14737.6AF7F4F5; Wed, 2 Sep 2020 19:19:02 +0800 (HKT) Received: from KSBJMAIL2.kingsoft.cn (10.88.1.32) by KSBJMAIL2.kingsoft.cn (10.88.1.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 2 Sep 2020 19:24:59 +0800 Received: from KSBJMAIL2.kingsoft.cn ([fe80::d549:8cc7:dc14:f7c7]) by KSBJMAIL2.kingsoft.cn ([fe80::d549:8cc7:dc14:f7c7%3]) with mapi id 15.01.1979.003; Wed, 2 Sep 2020 19:24:59 +0800 From: =?eucgb2312_cn?b?eWFvYWlsaSBbw7SwrsD7XQ==?= To: "naoya.horiguchi@nec.com" CC: "linux-mm@kvack.org" , =?eucgb2312_cn?b?WUFOR0ZFTkcxIFs=?= =?eucgb2312_cn?b?0e635V0=?= Subject: [PATCH] fix incorrect compound page flags store Thread-Topic: [PATCH] fix incorrect compound page flags store Thread-Index: AdaBG7BEIxQrOhvJS7aB6s2H8zzLxA== Date: Wed, 2 Sep 2020 11:24:59 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.253.254] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsXCFcGooLus3j/e4PAiCYt7a/6zWlxsPMDo wOSx6dMkdo8XVzeyBDBFcdmkpOZklqUW6dslcGU0t7ayFVzSrJj0OKWBcZJaFyMHh4SAicSv ezZdjFwcQgLTmSSen3vIDOE8Y5SYPesrexcjJ5Czm1Fi0dk4EJtNwEniwLJVrCC2iIC5xI7L b9hBBjEL5EscWCsIEhYWsJDY0nuZCSQsImArMesoL0S1nsTDpi9MIDaLgIrEy2f/WUBsXgFr iVObDoDZjAKyEtMe3QerYRYQl5g7bRbYJgkBAYkle84zQ9iiEi8f/4OKK0ksnvMbqj5Z4sHW F0wQMwUlTs58wjKBUXgWklGzkJTNQlIGEdeSmNfwmwnCVpSY0v2QHcLWlLgy+RCUrS2xbOFr 5gWM7KsYWYpz0w03MULiInwH47ymj3qHGJk4GA8xSnAwK4nwzrzhGy/Em5JYWZValB9fVJqT WnyIUZqDRUmcV+YvUEogPbEkNTs1tSC1CCbLxMEp1cBknevFsGzu8lOcaZ0BE1/wOoed8nR+ +kNhtvLE0LmP9wWG1c4y/js1TFFcnkN9gp1f/LfEcIltFbLfFOf831fAl8l1fWE+z6zSqC+N mWY/Xq75cG3NV9157z1v8ilc56hjKhXZx/Rp48LGfqYJuy4Hqho7x6/rdT2lzZ+mVRJc73Rs 2/l609cRy1q+Myh5BP+uvrs3L8lCXLpfJntXUZyzVHCeTUGHdOv/m7yPa75fPvAkRvq6g4dC xO7CyeJ9D7iuZBmJhh475pvCc+TlrBSv7ffv8q5wlS1MNNu374/J2kmxdS+416u0b9OTm8J4 4iRP0tRzi8QdeyMfR7bG9UpXH7z0Y6vXjTYn1zgVfyWW4oxEQy3mouJEAC2uKfH6AgAA X-Rspamd-Queue-Id: 63CF118015865 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.028160, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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) Signed-off-by: Yao Aili< yaoaili@kingsoft.com> Signed-off-by: Yang Feng < yangfeng1@kingsoft.com> Signed-off-by: Yao aili< yaoaili@kingsoft.com> Signed-off-by: Yang feng < yangfeng1@kingsoft.com> Reviewed-by: Matthew Wilcox (Oracle) --- 2.25.1 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;