lkml.org 
[lkml]   [2018]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.14 040/161] nfs: Do not convert nfs_idmap_cache_timeout to jiffies
    Date
    From: Jan Chochol <jan@chochol.info>

    [ 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>
    ---
    fs/nfs/nfs4sysctl.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/nfs/nfs4sysctl.c b/fs/nfs/nfs4sysctl.c
    index 0d91d84e5822..c394e4447100 100644
    --- a/fs/nfs/nfs4sysctl.c
    +++ b/fs/nfs/nfs4sysctl.c
    @@ -32,7 +32,7 @@ static struct ctl_table nfs4_cb_sysctls[] = {
    .data = &nfs_idmap_cache_timeout,
    .maxlen = sizeof(int),
    .mode = 0644,
    - .proc_handler = proc_dointvec_jiffies,
    + .proc_handler = proc_dointvec,
    },
    { }
    };
    --
    2.15.1
    \
     
     \ /
      Last update: 2018-04-09 05:24    [W:4.177 / U:0.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site