[trusty/master-next 1/2] Revert "UBUNTU: SAUCE: aufs3: mmap: Fix races in madvise_remove() and sys_msync()"
Andy Whitcroft
apw at canonical.com
Wed Oct 7 13:42:16 UTC 2015
This reverts commit b28f4925f999316d7d3510ea476b1d19afae3de0.
BugLink: http://bugs.launchpad.net/bugs/1503655
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
mm/madvise.c | 4 ++--
mm/msync.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index e0504c4..5e700b1 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -327,12 +327,12 @@ static long madvise_remove(struct vm_area_struct *vma,
* vma's reference to the file) can go away as soon as we drop
* mmap_sem.
*/
- get_file(vma);
+ vma_get_file(vma);
up_read(¤t->mm->mmap_sem);
error = do_fallocate(f,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
offset, end - start);
- fput(vma);
+ vma_fput(vma);
down_read(¤t->mm->mmap_sem);
return error;
}
diff --git a/mm/msync.c b/mm/msync.c
index b2d70d9..02d770e 100644
--- a/mm/msync.c
+++ b/mm/msync.c
@@ -80,10 +80,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
start = vma->vm_end;
if ((flags & MS_SYNC) && file &&
(vma->vm_flags & VM_SHARED)) {
- get_file(vma);
+ vma_get_file(vma);
up_read(&mm->mmap_sem);
error = vfs_fsync(file, 0);
- fput(vma);
+ vma_fput(vma);
if (error || start >= end)
goto out;
down_read(&mm->mmap_sem);
--
2.5.0
More information about the kernel-team
mailing list