index ac474a61be37..284cee954591 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
-@@ -255,6 +255,7 @@ source "fs/pstore/Kconfig"
+@@ -255,5 +255,6 @@ source "fs/pstore/Kconfig"
source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
- source "fs/exofs/Kconfig"
+source "fs/aufs/Kconfig"
endif # MISC_FILESYSTEMS
aufs4.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
-index 8c68de3cfd80..c08e5dd95b5f 100644
+index dce5c099f43c..d10f05c88860 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -2636,6 +2636,19 @@ F: include/linux/audit.h
+@@ -2635,6 +2635,19 @@ 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)
++L: linux-unionfs@vger.kernel.org
+W: http://aufs.sourceforge.net
+T: git://github.com/sfjro/aufs4-linux.git
+S: Supported
return error;
diff --git a/fs/inode.c b/fs/inode.c
-index 0cd47fe0dbe5..117e6d16c3a1 100644
+index 73432e64f874..4a1756b8b4bd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
-@@ -1660,7 +1660,7 @@ EXPORT_SYMBOL(generic_update_time);
+@@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(generic_update_time);
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
int (*update_time)(struct inode *, struct timespec64 *, int);
diff --git a/fs/namespace.c b/fs/namespace.c
-index a677b59efd74..c3af16d31a75 100644
+index 678ef175d63a..9b6a3d0f87a1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -768,6 +768,12 @@ static inline int check_mnt(struct mount *mnt)
aufs4.x-rcN mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 633a63462573..cb290f06bd7e 100644
+index f5ed9512d193..e8f8e59d93bb 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
-@@ -2018,7 +2018,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
+@@ -2014,7 +2014,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
down_read(&mm->mmap_sem);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index f0ec9edab2f3..35e9e2a9cc15 100644
+index 85b0ef890b28..0f7fb8138160 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1734,7 +1737,7 @@ static int show_numa_map(struct seq_file *m, void *v)
+@@ -1740,7 +1743,7 @@ static int show_numa_map(struct seq_file *m, void *v)
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct vm_area_struct *vma = v;
struct numa_maps *md = &numa_priv->md;
if (page->mapping != inode->i_mapping) {
unlock_page(page);
diff --git a/mm/mmap.c b/mm/mmap.c
-index f901065c4c64..1089a8328a53 100644
+index fc1809b1bed6..8f62e47a60ea 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -180,7 +180,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
/* Undo any partial mapping done by a device driver. */
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
-@@ -2676,7 +2676,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2675,7 +2675,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
-@@ -2695,7 +2695,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2694,7 +2694,7 @@ 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)
unlink_anon_vmas(new);
out_free_mpol:
mpol_put(vma_policy(new));
-@@ -2885,7 +2885,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -2884,7 +2884,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
current->comm, current->pid);
-@@ -2960,10 +2960,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -2959,10 +2959,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
out:
up_write(&mm->mmap_sem);
if (populate)
-@@ -3253,7 +3270,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -3252,7 +3269,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)
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
diff --git a/mm/nommu.c b/mm/nommu.c
-index 749276beb109..d56f8f2bbd24 100644
+index 749276beb109..c7957f06fbc4 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -625,7 +625,7 @@ static void __put_nommu_region(struct vm_region *region)
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
-@@ -1361,7 +1361,7 @@ unsigned long do_mmap(struct file *file,
+@@ -1361,10 +1361,10 @@ unsigned long do_mmap(struct file *file,
up_write(&nommu_region_sem);
error:
if (region->vm_file)
+ vmr_fput(region);
kmem_cache_free(vm_region_jar, region);
if (vma->vm_file)
- fput(vma->vm_file);
+- fput(vma->vm_file);
++ vma_fput(vma);
+ vm_area_free(vma);
+ return ret;
+
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
index 000000000000..024cdcfae1b1
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
-index 117e6d16c3a1..63a31af2f9d8 100644
+index 4a1756b8b4bd..6e51d5f9b9f3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
-@@ -1669,6 +1669,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
+@@ -1666,6 +1666,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
return update_time(inode, time, flags);
}
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
-index c3af16d31a75..f9fc947a6600 100644
+index 9b6a3d0f87a1..8c4d3d56f2df 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -434,6 +434,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+#endif /* __AUFS_DCSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
--- /usr/share/empty/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c 2019-03-05 12:13:00.135890907 +0100
-@@ -0,0 +1,440 @@
++++ linux/fs/aufs/debug.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,441 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * debug print functions
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+/* Returns 0, or -errno. arg is in kp->arg. */
+#endif /* __AUFS_DEBUG_H__ */
diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
--- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c 2019-03-05 12:13:00.135890907 +0100
-@@ -0,0 +1,1153 @@
++++ linux/fs/aufs/dentry.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,1154 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * lookup and dentry operations
+ */
+
++#include <linux/iversion.h>
+#include <linux/namei.h>
+#include "aufs.h"
+
+}
diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
--- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c 2019-03-05 12:13:00.135890907 +0100
-@@ -0,0 +1,762 @@
++++ linux/fs/aufs/dir.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,763 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ */
+
+#include <linux/fs_stack.h>
++#include <linux/iversion.h>
+#include "aufs.h"
+
+void au_add_nlink(struct inode *dir, struct inode *h_dir)
+}
diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
--- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,720 @@
++++ linux/fs/aufs/hnotify.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,721 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * abstraction to notify the direct changes on lower directories
+ */
+
++/* #include <linux/iversion.h> */
+#include "aufs.h"
+
+int au_hn_alloc(struct au_hinode *hinode, struct inode *inode)
+}
diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
--- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,528 @@
++++ linux/fs/aufs/inode.c 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,529 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * inode functions
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+struct inode *au_igrab(struct inode *inode)
+#endif
diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
--- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,935 @@
++++ linux/fs/aufs/i_op_add.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,936 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * inode operations (add entry)
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+/*
+}
diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
--- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,1506 @@
++++ linux/fs/aufs/i_op.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,1507 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+
+#include <linux/device_cgroup.h>
+#include <linux/fs_stack.h>
++#include <linux/iversion.h>
+#include <linux/namei.h>
+#include <linux/security.h>
+#include "aufs.h"
+};
diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
--- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,512 @@
++++ linux/fs/aufs/i_op_del.c 2019-05-06 09:03:04.816810402 +0200
+@@ -0,0 +1,513 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * inode operations (del entry)
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+/*
+}
diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
--- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c 2019-03-05 12:13:00.139224339 +0100
-@@ -0,0 +1,1249 @@
++++ linux/fs/aufs/i_op_ren.c 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,1250 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * todo: this is crazy monster
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+enum { AuSRC, AuDST, AuSrcDst };
+}
diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
--- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h 2019-03-05 12:13:00.142557771 +0100
-@@ -0,0 +1,53 @@
++++ linux/fs/aufs/loop.h 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+int au_loopback_init(void);
+void au_loopback_fin(void);
+#else
++AuStub(struct file *, loop_backing_file, return NULL)
++
+AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
+ struct dentry *h_adding)
+AuStubInt0(au_test_loopback_kthread, void)
+}
diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
--- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h 2019-03-05 12:13:00.142557771 +0100
++++ linux/fs/aufs/opts.h 2019-05-06 09:03:04.820143837 +0200
@@ -0,0 +1,225 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#define AuOpt_SUM (1 << 10) /* summation for statfs(2) */
+#define AuOpt_SUM_W (1 << 11) /* unimplemented */
+#define AuOpt_WARN_PERM (1 << 12) /* warn when add-branch */
-+#define AuOpt_VERBOSE (1 << 13) /* busy inode when del-branch */
++#define AuOpt_VERBOSE (1 << 13) /* print the cause of error */
+#define AuOpt_DIO (1 << 14) /* direct io */
+#define AuOpt_DIRREN (1 << 15) /* directory rename */
+
+#endif /* __AUFS_RWSEM_H__ */
diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
--- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c 2019-03-05 12:13:00.142557771 +0100
-@@ -0,0 +1,313 @@
++++ linux/fs/aufs/sbinfo.c 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,314 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * superblock private data
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+/*
+}
diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
--- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c 2019-03-05 12:13:00.142557771 +0100
-@@ -0,0 +1,1048 @@
++++ linux/fs/aufs/super.c 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,1049 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * mount and super_block operations
+ */
+
++#include <linux/iversion.h>
+#include <linux/mm.h>
+#include <linux/seq_file.h>
+#include <linux/statfs.h>
+}
diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
--- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c 2019-03-05 12:13:00.145891204 +0100
-@@ -0,0 +1,895 @@
++++ linux/fs/aufs/vdir.c 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,896 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+ * virtual or vertical directory
+ */
+
++#include <linux/iversion.h>
+#include "aufs.h"
+
+static unsigned int calc_size(int nlen)
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
--- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h 2019-03-05 12:13:00.145891204 +0100
-@@ -0,0 +1,355 @@
++++ linux/fs/aufs/vfsub.h 2019-05-06 09:03:04.820143837 +0200
+@@ -0,0 +1,354 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2005-2019 Junjiro R. Okajima
+#ifdef __KERNEL__
+
+#include <linux/fs.h>
-+#include <linux/iversion.h>
+#include <linux/mount.h>
+#include <linux/posix_acl.h>
+#include <linux/xattr.h>
+}
diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
--- /usr/share/empty/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h 2019-03-05 12:13:00.155891502 +0100
++++ linux/include/uapi/linux/aufs_type.h 2019-05-06 09:03:04.820143837 +0200
@@ -0,0 +1,448 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+
+#include <linux/limits.h>
+
-+#define AUFS_VERSION "4.x-rcN-20190211"
++#define AUFS_VERSION "4.x-rcN-20190311"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
+ return f;
+}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
-index a570730f5482..255e2d3763e7 100644
+index c42cbe71ed4b..255e2d3763e7 100644
--- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h
-@@ -26,7 +26,11 @@ void au_warn_loopback(struct super_block *h_sb);
+@@ -26,6 +26,8 @@ void au_warn_loopback(struct super_block *h_sb);
int au_loopback_init(void);
void au_loopback_fin(void);
+
+struct file *aufs_real_loop(struct file *file);
#else
-+AuStub(struct file *, loop_backing_file, return NULL)
-+
- AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
- struct dentry *h_adding)
- AuStubInt0(au_test_loopback_kthread, void)
-@@ -34,6 +38,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
+ AuStub(struct file *, loop_backing_file, return NULL)
+
+@@ -36,6 +38,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
AuStubInt0(au_loopback_init, void)
AuStubVoid(au_loopback_fin, void)
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index 7c270b14f8c9..61938c274f05 100644
+index 73255f63b80c..f04e211cbf89 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
-@@ -845,7 +845,10 @@ static const struct super_operations aufs_sop = {
+@@ -846,7 +846,10 @@ static const struct super_operations aufs_sop = {
.statfs = aufs_statfs,
.put_super = aufs_put_super,
.sync_fs = aufs_sync_fs,