patch-2.4.0-test3 linux/fs/nfs/symlink.c

Next file: linux/fs/nfsd/export.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test2/linux/fs/nfs/symlink.c linux/fs/nfs/symlink.c
@@ -22,6 +22,7 @@
 #include <linux/mm.h>
 #include <linux/malloc.h>
 #include <linux/string.h>
+#include <linux/smp_lock.h>
 
 /* Symlink caching in the page cache is even more simplistic
  * and straight-forward than readdir caching.
@@ -36,8 +37,10 @@
 	 * in host byte order, followed by the string.  The
 	 * XDR response verification will NULL terminate it.
 	 */
+	lock_kernel();
 	error = NFS_PROTO(inode)->readlink(dentry, buffer,
 					   PAGE_CACHE_SIZE - sizeof(u32)-4);
+	unlock_kernel();
 	if (error < 0)
 		goto error;
 	SetPageUptodate(page);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)