Skip to content

Commit 9bb3baa

Browse files
JPEWdevAnna Schumaker
authored andcommitted
NFS4: Fix state renewals missing after boot
Since the last renewal time was initialized to 0 and jiffies start counting at -5 minutes, any clients connected in the first 5 minutes after a reboot would have their renewal timer set to a very long interval. If the connection was idle, this would result in the client state timing out on the server and the next call to the server would return NFS4ERR_BADSESSION. Fix this by initializing the last renewal time to the current jiffies instead of 0. Signed-off-by: Joshua Watt <jpewhacker@gmail.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
1 parent 9ff022f commit 9bb3baa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/nfs4client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
222222
clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED;
223223
clp->cl_mvops = nfs_v4_minor_ops[cl_init->minorversion];
224224
clp->cl_mig_gen = 1;
225+
clp->cl_last_renewal = jiffies;
225226
#if IS_ENABLED(CONFIG_NFS_V4_1)
226227
init_waitqueue_head(&clp->cl_lock_waitq);
227228
#endif

0 commit comments

Comments
 (0)