aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-10-04 05:15:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:16 -0400
commitf0737a39a64a9df32bb045c54e1cdf6cecdcbdd7 (patch)
treea43dd888bd2af9511ef5a0c3aeb1f4cb50ca44a2 /fs/lockd
parent8dead0dbd478f35fd943f3719591e5af1ac0950d (diff)
[PATCH] knfsd: misc minor fixes, indentation changes
cleans up some code in lockd/host.c, fixes an error printk and makes it a fatal BUG if nlmsvc_free_host_resources fails. Signed-off-by: Olaf Kirch <okir@suse.de> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/host.c15
-rw-r--r--fs/lockd/svcsubs.c8
2 files changed, 11 insertions, 12 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 0bf4afb71d25..4990223a3e18 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -110,16 +110,13 @@ nlm_lookup_host(int server, const struct sockaddr_in *sin,
110 if (host->h_server != server) 110 if (host->h_server != server)
111 continue; 111 continue;
112 112
113 { 113 if (hp != nlm_hosts + hash) {
114 if (hp != nlm_hosts + hash) { 114 *hp = host->h_next;
115 *hp = host->h_next; 115 host->h_next = nlm_hosts[hash];
116 host->h_next = nlm_hosts[hash]; 116 nlm_hosts[hash] = host;
117 nlm_hosts[hash] = host;
118 }
119 nlm_get_host(host);
120 mutex_unlock(&nlm_host_mutex);
121 return host;
122 } 117 }
118 nlm_get_host(host);
119 goto out;
123 } 120 }
124 121
125 /* Sadly, the host isn't in our hash table yet. See if 122 /* Sadly, the host isn't in our hash table yet. See if
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index a92dd98f8401..c8308bccd319 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -115,7 +115,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
115 * the file. 115 * the file.
116 */ 116 */
117 if ((nfserr = nlmsvc_ops->fopen(rqstp, f, &file->f_file)) != 0) { 117 if ((nfserr = nlmsvc_ops->fopen(rqstp, f, &file->f_file)) != 0) {
118 dprintk("lockd: open failed (nfserr %d)\n", ntohl(nfserr)); 118 dprintk("lockd: open failed (error %d)\n", nfserr);
119 goto out_free; 119 goto out_free;
120 } 120 }
121 121
@@ -313,10 +313,12 @@ nlmsvc_free_host_resources(struct nlm_host *host)
313{ 313{
314 dprintk("lockd: nlmsvc_free_host_resources\n"); 314 dprintk("lockd: nlmsvc_free_host_resources\n");
315 315
316 if (nlm_traverse_files(host, NLM_ACT_UNLOCK)) 316 if (nlm_traverse_files(host, NLM_ACT_UNLOCK)) {
317 printk(KERN_WARNING 317 printk(KERN_WARNING
318 "lockd: couldn't remove all locks held by %s", 318 "lockd: couldn't remove all locks held by %s\n",
319 host->h_name); 319 host->h_name);
320 BUG();
321 }
320} 322}
321 323
322/* 324/*