aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfssvc.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-03-29 10:54:33 -0400
committerJ. Bruce Fields <bfields@redhat.com>2012-04-11 17:55:06 -0400
commite3f70eadb7dddfb5a2bb9afff7abfc6ee17a29d0 (patch)
tree688a94f2c86e0d7c637609239925f94f8ee08626 /fs/nfsd/nfssvc.c
parentf890edbbeff6928b7db0c6179a9036cbd4f0efbf (diff)
Lockd: pass network namespace to creation and destruction routines
v2: dereference of most probably already released nlm_host removed in nlmclnt_done() and reclaimer(). These routines are called from locks reclaimer() kernel thread. This thread works in "init_net" network context and currently relays on persence on lockd thread and it's per-net resources. Thus lockd_up() and lockd_down() can't relay on current network context. So let's pass corrent one into them. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r--fs/nfsd/nfssvc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 28dfad39f0c5..78e521392df1 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -220,7 +220,7 @@ static int nfsd_startup(unsigned short port, int nrservs)
220 ret = nfsd_init_socks(port); 220 ret = nfsd_init_socks(port);
221 if (ret) 221 if (ret)
222 goto out_racache; 222 goto out_racache;
223 ret = lockd_up(); 223 ret = lockd_up(&init_net);
224 if (ret) 224 if (ret)
225 goto out_racache; 225 goto out_racache;
226 ret = nfs4_state_start(); 226 ret = nfs4_state_start();
@@ -229,7 +229,7 @@ static int nfsd_startup(unsigned short port, int nrservs)
229 nfsd_up = true; 229 nfsd_up = true;
230 return 0; 230 return 0;
231out_lockd: 231out_lockd:
232 lockd_down(); 232 lockd_down(&init_net);
233out_racache: 233out_racache:
234 nfsd_racache_shutdown(); 234 nfsd_racache_shutdown();
235 return ret; 235 return ret;
@@ -246,7 +246,7 @@ static void nfsd_shutdown(void)
246 if (!nfsd_up) 246 if (!nfsd_up)
247 return; 247 return;
248 nfs4_state_shutdown(); 248 nfs4_state_shutdown();
249 lockd_down(); 249 lockd_down(&init_net);
250 nfsd_racache_shutdown(); 250 nfsd_racache_shutdown();
251 nfsd_up = false; 251 nfsd_up = false;
252} 252}