Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320419
b: refs/heads/master
c: a51c84e
h: refs/heads/master
i:
  320417: 5e4d9b3
  320415: e812e24
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Jul 27, 2012
1 parent f0b2a0e commit 6546b81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5630f7fa97e8dfa2b3c6e7370c1702180336e493
refs/heads/master: a51c84ed502c25fed996afb7696fd7db2fa32fe2
1 change: 1 addition & 0 deletions trunk/fs/nfsd/netns.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 3 additions & 5 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3119,19 +3119,17 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
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);
/*
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6546b81

Please sign in to comment.