Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2545978ybc; Mon, 18 Nov 2019 00:21:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwwqM6xFlftJKKEqYmWae0EZQ8sesvwQayNy/TArZaYEnTNjQ2NIWeoMnrPqlgCe2DhNUJj X-Received: by 2002:a17:907:2070:: with SMTP id qp16mr25133379ejb.115.1574065303168; Mon, 18 Nov 2019 00:21:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574065303; cv=none; d=google.com; s=arc-20160816; b=HpquSU8ejAjyP/Rc6YfT3CMeT5kXGPHI8ch05ZY6AOkCCRnYONMXcGUIwelfhLyJRo h72IaGOORBCYsC/p/3o2lm1G4BiGe+fH8j/sYCZOPD4wh6UolMkEAplh/2qWnggNA+RG jg4/ZFYZYMAEgICX7W7dkaWhtppLWuk42SMM+1UKIcYOG1ghrANklo1uQO4MiMKpMwBg Jnw/RGGAHGm9HYS4vcw8EuqhR9DTgSqi20w6izm4HZBZvJHDPtfkSHbXNaeEe/JPODL5 Nxj1TvzRgInCCUqEj0KIpCX1RMH+35CRcvyCO6H9u8JfzBEdxTLZc4vjWbKgX5rTG5oB I7dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=1fqBwuX90iZWNZ1HN1uC7yH6r2RhczRRJPHl/CB8Mrs=; b=tBfWhJ0vi0hIzzgL0zxG/P6x5y8xmBuMXSkBL9L56Tv9T+9c38S95L7/2d/P7iKgJi cktJeQs/6YsbozZtAlKSLFh3B0+36UiMT6wg2N2mxqKArWhiZrNwVzKtpnuYbwGPgZXU vg3bnH2iOdDcCYX8MLcuoA5ymA2IG87aD6dNGpvces0dAlvldMSgTE3CJ8e3K8wKxptt MD6J2oqs2VEQrU6fu253N56tNUU2/KXgJBtigHnrgExbFyhFx/sd8QH+U66mdt+SVvyt sQGYBuSY0GmejzNV5erbfuRUYu9KEqz0/JvqG5htQD6xkrPOPr3aWPwttpLHMtpWUFLq jH0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si10969298eju.113.2019.11.18.00.21.19; Mon, 18 Nov 2019 00:21:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726511AbfKRIUZ (ORCPT + 99 others); Mon, 18 Nov 2019 03:20:25 -0500 Received: from mga14.intel.com ([192.55.52.115]:5970 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726403AbfKRIUZ (ORCPT ); Mon, 18 Nov 2019 03:20:25 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2019 00:20:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,319,1569308400"; d="scan'208";a="236838843" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga002.fm.intel.com with ESMTP; 18 Nov 2019 00:20:23 -0800 From: Wei Yang To: n-horiguchi@ah.jp.nec.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 1/2] mm/memory-failure.c: PageHuge is handled at the beginning of memory_failure Date: Mon, 18 Nov 2019 16:20:02 +0800 Message-Id: <20191118082003.26240-1-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PageHuge is handled by memory_failure_hugetlb(), so this case could be removed. Signed-off-by: Wei Yang --- mm/memory-failure.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 3151c87dff73..392ac277b17d 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1359,10 +1359,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)) - page_flags = hpage->flags; - else - page_flags = p->flags; + page_flags = p->flags; /* * unpoison always clear PG_hwpoison inside page lock -- 2.17.1