aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2025-10-09 15:48:04 -0600
committerAnna Schumaker <anna.schumaker@oracle.com>2025-10-13 14:33:00 -0400
commit9bb3baa9d1604cd20f49ae7dac9306b4037a0e7a (patch)
treea372fe53c326a8fc053349b493492789a51a1ce9 /fs
parentNFS: check if suid/sgid was cleared after a write as needed (diff)
downloadlinux-9bb3baa9d1604cd20f49ae7dac9306b4037a0e7a.tar.gz
linux-9bb3baa9d1604cd20f49ae7dac9306b4037a0e7a.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 6fddf43d729c..5998d6bd8a4f 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -222,6 +222,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
clp->cl_state = 1 << NFS4CLNT_LEASE_EXPIRED;
clp->cl_mvops = nfs_v4_minor_ops[cl_init->minorversion];
clp->cl_mig_gen = 1;
+ clp->cl_last_renewal = jiffies;
#if IS_ENABLED(CONFIG_NFS_V4_1)
init_waitqueue_head(&clp->cl_lock_waitq);
#endif