From 02803f082d772cf42967bc309e2089e63c44ecdf Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 20 Jan 2014 10:16:08 +0100 Subject: Update linux-drd to 3.12.8 --- linux-drd/aufs3-mmap.patch | 85 +++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 42 deletions(-) (limited to 'linux-drd/aufs3-mmap.patch') diff --git a/linux-drd/aufs3-mmap.patch b/linux-drd/aufs3-mmap.patch index 579a8d3..c1015ab 100644 --- a/linux-drd/aufs3-mmap.patch +++ b/linux-drd/aufs3-mmap.patch @@ -1,16 +1,16 @@ -aufs3.11 mmap patch +aufs3.12 mmap patch diff --git a/fs/buffer.c b/fs/buffer.c -index 4d74335..3b1db7d 100644 +index 6024877..95bbf13 100644 --- a/fs/buffer.c +++ b/fs/buffer.c -@@ -2436,7 +2436,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, +@@ -2446,7 +2446,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, * Update file times before taking page lock. We may end up failing the * fault so this update may be superfluous but who really cares... */ - file_update_time(vma->vm_file); + vma_file_update_time(vma); - + ret = __block_page_mkwrite(vma, vmf, get_block); sb_end_pagefault(sb); diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c @@ -19,7 +19,7 @@ index ccfd99b..bca7789 100644 +++ b/fs/proc/nommu.c @@ -45,7 +45,9 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) file = region->vm_file; - + if (file) { - struct inode *inode = file_inode(region->vm_file); + struct inode *inode; @@ -29,12 +29,12 @@ index ccfd99b..bca7789 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 107d026..9942e5f 100644 +index 390bdab..ad05546 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -272,7 +272,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) const char *name = NULL; - + if (file) { - struct inode *inode = file_inode(vma->vm_file); + struct inode *inode; @@ -43,9 +43,9 @@ index 107d026..9942e5f 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1382,6 +1384,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1412,6 +1414,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) seq_printf(m, "%08lx %s", vma->vm_start, buffer); - + if (file) { + file = vma_pr_or_file(vma); seq_printf(m, " file="); @@ -57,7 +57,7 @@ index 56123a6..d19737f 100644 +++ b/fs/proc/task_nommu.c @@ -149,7 +149,9 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, file = vma->vm_file; - + if (file) { - struct inode *inode = file_inode(vma->vm_file); + struct inode *inode; @@ -67,7 +67,7 @@ index 56123a6..d19737f 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/include/linux/mm.h b/include/linux/mm.h -index f022460..4f3e9ca 100644 +index 8b6e55e..1359c80 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -17,6 +17,9 @@ @@ -77,13 +77,13 @@ index f022460..4f3e9ca 100644 +#include +#include +#include - + struct mempolicy; struct anon_vma; -@@ -1023,6 +1026,87 @@ static inline int fixup_user_fault(struct task_struct *tsk, +@@ -1017,6 +1020,87 @@ static inline int fixup_user_fault(struct task_struct *tsk, } #endif - + +/* + * Mainly for aufs which mmap(2) diffrent file and wants to print different path + * in /proc/PID/maps. @@ -169,7 +169,7 @@ index f022460..4f3e9ca 100644 extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, void *buf, int len, int write); diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index faf4b7c..cd750ff 100644 +index d9851ee..4bde7bf 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -213,6 +213,7 @@ struct vm_region { @@ -177,7 +177,7 @@ index faf4b7c..cd750ff 100644 unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ struct file *vm_file; /* the backing file or NULL */ + struct file *vm_prfile; /* the virtual backing file or NULL */ - + int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for @@ -281,6 +282,7 @@ struct vm_area_struct { @@ -186,28 +186,28 @@ index faf4b7c..cd750ff 100644 struct file * vm_file; /* File we map to (can be NULL). */ + struct file *vm_prfile; /* shadow of vm_file */ void * vm_private_data; /* was vm_pte (shared mem) */ - + #ifndef CONFIG_MMU diff --git a/kernel/fork.c b/kernel/fork.c -index bf46287..947c36d 100644 +index 086fe73..003e30c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -415,7 +415,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) +@@ -412,7 +412,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; - + - get_file(file); + vma_get_file(tmp); if (tmp->vm_flags & VM_DENYWRITE) atomic_dec(&inode->i_writecount); mutex_lock(&mapping->i_mmap_mutex); diff --git a/mm/filemap.c b/mm/filemap.c -index 4b51ac1..cc2fd08 100644 +index ae4846f..3f890ee 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -1733,7 +1733,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) +@@ -1735,7 +1735,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) int ret = VM_FAULT_LOCKED; - + sb_start_pagefault(inode->i_sb); - file_update_time(vma->vm_file); + vma_file_update_time(vma); @@ -224,17 +224,18 @@ index 5bff081..246a9c7 100644 unsigned long addr; - struct file *file = get_file(vma->vm_file); + struct file *file = vma->vm_file; - + /* mmap_region may free vma; grab the info now */ + vm_flags = vma->vm_flags; + + vma_get_file(vma); - addr = mmap_region(file, start, size, - vma->vm_flags, pgoff); + addr = mmap_region(file, start, size, vm_flags, pgoff); - fput(file); + vma_fput(vma); if (IS_ERR_VALUE(addr)) { err = addr; } else { diff --git a/mm/madvise.c b/mm/madvise.c -index 7055883..e6b768d 100644 +index 539eeb9..5e700b1 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -327,12 +327,12 @@ static long madvise_remove(struct vm_area_struct *vma, @@ -253,10 +254,10 @@ index 7055883..e6b768d 100644 return error; } diff --git a/mm/memory.c b/mm/memory.c -index af84bc0..95a666b 100644 +index d176154..49cafa9 100644 --- a/mm/memory.c +++ b/mm/memory.c -@@ -2754,7 +2754,7 @@ reuse: +@@ -2745,7 +2745,7 @@ reuse: set_page_dirty_balance(dirty_page, page_mkwrite); /* file_update_time outside page_lock */ if (vma->vm_file) @@ -265,8 +266,8 @@ index af84bc0..95a666b 100644 } put_page(dirty_page); if (page_mkwrite) { -@@ -3465,7 +3465,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, - +@@ -3456,7 +3456,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, + /* file_update_time outside page_lock */ if (vma->vm_file && !page_mkwrite) - file_update_time(vma->vm_file); @@ -275,7 +276,7 @@ index af84bc0..95a666b 100644 unlock_page(vmf.page); if (anon) diff --git a/mm/mmap.c b/mm/mmap.c -index f9c97d1..dbd8dd2 100644 +index 9d54851..64ae6ce 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -250,7 +250,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) @@ -296,26 +297,26 @@ index f9c97d1..dbd8dd2 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1621,8 +1621,8 @@ out: +@@ -1622,8 +1622,8 @@ out: unmap_and_free_vma: if (vm_flags & VM_DENYWRITE) allow_write_access(file); + vma_fput(vma); vma->vm_file = NULL; - fput(file); - + /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2415,7 +2415,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2412,7 +2412,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, goto out_free_mpol; - + if (new->vm_file) - get_file(new->vm_file); + vma_get_file(new); - + if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2434,7 +2434,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, +@@ -2431,7 +2431,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -323,8 +324,8 @@ index f9c97d1..dbd8dd2 100644 + vma_fput(new); unlink_anon_vmas(new); out_free_mpol: - mpol_put(pol); -@@ -2833,7 +2833,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, + mpol_put(vma_policy(new)); +@@ -2828,7 +2828,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -356,11 +357,11 @@ index ecd1f15..d4306cd 100644 +++ b/mm/nommu.c @@ -652,7 +652,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); - + if (region->vm_file) - fput(region->vm_file); + vmr_fput(region); - + /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ @@ -810,7 +810,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) -- cgit v1.2.3-54-g00ecf