Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347717
b: refs/heads/master
c: 6ff50b3
h: refs/heads/master
i:
  347715: 0e88af0
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Dec 10, 2012
1 parent 0c2f45f commit e5a80da
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 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: 081603520b25f7b35ef63a363376a17c36ef74ed
refs/heads/master: 6ff50b3dea9a242b50642a703b513986bffb8ce9
48 changes: 33 additions & 15 deletions trunk/fs/nfsd/nfssvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,27 @@ static int nfsd_init_socks(struct net *net)

static bool nfsd_up = false;

static int nfsd_startup_net(struct net *net)
{
int ret;

ret = nfsd_init_socks(net);
if (ret)
return ret;
ret = lockd_up(net);
if (ret)
return ret;
ret = nfs4_state_start_net(net);
if (ret)
goto out_lockd;

return 0;

out_lockd:
lockd_down(net);
return ret;
}

static int nfsd_startup(int nrservs, struct net *net)
{
int ret;
Expand All @@ -217,31 +238,29 @@ static int nfsd_startup(int nrservs, struct net *net)
ret = nfsd_racache_init(2*nrservs);
if (ret)
return ret;
ret = nfsd_init_socks(net);
if (ret)
goto out_racache;
ret = lockd_up(net);
if (ret)
goto out_racache;
ret = nfs4_state_start();
if (ret)
goto out_lockd;

ret = nfs4_state_start_net(net);
goto out_racache;
ret = nfsd_startup_net(net);
if (ret)
goto out_net_state;
goto out_net;

nfsd_up = true;
return 0;
out_net_state:

out_net:
nfs4_state_shutdown();
out_lockd:
lockd_down(net);
out_racache:
nfsd_racache_shutdown();
return ret;
}

static void nfsd_shutdown_net(struct net *net)
{
nfs4_state_shutdown_net(net);
lockd_down(net);
}

static void nfsd_shutdown(struct net *net)
{
/*
Expand All @@ -252,9 +271,8 @@ static void nfsd_shutdown(struct net *net)
*/
if (!nfsd_up)
return;
nfs4_state_shutdown_net(net);
nfsd_shutdown_net(net);
nfs4_state_shutdown();
lockd_down(net);
nfsd_racache_shutdown();
nfsd_up = false;
}
Expand Down

0 comments on commit e5a80da

Please sign in to comment.