Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309786
b: refs/heads/master
c: 33dcc48
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Apr 11, 2012
1 parent d4056d9 commit 92d7433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: a9aa53df6e6c768fc0f25a7c80ba586b0290720a
refs/heads/master: 33dcc481eddc3f532732a9582095373fa5354369
11 changes: 9 additions & 2 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3155,10 +3155,17 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
static struct lock_manager nfsd4_manager = {
};

static bool grace_ended;

static void
nfsd4_end_grace(void)
{
/* do nothing if grace period already ended */
if (grace_ended)
return;

dprintk("NFSD: end of grace period\n");
grace_ended = true;
nfsd4_record_grace_done(&init_net, boot_time);
locks_end_grace(&nfsd4_manager);
/*
Expand All @@ -3183,8 +3190,7 @@ nfs4_laundromat(void)
nfs4_lock_state();

dprintk("NFSD: laundromat service - starting\n");
if (locks_in_grace())
nfsd4_end_grace();
nfsd4_end_grace();
INIT_LIST_HEAD(&reaplist);
spin_lock(&client_lock);
list_for_each_safe(pos, next, &client_lru) {
Expand Down Expand Up @@ -4718,6 +4724,7 @@ nfs4_state_start(void)
nfsd4_client_tracking_init(&init_net);
boot_time = get_seconds();
locks_start_grace(&nfsd4_manager);
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 92d7433

Please sign in to comment.