aufs: Update to aufs3.16-20140908
svn path=/dists/trunk/linux/; revision=21782
This commit is contained in:
parent
ee96a22642
commit
7f39df6413
|
@ -44,6 +44,26 @@ linux (3.16.2-1) UNRELEASED; urgency=medium
|
|||
- mnt: Add tests for unprivileged remount cases that have found to be
|
||||
faulty
|
||||
* [armel/kirkwood] mm: Enable HIGHMEM (Closes: #760786)
|
||||
* aufs: Update to aufs3.16-20140908:
|
||||
- bugfix, missing mnt_want_write in moo
|
||||
- new ioctl BRINFO
|
||||
- bugfix, restore the lost unlock in an error path
|
||||
- allow deleting a branch who has an opened dir
|
||||
- bugfix, stop passing an error code to dput()
|
||||
- possible bugfix, ptr in an array
|
||||
- implement fhsm (not enabled)
|
||||
- si_files has all opened files
|
||||
- bugfix, use id instead of index to identify a branch
|
||||
- new move-down flag AUFS_MVDOWN_FHSM_LOWER
|
||||
- branch attr 'fhsm' is independent from rw/ro attrib
|
||||
- support for a branch ro+fhsm
|
||||
- fhsm notify after fixing inode attrib
|
||||
- bugfix, hfile test in br_del_file()
|
||||
- bugfix, pinning in mvdown
|
||||
- bugfix, instantiate-revalidate race
|
||||
- possible bugfix, temporary d_inode
|
||||
- fhsm and br_del, allow the root dir only
|
||||
- bugfix, get a removed dentry from an inode
|
||||
|
||||
[ Vagrant Cascadian ]
|
||||
* [armmp] Enable IMX_IPUV3_CORE (closes: #756810).
|
||||
|
|
|
@ -4173,6 +4173,7 @@ CONFIG_AUFS_BRANCH_MAX_127=y
|
|||
## end choice
|
||||
# CONFIG_AUFS_HNOTIFY is not set
|
||||
CONFIG_AUFS_EXPORT=y
|
||||
# CONFIG_AUFS_FHSM is not set
|
||||
# CONFIG_AUFS_RDU is not set
|
||||
# CONFIG_AUFS_SHWH is not set
|
||||
# CONFIG_AUFS_BR_RAMFS is not set
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,13 +1,38 @@
|
|||
From: J. R. Okajima <hooanon05@yahoo.co.jp>
|
||||
Date: Mon Jun 30 09:36:40 2014 +0900
|
||||
Subject: aufs3.x-rcN base patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/501539c2f9478ef69fa42acfb43ef1420d9bb524/tree/
|
||||
Date: Sat Aug 23 03:27:11 2014 +0900
|
||||
Subject: aufs3.16 base patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
|
||||
Bug-Debian: https://bugs.debian.org/541828
|
||||
|
||||
Patch headers added by debian/patches/features/all/aufs3/gen-patch
|
||||
|
||||
aufs3.x-rcN base patch
|
||||
aufs3.16 base patch
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index c2066f4..f07a989 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -1698,6 +1698,20 @@ F: include/linux/audit.h
|
||||
F: include/uapi/linux/audit.h
|
||||
F: kernel/audit*
|
||||
|
||||
+AUFS (advanced multi layered unification filesystem) FILESYSTEM
|
||||
+M: "J. R. Okajima" <hooanon05g@gmail.com>
|
||||
+L: linux-unionfs@vger.kernel.org
|
||||
+L: aufs-users@lists.sourceforge.net (members only)
|
||||
+W: http://aufs.sourceforge.net
|
||||
+T: git://git.code.sf.net/p/aufs/aufs3-linux
|
||||
+T: git://github.com/sfjro/aufs3-linux.git
|
||||
+S: Supported
|
||||
+F: Documentation/filesystems/aufs/
|
||||
+F: Documentation/ABI/testing/debugfs-aufs
|
||||
+F: Documentation/ABI/testing/sysfs-aufs
|
||||
+F: fs/aufs/
|
||||
+F: include/uapi/linux/aufs_type.h
|
||||
+
|
||||
AUXILIARY DISPLAY DRIVERS
|
||||
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
|
||||
W: http://miguelojeda.es/auxdisplay.htm
|
||||
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
|
||||
index 6cb1beb..30efd68 100644
|
||||
--- a/drivers/block/loop.c
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
From: J. R. Okajima <hooanon05@yahoo.co.jp>
|
||||
Date: Sun Jun 15 19:47:55 2014 +0900
|
||||
Subject: aufs3.x-rcN kbuild patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/501539c2f9478ef69fa42acfb43ef1420d9bb524/tree/
|
||||
Date: Thu Aug 7 21:42:20 2014 +0900
|
||||
Subject: aufs3.16 kbuild patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
|
||||
Bug-Debian: https://bugs.debian.org/541828
|
||||
|
||||
Patch headers added by debian/patches/features/all/aufs3/gen-patch
|
||||
|
||||
aufs3.x-rcN kbuild patch
|
||||
aufs3.16 kbuild patch
|
||||
|
||||
diff --git a/fs/Kconfig b/fs/Kconfig
|
||||
index 312393f..78632ed 100644
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
From: J. R. Okajima <hooanon05@yahoo.co.jp>
|
||||
Date: Thu Jul 10 02:32:20 2014 +0900
|
||||
Subject: aufs3.x-rcN mmap patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/501539c2f9478ef69fa42acfb43ef1420d9bb524/tree/
|
||||
Date: Thu Aug 7 21:42:20 2014 +0900
|
||||
Subject: aufs3.16 mmap patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
|
||||
Bug-Debian: https://bugs.debian.org/541828
|
||||
|
||||
Patch headers added by debian/patches/features/all/aufs3/gen-patch
|
||||
|
||||
aufs3.x-rcN mmap patch
|
||||
aufs3.16 mmap patch
|
||||
|
||||
diff --git a/fs/buffer.c b/fs/buffer.c
|
||||
index eba6e4f..31f0b2d 100644
|
||||
|
@ -79,109 +79,34 @@ index 678455d..0ef7ef4 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 e03dd29..f849643 100644
|
||||
index e03dd29..dd32624 100644
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/bit_spinlock.h>
|
||||
#include <linux/shrinker.h>
|
||||
+#include <linux/dcache.h>
|
||||
+#include <linux/file.h>
|
||||
+#include <linux/fs.h>
|
||||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
@@ -1184,6 +1187,93 @@ static inline int fixup_user_fault(struct task_struct *tsk,
|
||||
@@ -1184,6 +1184,28 @@ 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.
|
||||
+ */
|
||||
+/* #define AUFS_DEBUG_MMAP */
|
||||
+static inline void aufs_trace(struct file *f, struct file *pr,
|
||||
+ const char func[], int line, const char func2[])
|
||||
+{
|
||||
+#ifdef AUFS_DEBUG_MMAP
|
||||
+ if (pr)
|
||||
+ pr_info("%s:%d: %s, %p\n", func, line, func2,
|
||||
+ f ? (char *)f->f_dentry->d_name.name : "(null)");
|
||||
+#endif
|
||||
+}
|
||||
+#ifdef CONFIG_MMU
|
||||
+extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
|
||||
+extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
|
||||
+ int);
|
||||
+extern void vma_do_get_file(struct vm_area_struct *, const char[], int);
|
||||
+extern void vma_do_fput(struct vm_area_struct *, const char[], int);
|
||||
+
|
||||
+static inline struct file *vmr_do_pr_or_file(struct vm_region *region,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+static inline void vmr_do_fput(struct vm_region *region,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_file_update_time(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ file_update_time(f);
|
||||
+ if (f && pr)
|
||||
+ file_update_time(pr);
|
||||
+}
|
||||
+
|
||||
+static inline struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_get_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ get_file(f);
|
||||
+ if (f && pr)
|
||||
+ get_file(pr);
|
||||
+}
|
||||
+
|
||||
+static inline void vma_do_fput(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+
|
||||
+#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
|
||||
+#define vma_file_update_time(vma) vma_do_file_update_time(vma, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vma_pr_or_file(vma) vma_do_pr_or_file(vma, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vma_get_file(vma) vma_do_get_file(vma, __func__, __LINE__)
|
||||
+#define vma_fput(vma) vma_do_fput(vma, __func__, __LINE__)
|
||||
+#else
|
||||
+extern struct file *vmr_do_pr_or_file(struct vm_region *, const char[], int);
|
||||
+extern void vmr_do_fput(struct vm_region *, const char[], int);
|
||||
+
|
||||
+#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \
|
||||
+ __LINE__)
|
||||
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
|
||||
+#endif /* CONFIG_MMU */
|
||||
+
|
||||
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
|
||||
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
|
||||
|
@ -219,11 +144,24 @@ index 6a13c46..714302c 100644
|
|||
if (tmp->vm_flags & VM_DENYWRITE)
|
||||
atomic_dec(&inode->i_writecount);
|
||||
mutex_lock(&mapping->i_mmap_mutex);
|
||||
diff --git a/mm/Makefile b/mm/Makefile
|
||||
index 4064f3e..0003fdf 100644
|
||||
--- a/mm/Makefile
|
||||
+++ b/mm/Makefile
|
||||
@@ -18,7 +18,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
|
||||
mm_init.o mmu_context.o percpu.o slab_common.o \
|
||||
compaction.o balloon_compaction.o vmacache.o \
|
||||
interval_tree.o list_lru.o workingset.o \
|
||||
- iov_iter.o $(mmu-y)
|
||||
+ iov_iter.o prfile.o $(mmu-y)
|
||||
|
||||
obj-y += init-mm.o
|
||||
|
||||
diff --git a/mm/filemap.c b/mm/filemap.c
|
||||
index dafb06f..f8c0ba3 100644
|
||||
index 900edfa..f4dda0c 100644
|
||||
--- a/mm/filemap.c
|
||||
+++ b/mm/filemap.c
|
||||
@@ -2037,7 +2037,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
@@ -2040,7 +2040,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);
|
||||
|
@ -287,7 +225,7 @@ index a402f8f..134e15d 100644
|
|||
return error;
|
||||
}
|
||||
diff --git a/mm/memory.c b/mm/memory.c
|
||||
index d67fd9f..aa1e55d 100644
|
||||
index 8b44f76..69a72bf 100644
|
||||
--- a/mm/memory.c
|
||||
+++ b/mm/memory.c
|
||||
@@ -2161,7 +2161,7 @@ reuse:
|
||||
|
@ -422,3 +360,95 @@ index 4a852f6..b369644 100644
|
|||
kmem_cache_free(vm_area_cachep, vma);
|
||||
kleave(" = %d", ret);
|
||||
return ret;
|
||||
diff --git a/mm/prfile.c b/mm/prfile.c
|
||||
new file mode 100644
|
||||
index 0000000..fc708d2
|
||||
--- /dev/null
|
||||
+++ b/mm/prfile.c
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
||||
+ * in /proc/PID/maps.
|
||||
+ * Call these functions via macros defined in linux/mm.h.
|
||||
+ *
|
||||
+ * See Documentation/filesystems/aufs/design/06mmap.txt
|
||||
+ *
|
||||
+ * Copyright (c) 2014 Junjro R. Okajima
|
||||
+ * Copyright (c) 2014 Ian Campbell
|
||||
+ */
|
||||
+
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/file.h>
|
||||
+#include <linux/fs.h>
|
||||
+
|
||||
+/* #define PRFILE_TRACE */
|
||||
+static inline void prfile_trace(struct file *f, struct file *pr,
|
||||
+ const char func[], int line, const char func2[])
|
||||
+{
|
||||
+#ifdef PRFILE_TRACE
|
||||
+ if (pr)
|
||||
+ pr_info("%s:%d: %s, %p\n", func, line, func2,
|
||||
+ f ? (char *)f->f_dentry->d_name.name : "(null)");
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+#ifdef CONFIG_MMU
|
||||
+void vma_do_file_update_time(struct vm_area_struct *vma, const char func[],
|
||||
+ int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ file_update_time(f);
|
||||
+ if (f && pr)
|
||||
+ file_update_time(pr);
|
||||
+}
|
||||
+
|
||||
+struct file *vma_do_pr_or_file(struct vm_area_struct *vma, const char func[],
|
||||
+ int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ get_file(f);
|
||||
+ if (f && pr)
|
||||
+ get_file(pr);
|
||||
+}
|
||||
+
|
||||
+void vma_do_fput(struct vm_area_struct *vma, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+#else
|
||||
+struct file *vmr_do_pr_or_file(struct vm_region *region, const char func[],
|
||||
+ int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+void vmr_do_fput(struct vm_region *region, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+
|
||||
+ prfile_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+#endif /* CONFIG_MMU */
|
||||
|
|
|
@ -1,222 +0,0 @@
|
|||
From: Ian Campbell <ijc@hellion.org.uk>
|
||||
Date: Sun, 20 Jul 2014 16:13:35 +0100
|
||||
Subject: aufs3: remove include of linux/fs.h from linux/mm.h
|
||||
Forwarded: http://sourceforge.net/p/aufs/mailman/message/32628514/
|
||||
|
||||
This include is added by aufs3-mmap.patch but causes circular dependencies on
|
||||
arm64 as seen with the Debian kernel packages in http://buildd.debian-ports.org/status/fetch.php?pkg=linux&arch=arm64&ver=3.14.12-1&stamp=1405234443 which contains:
|
||||
|
||||
In file included from /«PKGBUILDDIR»/include/linux/mm.h:23:0,
|
||||
from /«PKGBUILDDIR»/include/linux/pid_namespace.h:6,
|
||||
from /«PKGBUILDDIR»/include/linux/ptrace.h:9,
|
||||
from /«PKGBUILDDIR»/arch/arm64/include/asm/compat.h:26,
|
||||
from /«PKGBUILDDIR»/arch/arm64/include/asm/stat.h:23,
|
||||
from /«PKGBUILDDIR»/include/linux/stat.h:5,
|
||||
from /«PKGBUILDDIR»/include/linux/module.h:10,
|
||||
from /«PKGBUILDDIR»/init/main.c:15:
|
||||
/«PKGBUILDDIR»/include/linux/fs.h:1575:64: warning: 'struct kstat' declared inside parameter list [enabled by default]
|
||||
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
|
||||
|
||||
According to http://article.gmane.org/gmane.linux.ports.arm.kernel/342042
|
||||
> The added mm.h->fs.h looks like a mistake, it should not be there, and we have
|
||||
> in the past worked hard to separate mm.h, sched.h and fs.h from one another.
|
||||
|
||||
Move all of the static inline functions added to mm.h by
|
||||
aufs3-mmap.patch into a new file, mm/aufs_mmap.c, instead to avoid the
|
||||
new includes in mm.h.
|
||||
|
||||
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
|
||||
|
||||
--- a/include/linux/mm.h
|
||||
+++ b/include/linux/mm.h
|
||||
@@ -18,9 +18,6 @@
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/bit_spinlock.h>
|
||||
#include <linux/shrinker.h>
|
||||
-#include <linux/dcache.h>
|
||||
-#include <linux/file.h>
|
||||
-#include <linux/fs.h>
|
||||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
@@ -1187,83 +1184,17 @@ static inline int fixup_user_fault(struc
|
||||
}
|
||||
#endif
|
||||
|
||||
-/*
|
||||
- * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
||||
- * in /proc/PID/maps.
|
||||
- */
|
||||
-/* #define AUFS_DEBUG_MMAP */
|
||||
-static inline void aufs_trace(struct file *f, struct file *pr,
|
||||
- const char func[], int line, const char func2[])
|
||||
-{
|
||||
-#ifdef AUFS_DEBUG_MMAP
|
||||
- if (pr)
|
||||
- pr_info("%s:%d: %s, %p\n", func, line, func2,
|
||||
- f ? (char *)f->f_dentry->d_name.name : "(null)");
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
-static inline struct file *vmr_do_pr_or_file(struct vm_region *region,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- return (f && pr) ? pr : f;
|
||||
-}
|
||||
-
|
||||
-static inline void vmr_do_fput(struct vm_region *region,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- fput(f);
|
||||
- if (f && pr)
|
||||
- fput(pr);
|
||||
-}
|
||||
-
|
||||
-static inline void vma_do_file_update_time(struct vm_area_struct *vma,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- file_update_time(f);
|
||||
- if (f && pr)
|
||||
- file_update_time(pr);
|
||||
-}
|
||||
-
|
||||
-static inline struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- return (f && pr) ? pr : f;
|
||||
-}
|
||||
-
|
||||
-static inline void vma_do_get_file(struct vm_area_struct *vma,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- get_file(f);
|
||||
- if (f && pr)
|
||||
- get_file(pr);
|
||||
-}
|
||||
-
|
||||
-static inline void vma_do_fput(struct vm_area_struct *vma,
|
||||
- const char func[], int line)
|
||||
-{
|
||||
- struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
-
|
||||
- aufs_trace(f, pr, func, line, __func__);
|
||||
- fput(f);
|
||||
- if (f && pr)
|
||||
- fput(pr);
|
||||
-}
|
||||
-
|
||||
+extern struct file *vmr_do_pr_or_file(struct vm_region *region,
|
||||
+ const char func[], int line);
|
||||
+extern void vmr_do_fput(struct vm_region *region, const char func[], int line);
|
||||
+extern void vma_do_file_update_time(struct vm_area_struct *vma,
|
||||
+ const char func[], int line);
|
||||
+extern struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line);
|
||||
+extern void vma_do_get_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line);
|
||||
+extern void vma_do_fput(struct vm_area_struct *vma, const char func[], int line);
|
||||
+
|
||||
#define vmr_pr_or_file(region) vmr_do_pr_or_file(region, __func__, \
|
||||
__LINE__)
|
||||
#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
|
||||
--- a/mm/Makefile
|
||||
+++ b/mm/Makefile
|
||||
@@ -21,6 +21,7 @@ obj-y := filemap.o mempool.o oom_kill.
|
||||
iov_iter.o $(mmu-y)
|
||||
|
||||
obj-y += init-mm.o
|
||||
+obj-y += aufs_mmap.o
|
||||
|
||||
ifdef CONFIG_NO_BOOTMEM
|
||||
obj-y += nobootmem.o
|
||||
--- /dev/null
|
||||
+++ b/mm/aufs_mmap.c
|
||||
@@ -0,0 +1,73 @@
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/file.h>
|
||||
+#include <linux/fs.h>
|
||||
+
|
||||
+/*
|
||||
+ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
|
||||
+ * in /proc/PID/maps.
|
||||
+ */
|
||||
+/* #define AUFS_DEBUG_MMAP */
|
||||
+static inline void aufs_trace(struct file *f, struct file *pr,
|
||||
+ const char func[], int line, const char func2[])
|
||||
+{
|
||||
+#ifdef AUFS_DEBUG_MMAP
|
||||
+ if (pr)
|
||||
+ pr_info("%s:%d: %s, %p\n", func, line, func2,
|
||||
+ f ? (char *)f->f_dentry->d_name.name : "(null)");
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+#ifndef CONFIG_MMU
|
||||
+struct file *vmr_do_pr_or_file(struct vm_region *region,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+void vmr_do_fput(struct vm_region *region, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = region->vm_file, *pr = region->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+void vma_do_file_update_time(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ file_update_time(f);
|
||||
+ if (f && pr)
|
||||
+ file_update_time(pr);
|
||||
+}
|
||||
+
|
||||
+struct file *vma_do_pr_or_file(struct vm_area_struct *vma,
|
||||
+ const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ return (f && pr) ? pr : f;
|
||||
+}
|
||||
+
|
||||
+void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ get_file(f);
|
||||
+ if (f && pr)
|
||||
+ get_file(pr);
|
||||
+}
|
||||
+
|
||||
+void vma_do_fput(struct vm_area_struct *vma, const char func[], int line)
|
||||
+{
|
||||
+ struct file *f = vma->vm_file, *pr = vma->vm_prfile;
|
||||
+ aufs_trace(f, pr, func, line, __func__);
|
||||
+ fput(f);
|
||||
+ if (f && pr)
|
||||
+ fput(pr);
|
||||
+}
|
|
@ -1,12 +1,12 @@
|
|||
From: J. R. Okajima <hooanon05@yahoo.co.jp>
|
||||
Date: Fri Jun 20 09:25:26 2014 +0900
|
||||
Subject: aufs3.x-rcN standalone patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/501539c2f9478ef69fa42acfb43ef1420d9bb524/tree/
|
||||
Date: Thu Aug 7 21:42:20 2014 +0900
|
||||
Subject: aufs3.16 standalone patch
|
||||
Origin: http://sourceforge.net/p/aufs/aufs3-standalone/ci/888949daf96bf7e2b857dc38e22029513f94d4ae/tree/
|
||||
Bug-Debian: https://bugs.debian.org/541828
|
||||
|
||||
Patch headers added by debian/patches/features/all/aufs3/gen-patch
|
||||
|
||||
aufs3.x-rcN standalone patch
|
||||
aufs3.16 standalone patch
|
||||
|
||||
diff --git a/fs/inode.c b/fs/inode.c
|
||||
index b225c0f..73259c8 100644
|
||||
|
@ -121,7 +121,7 @@ index d90deaa..60b4239 100644
|
|||
static int fsnotify_mark_destroy(void *ignored)
|
||||
{
|
||||
diff --git a/fs/open.c b/fs/open.c
|
||||
index 36662d0..9a7e1e0 100644
|
||||
index d6fd3ac..5e99d8b 100644
|
||||
--- a/fs/open.c
|
||||
+++ b/fs/open.c
|
||||
@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
|
||||
|
@ -132,7 +132,7 @@ index 36662d0..9a7e1e0 100644
|
|||
|
||||
long vfs_truncate(struct path *path, loff_t length)
|
||||
{
|
||||
@@ -299,6 +300,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
|
||||
@@ -298,6 +299,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
|
||||
sb_end_write(inode->i_sb);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ features/all/aufs3/aufs3-mmap.patch
|
|||
features/all/aufs3/aufs3-standalone.patch
|
||||
features/all/aufs3/aufs3-add.patch
|
||||
# Debian-specific changes
|
||||
features/all/aufs3/aufs3-remove-circular-includes.patch
|
||||
debian/aufs3-mark-as-staging.patch
|
||||
|
||||
# Change some defaults for security reasons
|
||||
|
|
Loading…
Reference in New Issue