From patchwork Tue Mar 22 21:44:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789148 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 9E641C433F5 for ; Tue, 22 Mar 2022 21:44:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 340756B00FC; Tue, 22 Mar 2022 17:44:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EDB56B00FD; Tue, 22 Mar 2022 17:44:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 18E156B00FE; Tue, 22 Mar 2022 17:44:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 0405D6B00FC for ; Tue, 22 Mar 2022 17:44:06 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C9625229FE for ; Tue, 22 Mar 2022 21:44:05 +0000 (UTC) X-FDA: 79273350450.12.4DCB24A Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 5DEA340016 for ; Tue, 22 Mar 2022 21:44:05 +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 dfw.source.kernel.org (Postfix) with ESMTPS id D2D9561347; Tue, 22 Mar 2022 21:44:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3450DC340EC; Tue, 22 Mar 2022 21:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985444; bh=xgqZDbTzEsfmPCiFaNGMAyorMwxLVu3/TxjnXbwlF0g=; h=Date:To:From:In-Reply-To:Subject:From; b=UN4AfFbF1qt7cw8LtPLdLjeWFXkhyNcLQDOXuJswVbXLEsnSXEpB3nj9jiFd3Ui1E kn/HrUMz+OJMTlBnAeBndv10VMw7zN1cvjGZl4/ts35fhuELeCAsoXfYH9AOp632Qk DwTzyhc3tnHZlYdTckVGsq3x7TJac0Yskcz9v4mo= Date: Tue, 22 Mar 2022 14:44:03 -0700 To: shy828301@gmail.com,osalvador@suse.de,mike.kravetz@oracle.com,linmiaohe@huawei.com,anshuman.khandual@arm.com,naoya.horiguchi@nec.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 109/227] mm/memory-failure.c: remove obsolete comment Message-Id: <20220322214404.3450DC340EC@smtp.kernel.org> Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=UN4AfFbF; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: amh9kj4auf754b4a49zeb6eurggbz9a6 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5DEA340016 X-HE-Tag: 1647985445-110351 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: Naoya Horiguchi Subject: mm/memory-failure.c: remove obsolete comment With the introduction of mf_mutex, most of memory error handling process is mutually exclusive, so the in-line comment about subtlety about double-checking PageHWPoison is no more correct. So remove it. Link: https://lkml.kernel.org/r/20220125025601.3054511-1-naoya.horiguchi@linux.dev Signed-off-by: Naoya Horiguchi Suggested-by: Mike Kravetz Reviewed-by: Miaohe Lin Reviewed-by: Anshuman Khandual Reviewed-by: Oscar Salvador Reviewed-by: Yang Shi Signed-off-by: Andrew Morton --- mm/memory-failure.c | 6 ------ 1 file changed, 6 deletions(-) --- a/mm/memory-failure.c~mm-hwpoison-remove-obsolete-comment +++ a/mm/memory-failure.c @@ -2150,12 +2150,6 @@ static int __soft_offline_page(struct pa .gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL, }; - /* - * Check PageHWPoison again inside page lock because PageHWPoison - * is set by memory_failure() outside page lock. Note that - * memory_failure() also double-checks PageHWPoison inside page lock, - * so there's no race between soft_offline_page() and memory_failure(). - */ lock_page(page); if (!PageHuge(page)) wait_on_page_writeback(page);