patch-2.3.43 linux/fs/qnx4/fsync.c

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

diff -u --recursive --new-file v2.3.42/linux/fs/qnx4/fsync.c linux/fs/qnx4/fsync.c
@@ -16,6 +16,7 @@
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/locks.h>
+#include <linux/smp_lock.h>
 
 #include <linux/fs.h>
 #include <linux/qnx4_fs.h>
@@ -156,10 +157,12 @@
 	      S_ISLNK(inode->i_mode)))
 		return -EINVAL;
 
+	lock_kernel();
 	for (wait = 0; wait <= 1; wait++) {
 		err |= sync_direct(inode, wait);
 	}
 	err |= qnx4_sync_inode(inode);
+	unlock_kernel();
 	return (err < 0) ? -EIO : 0;
 }
 

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