From patchwork Tue Jan 25 02:56:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12723208 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 3CD71C433EF for ; Tue, 25 Jan 2022 02:56:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C0CC26B0081; Mon, 24 Jan 2022 21:56:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BBC506B0083; Mon, 24 Jan 2022 21:56:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A842F6B0085; Mon, 24 Jan 2022 21:56:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 98B306B0081 for ; Mon, 24 Jan 2022 21:56:14 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4B674181951D9 for ; Tue, 25 Jan 2022 02:56:14 +0000 (UTC) X-FDA: 79067295468.18.1225D97 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf25.hostedemail.com (Postfix) with ESMTP id A9377A0004 for ; Tue, 25 Jan 2022 02:56:13 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1643079371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6AetOp+8FdkUYbmk8I3HLjqKFozMoot/fWYEIyFqQAQ=; b=clbsC5NJNdlePMqHXL4s852FIg7vc3ItTIg6HrAVwLXwvTRNoLA+YHvKj1XnwO7fJGTJv1 Zvxk/7eprV2L9uimJkHH3tqmNEFBxjmjW0YfS+3j7TRSLDnThAFUu22eyicUA7tiYOzy+Y 3W0nXra8eT2O8jCCEW/rfpf5mIvR14A= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Mike Kravetz , Tony Luck , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v1] mm, hwpoison: remove obsolete comment Date: Tue, 25 Jan 2022 11:56:01 +0900 Message-Id: <20220125025601.3054511-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Queue-Id: A9377A0004 X-Rspam-User: nil Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=clbsC5NJ; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf25.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-Stat-Signature: rh8kru88c6ncmqtw9popzu3esiq31o69 X-Rspamd-Server: rspam08 X-HE-Tag: 1643079373-361650 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 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. Suggested-by: Mike Kravetz Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin Reviewed-by: Anshuman Khandual Reviewed-by: Oscar Salvador Reviewed-by: Yang Shi --- mm/memory-failure.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 4c9bd1d37301..a6a1e02759e7 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -2146,12 +2146,6 @@ static int __soft_offline_page(struct page *page) .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);