patch-1.3.55 linux/fs/buffer.c
Next file: linux/fs/ext2/inode.c
Previous file: linux/drivers/sound/Makefile
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Sat Jan 6 17:33:35 1996
- Orig file:
v1.3.54/linux/fs/buffer.c
- Orig date:
Thu Jan 4 21:54:56 1996
diff -u --recursive --new-file v1.3.54/linux/fs/buffer.c linux/fs/buffer.c
@@ -28,6 +28,7 @@
#include <linux/pagemap.h>
#include <linux/swapctl.h>
#include <linux/smp.h>
+#include <linux/smp_lock.h>
#include <asm/system.h>
#include <asm/segment.h>
@@ -258,6 +259,21 @@
return -EBADF;
if (!file->f_op || !file->f_op->fsync)
return -EINVAL;
+ if (file->f_op->fsync(inode,file))
+ return -EIO;
+ return 0;
+}
+
+asmlinkage int sys_fdatasync(unsigned int fd)
+{
+ struct file * file;
+ struct inode * inode;
+
+ if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode))
+ return -EBADF;
+ if (!file->f_op || !file->f_op->fsync)
+ return -EINVAL;
+ /* this needs further work, at the moment it is identical to fsync() */
if (file->f_op->fsync(inode,file))
return -EIO;
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this