V2: Make sure, code doesn't depend on CONFIG_NFS_V4_1. I've scattered #endifs and #ifdefs into the source instead of moving code into other areas to be more friendly to git. Tell me if you prefer otherwise. Currently, nfs mounts with vers=4.0 do not pick up a updated lease_time after a restart of the nfs server. This was discussed in the thread "4.0 client and server restart with decreased lease time" on linux-nfs [1]. This patch set fixes the issue for nsf4.0 clients so that hey behave as nfs4.1 and nfs4.2 clients do. After a new clientID is established, the lease_time is re-fetched and used. Tested with CONFIG_NFS_V4=m CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y : mount CONFIG_NFS_V4=m CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y : mount vers=4.0 CONFIG_NFS_V4=m CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=n : mount CONFIG_NFS_V4=m CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=n : mount vers=4.0 CONFIG_NFS_V4=m CONFIG_NFS_V4_1=n CONFIG_NFS_V4_2=n : mount and several restarts of the nfs server with changed leases times, which were picked up by the client. [1] https://marc.info/?t=154954022700002&r=1&w=2 Donald Buczek (4): nfs: Fix copy-and-paste error in debug message nfs4: Make nfs4_proc_get_lease_time available for nfs4.0 nfs4: Rename nfs41_setup_state_renewal nfs4.0: Refetch lease_time after clientid update fs/nfs/nfs4_fs.h | 4 ++-- fs/nfs/nfs4proc.c | 6 +++++- fs/nfs/nfs4state.c | 46 +++++++++++++++++++++++----------------------- fs/nfs/nfs4xdr.c | 14 ++++++++++++-- 4 files changed, 42 insertions(+), 28 deletions(-) -- 2.22.0