Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1624821pxa; Thu, 6 Aug 2020 11:51:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0Jgjg6MN2QdfWRdW8tKAsShEB2byfElvsvrs488sNgPbjV97tty0FX3Y/AAdiUFd7Xpw4 X-Received: by 2002:a05:6402:1a23:: with SMTP id be3mr5582123edb.138.1596739918769; Thu, 06 Aug 2020 11:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596739918; cv=none; d=google.com; s=arc-20160816; b=QVKn3ADbmPCW24K6zTp7uoa5c9Ddt6hhhmIx2mB3r0kGjNJh7Gry90sRieFzn+Ibtu 8JHw1Ax/oThdBfjvJ3OkbUtH0SgGvP73kLZB697GAmwnCnopBE/f30csDxQYz+XU7o1j L3AhjG6YnVDYDhPL9GX23L5CHKssBMZqwratuvMZEhkFXwWKmfgua6QOeDPuaT+ajDdF d287bS6am61dEO740WFveh5K23oAdA18mmlWTFl1S9VwvRKdf4C9mk/OsKilEvuxwdei uY+AY402vPLQYpYLbmonFphTTT4Lxn+Az1IzLZfhtIOdpBZZo6iCAj25X7zk+U5cPq1e ckng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=pS0WhU6WE8IYcQCnD1IwwP5QRHOYUjKqdATKfccEtHE=; b=Th0yrsU/r5soN6MVEZyEwV9z2fQOYgwbvzxbYaYshtLgVm1eqjkCHQMCapnv5YYWSl KneOXMlzuiMWb3DwQ0SLuIMqCePAcMWwwvT2tDS9t7JUdMdlPTc07OfCkZSGm4fvU06E dL/rqQfxlmsXV4TEeK+aXZSvp8/RnifAMuPOzhgQVO03Wq9AN5NjldpFBS5wix7hh9Nc HZK/6BNMOs+vlPoYoOOkFZFc1OZdDkYF4KxRzXKlMC6oaw7H8pMS6dXxNzFbLrDd0KNQ zps+gn8xFvoqc3fJE6kSTGNogSLZPKx1jB6ka0x9+NM55QWYMOhWDVOOisgU4ak5eBDP QuAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KOXH41yn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u16si4086172eje.469.2020.08.06.11.51.36; Thu, 06 Aug 2020 11:51:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KOXH41yn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728472AbgHFSte (ORCPT + 99 others); Thu, 6 Aug 2020 14:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726942AbgHFStc (ORCPT ); Thu, 6 Aug 2020 14:49:32 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93164C061574 for ; Thu, 6 Aug 2020 11:49:32 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id ha11so7153976pjb.1 for ; Thu, 06 Aug 2020 11:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pS0WhU6WE8IYcQCnD1IwwP5QRHOYUjKqdATKfccEtHE=; b=KOXH41ynmycekcDeMi9gZeiIS5eCKt3SCoMwlCTMHjb0JpMnOqc3vJoLKZfbX8BXQr +3PK+ex/1iKo64nx4cSsOP5WPAwB0IyatsYFDCoO+55h81UKK7NZaFiMcBxxzHrqQxBk Xs5oyToQ2QSy0+wGe2oHcxlBRe6wC+noBPy0KvzKOif6UfoF/BnNskrZ6PkmxeCtEB0a 3sNMPnigY0YoWJ749k7h6SGS/vlxyKNNSnoET7InWc8gdyT18CjBAOX5TVmkR3LbRAr0 Od0zuuJVaeIfNMukviws18DKLGd0vHBywboPjulRboLJswDBKsJbiHDasQ8Ev/SeRSBH RuIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pS0WhU6WE8IYcQCnD1IwwP5QRHOYUjKqdATKfccEtHE=; b=ouBBdd3YMMccjDAFdx9l/Hd284YQ/aCtK3OVwgY/oSH5SD7f/EXa5CE43gM6PWI/t5 0xzvm4agypi44vstQE2iMc6oH+8+Xd4WoOa5ZTN3DOVZ2s3kDrOxJskZio7XtaT/U6L6 4XqKnmCK1GuYh9w/OgpU2BaKAreWIgkiTYSL/nVhJ9OOiinsbxsN+pkVBwx2udiact6H 19bK+NEurTg3LfxUKXCCXN3aCd3WmUxF/W5Gox8RW3wLIeXwA/D25D85N/afO7pOy5hF YQ73dFlemmnY1wbjgQN23fdIFD0tNZ+U+7BRmJsdglOii8Oy233sp/qxFdOHINk08gwN 4ijg== X-Gm-Message-State: AOAM530x/BNWG0x7ALcPWRIhnDmAN480RbKoEgwgrQZXPS4nebqcFra2 BvtkS7kJ79s0+UOxm9YDag== X-Received: by 2002:a17:902:bb82:: with SMTP id m2mr8992381pls.115.1596739772043; Thu, 06 Aug 2020 11:49:32 -0700 (PDT) Received: from ip-172-31-41-194.ap-northeast-1.compute.internal (ec2-52-199-21-241.ap-northeast-1.compute.amazonaws.com. [52.199.21.241]) by smtp.gmail.com with ESMTPSA id u24sm9096730pfm.20.2020.08.06.11.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 11:49:31 -0700 (PDT) From: nao.horiguchi@gmail.com To: linux-mm@kvack.org Cc: mhocko@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, osalvador@suse.de, tony.luck@intel.com, david@redhat.com, aneesh.kumar@linux.vnet.ibm.com, zeil@yandex-team.ru, cai@lca.pw, naoya.horiguchi@nec.com, linux-kernel@vger.kernel.org Subject: [PATCH v6 01/12] mm,hwpoison: cleanup unused PageHuge() check Date: Thu, 6 Aug 2020 18:49:12 +0000 Message-Id: <20200806184923.7007-2-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200806184923.7007-1-nao.horiguchi@gmail.com> References: <20200806184923.7007-1-nao.horiguchi@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Naoya Horiguchi Drop the PageHuge check, which is dead code since memory_failure() forks into memory_failure_hugetlb() for hugetlb pages. memory_failure() and memory_failure_hugetlb() shares some functions like hwpoison_user_mappings() and identify_page_state(), so they should properly handle 4kB page, thp, and hugetlb. Signed-off-by: Naoya Horiguchi Signed-off-by: Oscar Salvador Reviewed-by: Mike Kravetz --- mm/memory-failure.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git v5.8-rc7-mmotm-2020-07-27-18-18/mm/memory-failure.c v5.8-rc7-mmotm-2020-07-27-18-18_patched/mm/memory-failure.c index fe53768e0793..3d2d61f1c6e9 100644 --- v5.8-rc7-mmotm-2020-07-27-18-18/mm/memory-failure.c +++ v5.8-rc7-mmotm-2020-07-27-18-18_patched/mm/memory-failure.c @@ -1382,10 +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)) - page_flags = hpage->flags; - else - page_flags = p->flags; + page_flags = p->flags; /* * unpoison always clear PG_hwpoison inside page lock -- 2.17.1