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>
This commit is contained in:
Stanislav Kinsbursky
2012-03-29 18:54:33 +04:00
committed by J. Bruce Fields
parent f890edbbef
commit e3f70eadb7
4 changed files with 16 additions and 14 deletions

View File

@@ -54,7 +54,7 @@ extern void nlmclnt_done(struct nlm_host *host);
extern int nlmclnt_proc(struct nlm_host *host, int cmd,
struct file_lock *fl);
extern int lockd_up(void);
extern void lockd_down(void);
extern int lockd_up(struct net *net);
extern void lockd_down(struct net *net);
#endif /* LINUX_LOCKD_BIND_H */