summaryrefslogtreecommitdiffstats
path: root/fs/qnx4/fsync.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
commit529c593ece216e4aaffd36bd940cb94f1fa63129 (patch)
tree78f1c0b805f5656aa7b0417a043c5346f700a2cf /fs/qnx4/fsync.c
parent0bd079751d25808d1972baee5c4eaa1db2227257 (diff)
Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c
driver due to the Origin A64 hacks.
Diffstat (limited to 'fs/qnx4/fsync.c')
-rw-r--r--fs/qnx4/fsync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/qnx4/fsync.c b/fs/qnx4/fsync.c
index 4cea74fe5..e90291f03 100644
--- a/fs/qnx4/fsync.c
+++ b/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 @@ int qnx4_sync_file(struct file *file, struct dentry *dentry)
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;
}