patch-2.1.126 linux/fs/lockd/clntlock.c

Next file: linux/fs/minix/bitmap.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/fs/lockd/clntlock.c linux/fs/lockd/clntlock.c
@@ -15,6 +15,7 @@
 #include <linux/sunrpc/clnt.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/lockd/lockd.h>
+#include <linux/smp_lock.h>
 
 #define NLMDBG_FACILITY		NLMDBG_CIENT
 
@@ -167,6 +168,7 @@
 
 	/* This one ensures that our parent doesn't terminate while the
 	 * reclaim is in progress */
+	lock_kernel();
 	lockd_up();
 
 	/* First, reclaim all locks that have been granted previously. */
@@ -198,6 +200,7 @@
 	/* Release host handle after use */
 	nlm_release_host(host);
 	lockd_down();
+	unlock_kernel();
 
 	return 0;
 }

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