diff options
author | Andrew Morton <akpm@osdl.org> | 2005-01-04 05:36:15 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:36:15 -0800 |
commit | 0f6c5fa141e625b68f69083eebf2eb727c40882b (patch) | |
tree | 31ddaadb9b260aaab4d0e15ea286ef8510d08993 /mm | |
parent | 4b36077f9cbc7bd58dc616a778b3290f1ea43c98 (diff) | |
download | history-0f6c5fa141e625b68f69083eebf2eb727c40882b.tar.gz |
[PATCH] msync(): set PF_SYNCWRITE
Pass the "we are doing synchronous writes" hint down from msync().
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/msync.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/msync.c b/mm/msync.c index e04ff38eca1664..cf499f463626d6 100644 --- a/mm/msync.c +++ b/mm/msync.c @@ -214,6 +214,9 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags) struct vm_area_struct * vma; int unmapped_error, error = -EINVAL; + if (flags & MS_SYNC) + current->flags |= PF_SYNCWRITE; + down_read(¤t->mm->mmap_sem); if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC)) goto out; @@ -264,5 +267,6 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags) } out: up_read(¤t->mm->mmap_sem); + current->flags &= ~PF_SYNCWRITE; return error; } |