Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | NFSv4: pass lease period in seconds to nfs4_set_lease_period()fs/ fs/ fs/ +1 more | +7 | 0 replies | |
| 2/2 | NFSv4: limit lease period in nfs4_set_lease_period()fs/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2]
The nfs_client::cl_lease_time field (as well as the jiffies variable it's used with) is declared as *unsigned long*, which is 32-bit type on 32-bit arches and 64-bit type on 64-bit arches. When nfs4_set_lease_period() that sets nfs_client::cl_lease_time is called, 32-bit nfs_fsinfo::lease_time field is multiplied by HZ -- that might overflow before being implicitly cast to *unsigned long*. Actually, there's no need to multiply by HZ at all the call sites of nfs4_set_lease_period() -- it makes more sense to do that once, inside that function. That way, we can avoid such overflow by capping the lease period at e.g. 1 hour before multipying it by HZ...
The patches below are against the linux-next branch of Trond Myklebust's linux-nfs.git repo.
Sergey Shtylyov (2):
NFSv4: pass lease period in seconds to nfs4_set_lease_period()
NFSv4: limit lease period in nfs4_set_lease_period()
fs/nfs/nfs4_fs.h | 3 +-- fs/nfs/nfs4proc.c | 2 +- fs/nfs/nfs4renewd.c | 15 ++++++++++++--- fs/nfs/nfs4state.c | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-)
Signature · 1 line
2.52.0