Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320402
b: refs/heads/master
c: 57c8b13
h: refs/heads/master
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Jul 25, 2012
1 parent fb13001 commit 7730c81
Show file tree
Hide file tree
Showing 3 changed files with 8 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: 19f7e2ca44dfc3c1b3f499fc46801f98d403500f
refs/heads/master: 57c8b13e3cd0f94944c9691ce7f58e5fcef8a12d
2 changes: 2 additions & 0 deletions trunk/fs/nfsd/nfsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ static inline void nfsd_destroy(struct net *net)
if (destroy)
svc_shutdown_net(nfsd_serv, net);
svc_destroy(nfsd_serv);
if (destroy)
nfsd_serv = NULL;
}

#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
Expand Down
10 changes: 5 additions & 5 deletions trunk/fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ static void nfsd_shutdown(void)

static void nfsd_last_thread(struct svc_serv *serv, struct net *net)
{
/* When last nfsd thread exits we need to do some clean-up */
nfsd_serv = NULL;
nfsd_shutdown();

svc_rpcb_cleanup(serv, net);
Expand Down Expand Up @@ -332,6 +330,7 @@ static int nfsd_get_default_max_blksize(void)
int nfsd_create_serv(void)
{
int error;
struct net *net = current->nsproxy->net_ns;

WARN_ON(!mutex_is_locked(&nfsd_mutex));
if (nfsd_serv) {
Expand All @@ -346,7 +345,7 @@ int nfsd_create_serv(void)
if (nfsd_serv == NULL)
return -ENOMEM;

error = svc_bind(nfsd_serv, current->nsproxy->net_ns);
error = svc_bind(nfsd_serv, net);
if (error < 0) {
svc_destroy(nfsd_serv);
return error;
Expand Down Expand Up @@ -557,12 +556,13 @@ nfsd(void *vrqstp)
nfsdstats.th_cnt --;

out:
if (rqstp->rq_server->sv_nrthreads == 1)
svc_shutdown_net(rqstp->rq_server, &init_net);
rqstp->rq_server = NULL;

/* Release the thread */
svc_exit_thread(rqstp);

nfsd_destroy(&init_net);

/* Release module */
mutex_unlock(&nfsd_mutex);
module_put_and_exit(0);
Expand Down

0 comments on commit 7730c81

Please sign in to comment.