

Pass the "we are doing synchronous writes" hint down from msync().

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/mm/msync.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN mm/msync.c~msync-set-PF_SYNCWRITE mm/msync.c
--- 25/mm/msync.c~msync-set-PF_SYNCWRITE	2004-12-07 22:35:52.468576752 -0800
+++ 25-akpm/mm/msync.c	2004-12-07 22:35:52.471576296 -0800
@@ -181,6 +181,9 @@ asmlinkage long sys_msync(unsigned long 
 	struct vm_area_struct * vma;
 	int unmapped_error, error = -EINVAL;
 
+	if (flags & MS_SYNC)
+		current->flags |= PF_SYNCWRITE;
+
 	down_read(&current->mm->mmap_sem);
 	if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC))
 		goto out;
@@ -231,5 +234,6 @@ asmlinkage long sys_msync(unsigned long 
 	}
 out:
 	up_read(&current->mm->mmap_sem);
+	current->flags &= ~PF_SYNCWRITE;
 	return error;
 }
_
