summaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-09 23:29:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-09 23:29:35 +0000
commit35385d7a83b4cae6d5ea5f80f3b3377d94178344 (patch)
tree49494d95dfef31ba4f9a697d31e4028cf65a57bd /mm/filemap.c
parentd9d8062e7b49943b2a2fb034f817a9fc217fd40f (diff)
Merge with 2.4.0-test3-pre7.
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 7f226eef3..3b0078045 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1683,9 +1683,7 @@ int filemap_sync(struct vm_area_struct * vma, unsigned long address,
*/
static void filemap_unmap(struct vm_area_struct *vma, unsigned long start, size_t len)
{
- lock_kernel();
filemap_sync(vma, start, len, MS_ASYNC);
- unlock_kernel();
}
/*
@@ -1741,14 +1739,17 @@ static int msync_interval(struct vm_area_struct * vma,
{
if (vma->vm_file && vma->vm_ops && vma->vm_ops->sync) {
int error;
- lock_kernel();
error = vma->vm_ops->sync(vma, start, end-start, flags);
if (!error && (flags & MS_SYNC)) {
struct file * file = vma->vm_file;
- if (file && file->f_op && file->f_op->fsync)
+ if (file && file->f_op && file->f_op->fsync) {
+ down(&file->f_dentry->d_inode->i_sem);
+ lock_kernel();
error = file->f_op->fsync(file, file->f_dentry, 1);
+ unlock_kernel();
+ up(&file->f_dentry->d_inode->i_sem);
+ }
}
- unlock_kernel();
return error;
}
return 0;