]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/lockd/svcsubs.c
[PATCH] knfsd: misc minor fixes, indentation changes
[karo-tx-linux.git] / fs / lockd / svcsubs.c
index 01b4db9e5466d51f98383c221e41a8ede824421c..c8308bccd31967f61d48c940a8dafcecce0cee80 100644 (file)
@@ -100,11 +100,10 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
        nlm_debug_print_fh("creating file for", f);
 
        nfserr = nlm_lck_denied_nolocks;
-       file = (struct nlm_file *) kmalloc(sizeof(*file), GFP_KERNEL);
+       file = kzalloc(sizeof(*file), GFP_KERNEL);
        if (!file)
                goto out_unlock;
 
-       memset(file, 0, sizeof(*file));
        memcpy(&file->f_handle, f, sizeof(struct nfs_fh));
        file->f_hash = hash;
        init_MUTEX(&file->f_sema);
@@ -116,7 +115,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
         * the file.
         */
        if ((nfserr = nlmsvc_ops->fopen(rqstp, f, &file->f_file)) != 0) {
-               dprintk("lockd: open failed (nfserr %d)\n", ntohl(nfserr));
+               dprintk("lockd: open failed (error %d)\n", nfserr);
                goto out_free;
        }
 
@@ -314,10 +313,12 @@ nlmsvc_free_host_resources(struct nlm_host *host)
 {
        dprintk("lockd: nlmsvc_free_host_resources\n");
 
-       if (nlm_traverse_files(host, NLM_ACT_UNLOCK))
+       if (nlm_traverse_files(host, NLM_ACT_UNLOCK)) {
                printk(KERN_WARNING
-                       "lockd: couldn't remove all locks held by %s",
+                       "lockd: couldn't remove all locks held by %s\n",
                        host->h_name);
+               BUG();
+       }
 }
 
 /*