patch-2.3.43 linux/fs/sysv/fsync.c
Next file: linux/fs/sysv/inode.c
Previous file: linux/fs/sysv/file.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Thu Feb 10 12:16:59 2000
- Orig file:
v2.3.42/linux/fs/sysv/fsync.c
- Orig date:
Tue Jun 29 09:22:08 1999
diff -u --recursive --new-file v2.3.42/linux/fs/sysv/fsync.c linux/fs/sysv/fsync.c
@@ -16,9 +16,9 @@
#include <linux/errno.h>
#include <linux/stat.h>
-
#include <linux/fs.h>
#include <linux/sysv_fs.h>
+#include <linux/smp_lock.h>
/* return values: 0 means OK/done, 1 means redo, -1 means I/O error. */
@@ -187,6 +187,7 @@
S_ISLNK(inode->i_mode)))
return -EINVAL;
+ lock_kernel();
for (wait=0; wait<=1; wait++) {
err |= sync_direct(inode, wait);
err |= sync_indirect(inode, inode->u.sysv_i.i_data+10, 0, wait);
@@ -194,5 +195,6 @@
err |= sync_tindirect(inode, inode->u.sysv_i.i_data+12, 0, wait);
}
err |= sysv_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)