From mboxrd@z Thu Jan 1 00:00:00 1970 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 1A44BDF40 for ; Mon, 15 May 2023 16:34:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7458FC433D2; Mon, 15 May 2023 16:34:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684168493; bh=6zQJrTrCySfAC6ErQAqxHcooDU2y+RHvUH2F4gzCCnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yUUdPfVZ7OBThGdUDZXK0oyZxS3JBs6FNswO36GcDZ2VAXHM7KY3lR0D9vW3FYyqu 5bPFJcUp27YLLabzD+jfuEk67K2/ANlMsM7jYHboUXkkjhJRmx6Qm2HS6fiycs5dtw SBZwpTDzZdy4S0ibkMLIV4AebGn/tvgAsGvkvhQI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Trond Myklebust , Anna Schumaker , Sasha Levin Subject: [PATCH 4.14 068/116] NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease Date: Mon, 15 May 2023 18:26:05 +0200 Message-Id: <20230515161700.550857320@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230515161658.228491273@linuxfoundation.org> References: <20230515161658.228491273@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Trond Myklebust [ Upstream commit 40882deb83c29d8df4470d4e5e7f137b6acf7ad1 ] The spec requires that we always at least send a RECLAIM_COMPLETE when we're done establishing the lease and recovering any state. Fixes: fce5c838e133 ("nfs41: RECLAIM_COMPLETE functionality") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- fs/nfs/nfs4state.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 9616f7eacd4cb..85e005efc9779 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -65,6 +65,8 @@ #define OPENOWNER_POOL_SIZE 8 +static void nfs4_state_start_reclaim_reboot(struct nfs_client *clp); + const nfs4_stateid zero_stateid = { { .data = { 0 } }, .type = NFS4_SPECIAL_STATEID_TYPE, @@ -321,6 +323,8 @@ int nfs41_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) status = nfs4_proc_create_session(clp, cred); if (status != 0) goto out; + if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_CONFIRMED_R)) + nfs4_state_start_reclaim_reboot(clp); nfs41_finish_session_reset(clp); nfs_mark_client_ready(clp, NFS_CS_READY); out: -- 2.39.2