Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 497646 | Differences between
and this patch

Collapse All | Expand All

(-)aufs3-standalone-base-mmap-combined.orig.patch (-11 / +11 lines)
Lines 518-526 Link Here
518
+#define vma_get_file(vma)		vma_do_get_file(vma, __func__, __LINE__)
518
+#define vma_get_file(vma)		vma_do_get_file(vma, __func__, __LINE__)
519
+#define vma_fput(vma)			vma_do_fput(vma, __func__, __LINE__)
519
+#define vma_fput(vma)			vma_do_fput(vma, __func__, __LINE__)
520
+
520
+
521
 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
521
 extern ssize_t access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, size_t len, int write);
522
 extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
522
 extern ssize_t access_remote_vm(struct mm_struct *mm, unsigned long addr,
523
 		void *buf, int len, int write);
523
 		void *buf, size_t len, int write);
524
only in patch2:
524
only in patch2:
525
unchanged:
525
unchanged:
526
--- a/include/linux/mm_types.h
526
--- a/include/linux/mm_types.h
Lines 546-559 Link Here
546
--- a/kernel/fork.c
546
--- a/kernel/fork.c
547
+++ b/kernel/fork.c
547
+++ b/kernel/fork.c
548
@@ -416,7 +416,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
548
@@ -416,7 +416,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
549
 			struct inode *inode = file_inode(file);
549
 		struct inode *inode = file_inode(file);
550
 			struct address_space *mapping = file->f_mapping;
550
 		struct address_space *mapping = file->f_mapping;
551
 
551
 
552
-			get_file(file);
552
-		get_file(file);
553
+			vma_get_file(tmp);
553
+		vma_get_file(tmp);
554
 			if (tmp->vm_flags & VM_DENYWRITE)
554
 		if (tmp->vm_flags & VM_DENYWRITE)
555
 				atomic_dec(&inode->i_writecount);
555
 			atomic_dec(&inode->i_writecount);
556
 			mutex_lock(&mapping->i_mmap_mutex);
556
 		mutex_lock(&mapping->i_mmap_mutex);
557
only in patch2:
557
only in patch2:
558
unchanged:
558
unchanged:
559
--- a/mm/filemap.c
559
--- a/mm/filemap.c
Lines 681-689 Link Here
681
 	if (new->vm_file)
681
 	if (new->vm_file)
682
-		fput(new->vm_file);
682
-		fput(new->vm_file);
683
+		vma_fput(new);
683
+		vma_fput(new);
684
 	unlink_anon_vmas(new);
685
  out_free_mpol:
684
  out_free_mpol:
686
 	mpol_put(vma_policy(new));
685
 	mpol_put(vma_policy(new));
686
  out_free_vma:
687
@@ -2840,7 +2840,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
687
@@ -2840,7 +2840,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
688
 			if (anon_vma_clone(new_vma, vma))
688
 			if (anon_vma_clone(new_vma, vma))
689
 				goto out_free_mempol;
689
 				goto out_free_mempol;

Return to bug 497646