Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp386732lqs; Thu, 13 Jun 2024 12:58:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDb5slOEDxCWqX4fm3rCv1m+IqmazAONtNe39J+qaSmq6EVdt9PHKPS+MqI1cCu+1LuThmPzhgRpd2MXUornh9ZfHC3E3uukp2ahKziQ== X-Google-Smtp-Source: AGHT+IH/MhpTS0BfZanUVQJn8UGz+8/ur1+PzOWvMmygtTKc0lx8rk5yBJZxsQQwOwF08tHIJcCB X-Received: by 2002:a17:902:e546:b0:1f8:3b7c:dff6 with SMTP id d9443c01a7336-1f862a0ab3bmr7152015ad.65.1718308685626; Thu, 13 Jun 2024 12:58:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718308685; cv=pass; d=google.com; s=arc-20160816; b=JxsFtvYcfsnMTmuo7BC/EfezGE/YHkl12SR4PXA1FKYKVz5cglUeeOLmPia1MIlHrt EIOeO0f6L5yuFgGOMEQAkeEKhOcp2PF9geXeE8EjndWa/BaauDdY6Jwk4Yb+kFKB4Byz cW6DN3qhT8lFFuIHpC4TF5PJ/wSLeUg1wkJLyP719s9hQVR8OB/jZCfN6ZlxsSJ1XBt0 jeeZAtTi1JurdVOUM980l+++mib36vDiPARcbVQOaah+n88zajR1QtZWYwNBV/FL4veB v+qikTEeN4s5fCVocUkv4HaYTbovmc+zrb62bPW01cvg94RaICx4YpJjnNAhvWAWzTOZ STrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=0Y5NcOdmwcD6ItEE7StBu8wROyI/63GV6zCuc9Hvz5Q=; fh=+uWgxsSWHuCSXgmhevxSvZ4JDNPgzz87/v2C1+u0DeU=; b=hHRLH7Mui0BXH5UjYDYqUuz/fqwRzXAjoyqP+2x5//LeR1jdAJeP+RNIVlyazVmv3Q EmQWW4YgL0/UBdTOMwaZuHpHWNbHQhVzho2sVSpBvn5kR3dw24y1ZlJ/Uq4CD9V8trTY u054OJCTyf98YduJOcfig89XONTvoR86mq68UbDC96/tHwmV6irhkxIBVI6U3SuxVT+I LJ4EIuRYBVoMWCPmBlao4UdCCB01wxmbU57GCdiIfl0Xkx8egUeafTSF90n36zhEF/Nz lf91M8lGhg3D7Bw3FGdhwIxuk8lkTGv3Qtj7RDRLmL1C/4IykvKyoo2fF2aVLLelX/lS AGDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7f8btcR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee9e1bsi18359935ad.427.2024.06.13.12.58.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 12:58:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H7f8btcR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8E4C281A1B for ; Thu, 13 Jun 2024 19:56:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4A6D7829C; Thu, 13 Jun 2024 19:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H7f8btcR" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 800076F073 for ; Thu, 13 Jun 2024 19:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718308598; cv=none; b=B8f6955ms0ZH+YhFSWBH+7pPkfFPyI4+GZMAUCY5ZBJqDRKbhaL1fbSaFdgQpgblM9wlHR/HuuLrERWiovl3RcmJbYEm1/rKf0rfyEOUMZ480iG2YfWE6KZ6nPqT8y3jN6LmwmS3uvRjTodX+fV17nIzJZL37FpMXccZAEJcGg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718308598; c=relaxed/simple; bh=B/XlHtsKE5gb1PzMYcDy7jVGf9qsvNq4MddXmhlItmU=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=SBVyBjqcNCD9PMD3HAP/mSsbBjeAxXkvFRLWOkhZiCXjTeWXZJyW5qTR/FY7pCJkk6E4GVLXzR8fqKh0KKke0R7gUj+3pnCmmvDF8giPqO6R3NoeklOAsMe9ucXayp+tLNNW7RFAdZumQ+4T5k4GaUEQITt0aHklglyD9n7uu/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H7f8btcR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4F39C32786; Thu, 13 Jun 2024 19:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718308598; bh=B/XlHtsKE5gb1PzMYcDy7jVGf9qsvNq4MddXmhlItmU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=H7f8btcRsv88+z0/3eBxc1wR7TrjG2Lb73Sk273hyzmNcJyca74Mb/G1ZrPFM22gB Eoi/7pQ8LqJ6RlEhkborGIUEik2O+dGNvCYhJ4kuhUSxODRS7cXS9+sPLy6B1M37/A UZCdY9Y5tnO6Hpun9ThLg8faad2voCOYF1IVOEtU8cL7LHbUdy/IsE5bnvqXwlKgfO K6VxDJlUuW8B6hT625tqhX7AAtIbb5W9zbTEYMquN2dJSM28mzkSzmNROuZs+k2RyD Wa++rSCa3fkdL6+LoqLPUY56R7aCMxJ8XhZOZVw1MzFuYXrDVNrgdB/oryyW5Si8ax +xC0E6Or36/gw== Message-ID: <4ccfb492bd6af24f8bdfd085d369c7c94c1865d1.camel@kernel.org> Subject: Re: [PATCH 2/3] nfs: Properly initialize server->writeback From: Jeff Layton To: Jan Kara , Trond Myklebust Cc: linux-nfs@vger.kernel.org, Neil Brown Date: Thu, 13 Jun 2024 15:56:36 -0400 In-Reply-To: <20240613082821.849-2-jack@suse.cz> References: <20240612153022.25454-1-jack@suse.cz> <20240613082821.849-2-jack@suse.cz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-06-13 at 10:28 +0200, Jan Kara wrote: > Atomic types should better be initialized with atomic_long_set() > instead > of relying on zeroing done by kzalloc(). Clean this up. >=20 > Signed-off-by: Jan Kara > --- > =C2=A0fs/nfs/client.c | 2 ++ > =C2=A01 file changed, 2 insertions(+) >=20 > diff --git a/fs/nfs/client.c b/fs/nfs/client.c > index de77848ae654..3b252dceebf5 100644 > --- a/fs/nfs/client.c > +++ b/fs/nfs/client.c > @@ -994,6 +994,8 @@ struct nfs_server *nfs_alloc_server(void) > =C2=A0 > =C2=A0 server->change_attr_type =3D NFS4_CHANGE_TYPE_IS_UNDEFINED; > =C2=A0 > + atomic_long_set(&server->writeback, 0); > + > =C2=A0 ida_init(&server->openowner_id); > =C2=A0 ida_init(&server->lockowner_id); > =C2=A0 pnfs_init_server(server); I'm guilty of doing this, well, all over the place. Is there any plausible scenario where another task could see this value set to non- zero after kzalloc()? One would hope not... -- Jeff Layton