From patchwork Tue Mar 22 21:44:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789200 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1210C433EF for ; Tue, 22 Mar 2022 21:44:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D5116B010C; Tue, 22 Mar 2022 17:44:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 586A26B010D; Tue, 22 Mar 2022 17:44:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 473EB6B010E; Tue, 22 Mar 2022 17:44:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 3294E6B010C for ; Tue, 22 Mar 2022 17:44:28 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 06847A4DB6 for ; Tue, 22 Mar 2022 21:44:28 +0000 (UTC) X-FDA: 79273351416.23.5686EB6 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf07.hostedemail.com (Postfix) with ESMTP id 8DCB34002D for ; Tue, 22 Mar 2022 21:44:27 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 61DCBB81DAD; Tue, 22 Mar 2022 21:44:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDD56C340EC; Tue, 22 Mar 2022 21:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985465; bh=b5Hq2WgA5i2EfppjmNyqdZs21SuR45WdVgAyWeLF1fE=; h=Date:To:From:In-Reply-To:Subject:From; b=XgMeqJEsy7jFxojtjKqPE6BtivOwTqim4lrvAFf/P6bT2u3fbtwPzeZClbIHkVL+h kh1n0jN4U7CWPcAv44uP25UbUt8K3pVzA+PeiZUFVdxieeUmy3irzUqLb2gcjjuKhl EqruMMuVvqchye43nYCjE/rA1VqbOXwaKA39HMpw= Date: Tue, 22 Mar 2022 14:44:24 -0700 To: naoya.horiguchi@nec.com,linmiaohe@huawei.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 116/227] mm/memory-failure.c: remove PageSlab check in hwpoison_filter_dev Message-Id: <20220322214424.EDD56C340EC@smtp.kernel.org> X-Stat-Signature: 8f19ax155hjb1y6yj4m5y8wda8spnixr Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=XgMeqJEs; dmarc=none; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 8DCB34002D X-HE-Tag: 1647985467-58606 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miaohe Lin Subject: mm/memory-failure.c: remove PageSlab check in hwpoison_filter_dev Since commit 03e5ac2fc3bf ("mm: fix crash when using XFS on loopback"), page_mapping() can handle the Slab pages. So remove this unnecessary PageSlab check and obsolete comment. Link: https://lkml.kernel.org/r/20220218090118.1105-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton --- mm/memory-failure.c | 6 ------ 1 file changed, 6 deletions(-) --- a/mm/memory-failure.c~mm-memory-failurec-remove-pageslab-check-in-hwpoison_filter_dev +++ a/mm/memory-failure.c @@ -130,12 +130,6 @@ static int hwpoison_filter_dev(struct pa hwpoison_filter_dev_minor == ~0U) return 0; - /* - * page_mapping() does not accept slab pages. - */ - if (PageSlab(p)) - return -EINVAL; - mapping = page_mapping(p); if (mapping == NULL || mapping->host == NULL) return -EINVAL;