From patchwork Sat Jan 8 16:43:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Lutomirski X-Patchwork-Id: 12707536 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 4953DC433F5 for ; Sat, 8 Jan 2022 16:44:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E7CA6B007D; Sat, 8 Jan 2022 11:44:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 057896B007E; Sat, 8 Jan 2022 11:44:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E13E96B0080; Sat, 8 Jan 2022 11:44:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0125.hostedemail.com [216.40.44.125]) by kanga.kvack.org (Postfix) with ESMTP id CB7CC6B007D for ; Sat, 8 Jan 2022 11:44:27 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 96ECD180CB07B for ; Sat, 8 Jan 2022 16:44:27 +0000 (UTC) X-FDA: 79007692974.29.E6A0BED Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id 39810140008 for ; Sat, 8 Jan 2022 16: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 dfw.source.kernel.org (Postfix) with ESMTPS id 712FA60DE6; Sat, 8 Jan 2022 16:44:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19D23C36AE3; Sat, 8 Jan 2022 16:44:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641660266; bh=kZ6ewOsIspZ5UP0WmGdsulngoycAuaq8Cf8dYc4KorQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nf4/sPAbWhWP+hg5cbRtORiMTUNtDoPJgpo+XlbzmdxaiI4aDAh+gRDd3LBs3jSdB E7MdZorBg0nGhL7W8XdLIzZAy2wFfunrxVnHkSRweDSFloVsl1ScCKPwqR5DcJQKD+ gg5zQ2t7i+CemQ7FNrsNzXCXMct/9u1Ds6Jg8las/6ldMd4yzif/Mtx+bzQ1uKQXT2 cCaHUMqAAt+gmHsMOE5N2MTkHaJiWbqJC9Ck/E86LuMNDiCawfA6TK5+s1mp3qycKr wW/yniY7NUlNbd0jnTbgpeenJ5MSCF5ZONgKQxXWuGGX+HBjPiU6Nj3+t5XVDdQeif nnJfyKWsI4uGA== From: Andy Lutomirski To: Andrew Morton , Linux-MM Cc: Nicholas Piggin , Anton Blanchard , Benjamin Herrenschmidt , Paul Mackerras , Randy Dunlap , linux-arch , x86@kernel.org, Rik van Riel , Dave Hansen , Peter Zijlstra , Nadav Amit , Mathieu Desnoyers , Andy Lutomirski Subject: [PATCH 08/23] membarrier: Remove redundant clear of mm->membarrier_state in exec_mmap() Date: Sat, 8 Jan 2022 08:43:53 -0800 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 39810140008 X-Stat-Signature: g47fw66dcmj4ht7p3gr1hd59dxa1ika3 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="Nf4/sPAb"; spf=pass (imf09.hostedemail.com: domain of luto@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=luto@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam10 X-HE-Tag: 1641660267-374301 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: exec_mmap() supplies a brand-new mm from mm_alloc(), and membarrier_state is already 0. There's no need to clear it again. Signed-off-by: Andy Lutomirski --- kernel/sched/membarrier.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c index eb73eeaedc7d..c38014c2ed66 100644 --- a/kernel/sched/membarrier.c +++ b/kernel/sched/membarrier.c @@ -285,7 +285,6 @@ void membarrier_exec_mmap(struct mm_struct *mm) * clearing this state. */ smp_mb(); - atomic_set(&mm->membarrier_state, 0); /* * Keep the runqueue membarrier_state in sync with this mm * membarrier_state.