Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23444
b: refs/heads/master
c: 676758b
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 24, 2006
1 parent 19a6f38 commit defcc07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 707c21c848deeb0200ba3f07e4ba90e6dc419c2f
refs/heads/master: 676758bdb7bfca8413a85203921746f446e237be
14 changes: 7 additions & 7 deletions trunk/mm/msync.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags)
{
unsigned long end;
struct vm_area_struct *vma;
int unmapped_error, error = -EINVAL;
int unmapped_error = 0;
int error = -EINVAL;
int done = 0;

if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC))
Expand All @@ -171,15 +172,14 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags)
if (flags & MS_SYNC)
current->flags |= PF_SYNCWRITE;
vma = find_vma(current->mm, start);
unmapped_error = 0;
if (!vma) {
error = -ENOMEM;
goto out_unlock;
}
do {
unsigned long nr_pages_dirtied = 0;
struct file *file;

/* Still start < end. */
error = -ENOMEM;
if (!vma)
goto out_unlock;
/* Here start < vma->vm_end. */
if (start < vma->vm_start) {
unmapped_error = -ENOMEM;
Expand Down Expand Up @@ -239,7 +239,7 @@ asmlinkage long sys_msync(unsigned long start, size_t len, int flags)
} else {
vma = vma->vm_next;
}
} while (!done);
} while (vma && !done);
out_unlock:
current->flags &= ~PF_SYNCWRITE;
up_read(&current->mm->mmap_sem);
Expand Down

0 comments on commit defcc07

Please sign in to comment.