diff options
Diffstat (limited to 'fs/lockd/clntlock.c')
| -rw-r--r-- | fs/lockd/clntlock.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index ba1dc2eebd1e..ca0a08001449 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
| @@ -56,7 +56,7 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init) | |||
| 56 | u32 nlm_version = (nlm_init->nfs_version == 2) ? 1 : 4; | 56 | u32 nlm_version = (nlm_init->nfs_version == 2) ? 1 : 4; |
| 57 | int status; | 57 | int status; |
| 58 | 58 | ||
| 59 | status = lockd_up(); | 59 | status = lockd_up(nlm_init->net); |
| 60 | if (status < 0) | 60 | if (status < 0) |
| 61 | return ERR_PTR(status); | 61 | return ERR_PTR(status); |
| 62 | 62 | ||
| @@ -65,7 +65,7 @@ struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init) | |||
| 65 | nlm_init->hostname, nlm_init->noresvport, | 65 | nlm_init->hostname, nlm_init->noresvport, |
| 66 | nlm_init->net); | 66 | nlm_init->net); |
| 67 | if (host == NULL) { | 67 | if (host == NULL) { |
| 68 | lockd_down(); | 68 | lockd_down(nlm_init->net); |
| 69 | return ERR_PTR(-ENOLCK); | 69 | return ERR_PTR(-ENOLCK); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| @@ -80,8 +80,10 @@ EXPORT_SYMBOL_GPL(nlmclnt_init); | |||
| 80 | */ | 80 | */ |
| 81 | void nlmclnt_done(struct nlm_host *host) | 81 | void nlmclnt_done(struct nlm_host *host) |
| 82 | { | 82 | { |
| 83 | struct net *net = host->net; | ||
| 84 | |||
| 83 | nlmclnt_release_host(host); | 85 | nlmclnt_release_host(host); |
| 84 | lockd_down(); | 86 | lockd_down(net); |
| 85 | } | 87 | } |
| 86 | EXPORT_SYMBOL_GPL(nlmclnt_done); | 88 | EXPORT_SYMBOL_GPL(nlmclnt_done); |
| 87 | 89 | ||
| @@ -220,11 +222,12 @@ reclaimer(void *ptr) | |||
| 220 | struct nlm_wait *block; | 222 | struct nlm_wait *block; |
| 221 | struct file_lock *fl, *next; | 223 | struct file_lock *fl, *next; |
| 222 | u32 nsmstate; | 224 | u32 nsmstate; |
| 225 | struct net *net = host->net; | ||
| 223 | 226 | ||
| 224 | allow_signal(SIGKILL); | 227 | allow_signal(SIGKILL); |
| 225 | 228 | ||
| 226 | down_write(&host->h_rwsem); | 229 | down_write(&host->h_rwsem); |
| 227 | lockd_up(); /* note: this cannot fail as lockd is already running */ | 230 | lockd_up(net); /* note: this cannot fail as lockd is already running */ |
| 228 | 231 | ||
| 229 | dprintk("lockd: reclaiming locks for host %s\n", host->h_name); | 232 | dprintk("lockd: reclaiming locks for host %s\n", host->h_name); |
| 230 | 233 | ||
| @@ -275,6 +278,6 @@ restart: | |||
| 275 | 278 | ||
| 276 | /* Release host handle after use */ | 279 | /* Release host handle after use */ |
| 277 | nlmclnt_release_host(host); | 280 | nlmclnt_release_host(host); |
| 278 | lockd_down(); | 281 | lockd_down(net); |
| 279 | return 0; | 282 | return 0; |
| 280 | } | 283 | } |
