提交 a51c84ed 编写于 作者: S Stanislav Kinsbursky 提交者: J. Bruce Fields

NFSd: make grace end flag per network namespace

Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 5630f7fa
......@@ -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;
......
......@@ -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);
/*
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册