summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-07-25 16:57:37 +0400
committerJ. Bruce Fields <bfields@redhat.com>2012-07-28 00:49:22 +0400
commita51c84ed502c25fed996afb7696fd7db2fa32fe2 (patch)
tree45e3497db498aa0f2f2dc9bfb46dcee24dc3e4d8 /fs/nfsd
parent5630f7fa97e8dfa2b3c6e7370c1702180336e493 (diff)
downloadlinux-a51c84ed502c25fed996afb7696fd7db2fa32fe2.tar.xz
NFSd: make grace end flag 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')
-rw-r--r--fs/nfsd/netns.h1
-rw-r--r--fs/nfsd/nfs4state.c8
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index e99767d987c8..b6deebd08ef2 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -36,6 +36,7 @@ struct nfsd_net {
struct cache_detail *nametoid_cache;
struct lock_manager nfsd4_manager;
+ bool grace_ended;
};
extern int nfsd_net_id;
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 34f65f10fa43..aebb58d3ac4a 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3119,19 +3119,17 @@ out:
return status;
}
-static bool grace_ended;
-
static void
nfsd4_end_grace(struct net *net)
{
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
/* do nothing if grace period already ended */
- if (grace_ended)
+ if (nn->grace_ended)
return;
dprintk("NFSD: end of grace period\n");
- grace_ended = true;
+ nn->grace_ended = true;
nfsd4_record_grace_done(net, boot_time);
locks_end_grace(&nn->nfsd4_manager);
/*
@@ -4705,7 +4703,7 @@ nfs4_state_start(void)
nfsd4_client_tracking_init(net);
boot_time = get_seconds();
locks_start_grace(net, &nn->nfsd4_manager);
- grace_ended = false;
+ nn->grace_ended = false;
printk(KERN_INFO "NFSD: starting %ld-second grace period\n",
nfsd4_grace);
ret = set_callback_cred();