diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-11-27 14:11:49 +0300 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-11-28 10:39:47 -0500 |
commit | 5284b44e438580a50e8cc5189297a73a48a45ecb (patch) | |
tree | 6005ff239965eb1d2ba59d2f2a8028e4c2eee301 /fs/nfsd/nfsctl.c | |
parent | 3d7337115d06f21970e23684f4d2e62e3a44c572 (diff) | |
download | linux-5284b44e438580a50e8cc5189297a73a48a45ecb.tar.bz2 |
nfsd: make NFSv4 grace time per net
Grace time is a part of NFSv4 state engine, which is constructed per network
namespace.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 09d909a42ece..d902f83681e7 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -925,7 +925,8 @@ static ssize_t write_leasetime(struct file *file, char *buf, size_t size) */ static ssize_t write_gracetime(struct file *file, char *buf, size_t size) { - return nfsd4_write_time(file, buf, size, &nfsd4_grace); + struct nfsd_net *nn = net_generic(&init_net, nfsd_net_id); + return nfsd4_write_time(file, buf, size, &nn->nfsd4_grace); } static ssize_t __write_recoverydir(struct file *file, char *buf, size_t size) @@ -1070,6 +1071,7 @@ static __net_init int nfsd_init_net(struct net *net) if (retval) goto out_idmap_error; nn->nfsd4_lease = 90; /* default lease time */ + nn->nfsd4_grace = 90; return 0; out_idmap_error: |