patch-2.1.118 linux/fs/lockd/svclock.c

Next file: linux/fs/minix/dir.c
Previous file: linux/fs/lockd/clntproc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.117/linux/fs/lockd/svclock.c linux/fs/lockd/svclock.c
@@ -158,10 +158,8 @@
 
 	/* Set notifier function for VFS, and init args */
 	lock->fl.fl_notify = nlmsvc_notify_blocked;
-	if (!nlmclnt_setgrantargs(&block->b_call, lock)) {
-		kfree(block);
-		goto failed;
-	}
+	if (!nlmclnt_setgrantargs(&block->b_call, lock))
+		goto failed_free;
 	block->b_call.a_args.cookie = cookie;	/* see above */
 
 	dprintk("lockd: created block %p...\n", block);
@@ -182,6 +180,8 @@
 
 	return block;
 
+failed_free:
+	kfree(block);
 failed:
 	nlm_release_host(host);
 	return NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov