Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23446
b: refs/heads/master
c: 8f2e9f1
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 24, 2006
1 parent 8dafb20 commit c9067ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18e79b40ed9c5223b88771f805c69f5993fc131b
refs/heads/master: 8f2e9f157a94f444dad974b088b853ac40785b02
17 changes: 2 additions & 15 deletions trunk/mm/msync.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/hugetlb.h>
Expand Down Expand Up @@ -214,23 +215,9 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags)
vma = find_vma(current->mm, start);
} else if ((flags & MS_SYNC) && file &&
(vma->vm_flags & VM_SHARED)) {
struct address_space *mapping;
int err;

get_file(file);
up_read(&current->mm->mmap_sem);
mapping = file->f_mapping;
error = filemap_fdatawrite(mapping);
if (file->f_op && file->f_op->fsync) {
mutex_lock(&mapping->host->i_mutex);
err = file->f_op->fsync(file,file->f_dentry,1);
mutex_unlock(&mapping->host->i_mutex);
if (err && !error)
error = err;
}
err = filemap_fdatawait(mapping);
if (err && !error)
error = err;
error = do_fsync(file, 0);
fput(file);
down_read(&current->mm->mmap_sem);
if (error)
Expand Down

0 comments on commit c9067ba

Please sign in to comment.