OSDN Git Service

nfs: Do not convert nfs_idmap_cache_timeout to jiffies
authorJan Chochol <jan@chochol.info>
Fri, 5 Jan 2018 07:39:12 +0000 (08:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:48:53 +0000 (07:48 +0200)
commit929d451024ee7a483fceb90b6a45696d02f2fed7
tree8080a42ddc952bd24505571ede949144f8316e0d
parent644bd813f744d66d95221a91025363daf60e0be3
nfs: Do not convert nfs_idmap_cache_timeout to jiffies

[ Upstream commit cbebc6ef4fc830f4040d4140bf53484812d5d5d9 ]

Since commit 57e62324e469 ("NFS: Store the legacy idmapper result in the
keyring") nfs_idmap_cache_timeout changed units from jiffies to seconds.
Unfortunately sysctl interface was not updated accordingly.

As a effect updating /proc/sys/fs/nfs/idmap_cache_timeout with some
value will incorrectly multiply this value by HZ.
Also reading /proc/sys/fs/nfs/idmap_cache_timeout will show real value
divided by HZ.

Fixes: 57e62324e469 ("NFS: Store the legacy idmapper result in the keyring")
Signed-off-by: Jan Chochol <jan@chochol.info>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs4sysctl.c