patch-2.1.56 linux/fs/buffer.c
Next file: linux/fs/dcache.c
Previous file: linux/fs/block_dev.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Tue Sep 16 12:48:25 1997
- Orig file:
v2.1.55/linux/fs/buffer.c
- Orig date:
Wed Sep 3 20:52:43 1997
diff -u --recursive --new-file v2.1.55/linux/fs/buffer.c linux/fs/buffer.c
@@ -107,7 +107,7 @@
int dummy3; /* unused */
} b_un;
unsigned int data[N_PARAM];
-} bdf_prm = {{60, 500, 64, 256, 15, 30*HZ, 5*HZ, 1884, 2}};
+} bdf_prm = {{40, 500, 64, 256, 15, 30*HZ, 5*HZ, 1884, 2}};
/* These are the min and max parameter values that we will allow to be assigned */
int bdflush_min[N_PARAM] = { 0, 10, 5, 25, 0, 100, 100, 1, 1};
@@ -282,9 +282,13 @@
return 0;
}
-int file_fsync (struct inode *inode, struct file *filp)
+/*
+ * filp may be NULL if called via the msync of a vma.
+ */
+
+int file_fsync(struct file *filp, struct dentry *dentry)
{
- return fsync_dev(inode->i_dev);
+ return fsync_dev(dentry->d_inode->i_dev);
}
asmlinkage int sys_fsync(unsigned int fd)
@@ -316,7 +320,10 @@
if (!file->f_op || !file->f_op->fsync)
goto out;
- err = file->f_op->fsync(inode,file);
+ /* We need to protect against concurrent writers.. */
+ down(&inode->i_sem);
+ err = file->f_op->fsync(file, file->f_dentry);
+ up(&inode->i_sem);
out:
unlock_kernel();
@@ -353,7 +360,7 @@
goto out;
/* this needs further work, at the moment it is identical to fsync() */
- err = file->f_op->fsync(inode,file);
+ err = file->f_op->fsync(file, file->f_dentry);
out:
unlock_kernel();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov