diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-07-25 08:57:37 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-07-27 16:49:22 -0400 |
commit | a51c84ed502c25fed996afb7696fd7db2fa32fe2 (patch) | |
tree | 45e3497db498aa0f2f2dc9bfb46dcee24dc3e4d8 /fs/nfsd/nfs4state.c | |
parent | 5630f7fa97e8dfa2b3c6e7370c1702180336e493 (diff) |
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/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
1 files changed, 3 insertions, 5 deletions
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: | |||
3119 | return status; | 3119 | return status; |
3120 | } | 3120 | } |
3121 | 3121 | ||
3122 | static bool grace_ended; | ||
3123 | |||
3124 | static void | 3122 | static void |
3125 | nfsd4_end_grace(struct net *net) | 3123 | nfsd4_end_grace(struct net *net) |
3126 | { | 3124 | { |
3127 | struct nfsd_net *nn = net_generic(net, nfsd_net_id); | 3125 | struct nfsd_net *nn = net_generic(net, nfsd_net_id); |
3128 | 3126 | ||
3129 | /* do nothing if grace period already ended */ | 3127 | /* do nothing if grace period already ended */ |
3130 | if (grace_ended) | 3128 | if (nn->grace_ended) |
3131 | return; | 3129 | return; |
3132 | 3130 | ||
3133 | dprintk("NFSD: end of grace period\n"); | 3131 | dprintk("NFSD: end of grace period\n"); |
3134 | grace_ended = true; | 3132 | nn->grace_ended = true; |
3135 | nfsd4_record_grace_done(net, boot_time); | 3133 | nfsd4_record_grace_done(net, boot_time); |
3136 | locks_end_grace(&nn->nfsd4_manager); | 3134 | locks_end_grace(&nn->nfsd4_manager); |
3137 | /* | 3135 | /* |
@@ -4705,7 +4703,7 @@ nfs4_state_start(void) | |||
4705 | nfsd4_client_tracking_init(net); | 4703 | nfsd4_client_tracking_init(net); |
4706 | boot_time = get_seconds(); | 4704 | boot_time = get_seconds(); |
4707 | locks_start_grace(net, &nn->nfsd4_manager); | 4705 | locks_start_grace(net, &nn->nfsd4_manager); |
4708 | grace_ended = false; | 4706 | nn->grace_ended = false; |
4709 | printk(KERN_INFO "NFSD: starting %ld-second grace period\n", | 4707 | printk(KERN_INFO "NFSD: starting %ld-second grace period\n", |
4710 | nfsd4_grace); | 4708 | nfsd4_grace); |
4711 | ret = set_callback_cred(); | 4709 | ret = set_callback_cred(); |