Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2609083ybg; Fri, 31 Jul 2020 05:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx158YuHBqH4LgdUcWabSIA2FriZlQ1Ei+rYRfPXZ3lgrLG0Cawn1831gs7+XgSjjGXRrQk X-Received: by 2002:a50:c044:: with SMTP id u4mr3784012edd.366.1596198235516; Fri, 31 Jul 2020 05:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596198235; cv=none; d=google.com; s=arc-20160816; b=H8mmTScQdHpcI7qBxOsiUpq66M5zJ9iCui2YEWFPwq8EKW1utagg8ML3TNSv170gsU QZOUg/CiJKz4N4cdQcpYrILu84AZfobTyMH43KccU88rs6462kRmPglWb75zub8mIvkJ Yk53BCTnNrE8k1SXOexvLD6mR5FRQC/iQ8x8QcOEfLq/+Bh9hVrR/K3WPfF/XE/7dudP Kt+gko0wfBpIcU2vvHou7THIJl261KXdA3OZp+Xn3r/f50UxTdllhvJtB9DcT/NJegKp i30CKwVtRab/S2v27OJ0q/fkpI1YG0Zucv5OOwWCq8xCue3DKoBHeU3hLFjzZBUB7wyj FlIw== 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=zkTpa9MkQN/IHRVufET4QtgW9bHvRTtcPVjTj22FFhH3v9FS/eD7XZXaqdXDP5ipta 4Tpcuj/NeH8fjBEv88gRDPZmllWjb6JMyTj4x3vRAv8YfdYlYCvtHuhTwcun64tEOtN5 mhfj6XU/eqN8MlwUFgU3dYCZi/dB8G+kLovxeXuO/kckimO4EsRx2cyV248Lbi/haRPV SYlk8gPKOrERftIjtIEoRDrZu8wU7Cnwh8dJ9U8FrylNtUcDslduJ3oifqNnuL8D1iA0 vvzvhhW69IyxbH8pcx1EdVqrex/rSaeyrHNUFQi9h/4TigjSEvQ1hYzisCPrsuHZS5x6 k3zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MLRvIBPy; 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 e10si5450907edy.274.2020.07.31.05.23.33; Fri, 31 Jul 2020 05:23:55 -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=MLRvIBPy; 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 S1733099AbgGaMVW (ORCPT + 99 others); Fri, 31 Jul 2020 08:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732980AbgGaMVV (ORCPT ); Fri, 31 Jul 2020 08:21:21 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D924C061574 for ; Fri, 31 Jul 2020 05:21:21 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id bh1so4124818plb.12 for ; Fri, 31 Jul 2020 05:21:21 -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=MLRvIBPy5vqHYOrJlKbuO+hv+7xtTvwRappzGjqJukqCM0eBVWt6DsxRLnwWNYS5GL 5l3SSvwdz0LgMaCUAnjg0HOQl2EbBMFmBqPs9VD4JhVaTcCpyUu6SWbyfMW8aBKwIjYe v+b0EZVomIUg7AsgLIBernDe2VaddoZoE1KSwBautGPyYU6Eio8RVl8oRLk6Wtm3F5Al pv8zQRFG78hNGhNre4/0LDEP1L8XUlHvPh9xaCOcQ7NQ2T1oOFvf00XoE5bljF50yW86 vYj5A4tYt4RYzkhRPFdDj7mzY5crKu9AqqqFmTeK9hUhyxB6SOubKzz7kNsvgRznFFBQ HxzA== 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=RHE2se4E9vfta5fJMKzdRVIXFGh8yuaQT49HEFX1t1W9hhJCJ5fvWeww21udcNIm6M WzV93FcT6RBXQM902LERSK7SfEQwOaBPMi5sSOsrSjuHxvTJUnFdipmTe1Q3w+yz4ryJ EZ1RN4CWz5iEGgzf+y3ktks3dxgdeg330Uk78HWoy4/KByMyGjOuAVlnQO1ij8G3Kl5q VC++cohNdQx/e+l8ZRpqlc9TvM9eVNm2K6wWR3SvXWHdM/fMrNysUVo/S27f10Cft+3X 1oZ2R+EFLjJqSt4PO9vggLvjKOehdXBj1RHVLcEXCFWcCO8JPNisCi8PO9beoWu54KMK EUZA== X-Gm-Message-State: AOAM530eew2bm9zEp3OJ7hx0tp44Fiya75GD413yarRfglSP5muTkkyy dfRCA1JOpUvqDRprAefSaSPdwUulCw== X-Received: by 2002:a17:90a:9f84:: with SMTP id o4mr3700149pjp.200.1596198081054; Fri, 31 Jul 2020 05:21:21 -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 m19sm3675692pjv.34.2020.07.31.05.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 05:21:20 -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 v5 01/16] mm,hwpoison: cleanup unused PageHuge() check Date: Fri, 31 Jul 2020 12:20:57 +0000 Message-Id: <20200731122112.11263-2-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200731122112.11263-1-nao.horiguchi@gmail.com> References: <20200731122112.11263-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