From patchwork Wed Oct 4 11:19:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Guzik X-Patchwork-Id: 148238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp55264vqb; Wed, 4 Oct 2023 04:20:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGNk9Z2qiUW0yaZ2Y2XvkNIswZ7hv7CiLjRB4rD45PRo0Fw1xSTP+QQ37VxZYiXa0pQv60 X-Received: by 2002:a17:903:41c4:b0:1c6:294c:f89c with SMTP id u4-20020a17090341c400b001c6294cf89cmr2222829ple.63.1696418405350; Wed, 04 Oct 2023 04:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696418405; cv=none; d=google.com; s=arc-20160816; b=SOfBqAjKofMghtc2tR/q23syLdU9YLoFg0AKgsUCZbOwqELhUPYhMn3/LUxB/lKq2R BPtbU4zsJ0VofYNWcZAXRL6RYTgYtJbtqzmiF4UAOwV28Nq2dOwKpWWIgOx4UJPuVxyx oS13VqGTy6qn7D8ZBmBCjshPvCHyWuDsVyRUAxV/4ASgCvNPRk0jMAdCNcr18pjflken ztihHus5ctKZAQ2xo13KhaLQW58CHItAInYT2FtIISmFZ6idhf/ZGetbPUt1e0PNxxkD W6LuWZZS3LQio75zcDXCvQidgTl/rYrVkDSjfjCNnpTVeCfFS3vUAX2da2fNHcf8O8kU Q8yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LdSMOqyI/Qm2nBy4+9Nq5mSXBIbAfD+yRNlJMg5NxcI=; fh=u0ivogzYbldFMm0SQ5Yx8JuIPu9MbRkx9T4GdN1pW8I=; b=f2r7IE/qSbqIHrzLRUhLGHhuYxTKFMmztA/NaEpJtASr7F2+ujeJhUtFBtd0iCcRSK Kvv/hAsFsm8q1TPlNfrQvMUPoLPDo2lORcY5EoIyG5CoC/i8JWKz1ZnfwWQ009Q7YNm+ /sXf8lI+sRZ0WmLBa9YrEUoXVZjKDRqfwyWXW/CUBvA3Fg6362tGgQDYcMGxwllSIDrO LmfVzkM9ewIDJ2NudzXoa2AM1KU0gy8aq1MbB+cUtAktzPnPnPGSt3rurLC+hZ0KnebB zDntx4gj5cl9LxsXGmBLreyprDdXgBiuvKUBTOWe58cvwm3LQIbIo00tjHCa5RrZy+RO 7O2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nozvkPIc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p3-20020a170902e74300b001c7345bc007si3740747plf.486.2023.10.04.04.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:20:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nozvkPIc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 52A3282662D7; Wed, 4 Oct 2023 04:20:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242252AbjJDLTo (ORCPT + 18 others); Wed, 4 Oct 2023 07:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242245AbjJDLTn (ORCPT ); Wed, 4 Oct 2023 07:19:43 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25ED6E5; Wed, 4 Oct 2023 04:19:39 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40675f06f1fso4630435e9.1; Wed, 04 Oct 2023 04:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696418377; x=1697023177; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LdSMOqyI/Qm2nBy4+9Nq5mSXBIbAfD+yRNlJMg5NxcI=; b=nozvkPIcSknqpkVEgY2Rzlp2QcitOBor26uqinVrTN26tfxYvkkcFhcVwKBpM3sHp3 disW0hQSFrJpUzsDnLS6iD7XGQn3xfVCQrZnhWY/pm+WzZi8phgP/sSHZa/nH5XWRK+z 4qLS6OUQxt7ODKauSb6cLeLypryGm06dTgoeotMyFJlPaBSN67c07hf/whRwjOzrBaEa iOr+lHonaiVXeFlb4APqlAd1jvuStTgTfd3fatBcgFiKhHa+r9kuCJOmYe+QjGmSSi6x Svytw22uj9z4pAksIyHlvbTs09eAYEX/aDnTkRCJgL1fzB31W37HyRjQaMMqo00YlsOS NPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696418377; x=1697023177; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LdSMOqyI/Qm2nBy4+9Nq5mSXBIbAfD+yRNlJMg5NxcI=; b=PLhP3deebjIPjQQIE2hoKd9AJe+VdbgMN4Qbvt1wsd9y5jE4DFzTBLSTKavS9ZLQQf 7tt2BgvvBRk5aRXEkRyh9CGYUu9QeZIv8un897C784pQYizsbHbfjcGuT3+aZrElwGZG L48rhtmlFdZXM1R06UolghPxktMwwUVxBQ/eFFt5fdY0BuVBcoSbIYTfSUm1jEh2MTHf jBTPEHZbmpbQbpqCRD+M2PDlt/8jp9Lh060UtBwtEJO2lgv7542a1/MejMpg39Y/7Jiq mGRGbUQGqItkCaVNSxZW2sIGlWfefLjShMb9Wj2HFX2MqoFtYyYpUVfhvZKjBnlvGQcs tMXQ== X-Gm-Message-State: AOJu0YzAeODohOLO44wegOsf29YYoHsgdi7026hDK18xkaRziud3q2az lxwTvV9j/qrFK4PNdpCz7fkXax7OQSM= X-Received: by 2002:a05:600c:4689:b0:405:29ba:9b5c with SMTP id p9-20020a05600c468900b0040529ba9b5cmr4403104wmo.16.1696418377246; Wed, 04 Oct 2023 04:19:37 -0700 (PDT) Received: from f.. (cst-prg-67-191.cust.vodafone.cz. [46.135.67.191]) by smtp.gmail.com with ESMTPSA id o16-20020adfead0000000b003266ece0fe2sm3761527wrn.98.2023.10.04.04.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 04:19:36 -0700 (PDT) From: Mateusz Guzik To: brauner@kernel.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Mateusz Guzik Subject: [PATCH 2/2] vfs: stop counting on gcc not messing with mnt_expiry_mark if not asked Date: Wed, 4 Oct 2023 13:19:16 +0200 Message-Id: <20231004111916.728135-3-mjguzik@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231004111916.728135-1-mjguzik@gmail.com> References: <20231004111916.728135-1-mjguzik@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 04:20:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778823625820503750 X-GMAIL-MSGID: 1778823625820503750 So happens it already was not doing it, but there is no need to "hope" as indicated in the comment. No changes in generated assembly. Signed-off-by: Mateusz Guzik --- fs/namespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index e157efc54023..d785bcb75111 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1344,9 +1344,9 @@ void mntput(struct vfsmount *mnt) { if (mnt) { struct mount *m = real_mount(mnt); - /* avoid cacheline pingpong, hope gcc doesn't get "smart" */ + /* avoid cacheline pingpong */ if (unlikely(m->mnt_expiry_mark)) - m->mnt_expiry_mark = 0; + WRITE_ONCE(m->mnt_expiry_mark, 0); mntput_no_expire(m); } }