patch-2.3.16 linux/fs/dcache.c

Next file: linux/fs/devpts/inode.c
Previous file: linux/fs/coda/upcall.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/fs/dcache.c linux/fs/dcache.c
@@ -20,6 +20,7 @@
 #include <linux/malloc.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
 
@@ -473,9 +474,11 @@
 {
 	if (gfp_mask & __GFP_IO) {
 		int count = 0;
+		lock_kernel();
 		if (priority)
 			count = dentry_stat.nr_unused / priority;
 		prune_dcache(count);
+		unlock_kernel();
 	}
 }
 

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