]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-aufs4.patch
- builds with aufs but aufs is not tested
[packages/kernel.git] / kernel-aufs4.patch
index a25984be5d56b00c98cd7b23f920b83435877bf7..6627f25989a16e09366f8bdfcc2bbc03a13af418 100644 (file)
@@ -1,20 +1,18 @@
 SPDX-License-Identifier: GPL-2.0
 aufs4.x-rcN kbuild patch
 
-diff --git a/fs/Kconfig b/fs/Kconfig
-index ac474a6..284cee9 100644
---- a/fs/Kconfig
-+++ b/fs/Kconfig
-@@ -255,6 +255,7 @@ source "fs/pstore/Kconfig"
+--- linux-5.2/fs/Kconfig~      2019-07-08 00:41:56.000000000 +0200
++++ linux-5.2/fs/Kconfig       2019-07-08 09:33:44.244881357 +0200
+@@ -261,6 +261,7 @@ source "fs/romfs/Kconfig"
+ source "fs/pstore/Kconfig"
  source "fs/sysv/Kconfig"
  source "fs/ufs/Kconfig"
- source "fs/exofs/Kconfig"
 +source "fs/aufs/Kconfig"
  
  endif # MISC_FILESYSTEMS
  
 diff --git a/fs/Makefile b/fs/Makefile
-index 293733f..12d19d0 100644
+index 293733f61594..12d19d0de07a 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
 @@ -128,3 +128,4 @@ obj-y                              += exofs/ # Multiple modules
@@ -26,17 +24,17 @@ SPDX-License-Identifier: GPL-2.0
 aufs4.x-rcN base patch
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 6ac000c..16404bb 100644
+index dce5c099f43c..d10f05c88860 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -2605,6 +2605,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
@@ -50,10 +48,10 @@ index 6ac000c..16404bb 100644
  M:    Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
  S:    Maintained
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index ea9debf..9e534a3 100644
+index cf5538942834..a271e17e4b10 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -739,6 +739,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -738,6 +738,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
        return error;
  }
  
@@ -79,10 +77,10 @@ index ea9debf..9e534a3 100644
  
  static ssize_t loop_attr_show(struct device *dev, char *page,
 diff --git a/fs/dcache.c b/fs/dcache.c
-index 2e7e8d8..9f57bd8 100644
+index aac41adf4743..fc18967c2522 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -1238,7 +1238,7 @@ enum d_walk_ret {
+@@ -1247,7 +1247,7 @@ enum d_walk_ret {
   *
   * The @enter() callbacks are called with d_lock held.
   */
@@ -92,7 +90,7 @@ index 2e7e8d8..9f57bd8 100644
  {
        struct dentry *this_parent;
 diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 4137d96..c91b3e3 100644
+index 083185174c6d..78234ee16784 100644
 --- a/fs/fcntl.c
 +++ b/fs/fcntl.c
 @@ -32,7 +32,7 @@
@@ -114,7 +112,7 @@ index 4137d96..c91b3e3 100644
                return error;
  
 diff --git a/fs/inode.c b/fs/inode.c
-index 42f6d25..fa6ae6a 100644
+index 73432e64f874..4a1756b8b4bd 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(generic_update_time);
@@ -127,10 +125,10 @@ index 42f6d25..fa6ae6a 100644
        int (*update_time)(struct inode *, struct timespec64 *, int);
  
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 9918655..72c93f3 100644
+index 678ef175d63a..9b6a3d0f87a1 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -770,6 +770,12 @@ static inline int check_mnt(struct mount *mnt)
+@@ -768,6 +768,12 @@ static inline int check_mnt(struct mount *mnt)
        return mnt->mnt_ns == current->nsproxy->mnt_ns;
  }
  
@@ -144,7 +142,7 @@ index 9918655..72c93f3 100644
   * vfsmount lock must be held for write
   */
 diff --git a/fs/read_write.c b/fs/read_write.c
-index 8a2737f..42f64cc 100644
+index ff3c5e6f87cf..5c18a9e51f37 100644
 --- a/fs/read_write.c
 +++ b/fs/read_write.c
 @@ -489,6 +489,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
@@ -177,10 +175,10 @@ index 8a2737f..42f64cc 100644
  {
        mm_segment_t old_fs;
 diff --git a/fs/splice.c b/fs/splice.c
-index b3daa97..1dd7f96 100644
+index de2ede048473..5dcf77b8e1b2 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -838,8 +838,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -837,8 +837,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
  /*
   * Attempt to initiate a splice from pipe to file.
   */
@@ -191,7 +189,7 @@ index b3daa97..1dd7f96 100644
  {
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
                                loff_t *, size_t, unsigned int);
-@@ -855,9 +855,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -854,9 +854,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  /*
   * Attempt to initiate a splice from a file to a pipe.
   */
@@ -205,7 +203,7 @@ index b3daa97..1dd7f96 100644
        ssize_t (*splice_read)(struct file *, loff_t *,
                               struct pipe_inode_info *, size_t, unsigned int);
 diff --git a/fs/sync.c b/fs/sync.c
-index b54e054..2860782 100644
+index b54e0541ad89..28607828e96f 100644
 --- a/fs/sync.c
 +++ b/fs/sync.c
 @@ -28,7 +28,7 @@
@@ -218,10 +216,10 @@ index b54e054..2860782 100644
        if (wait)
                sync_inodes_sb(sb);
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 897eae8..7fb92a9 100644
+index 29d8e2cfed0e..5db265e7d35a 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -1286,6 +1286,7 @@ extern void fasync_free(struct fasync_struct *);
+@@ -1310,6 +1310,7 @@ extern void fasync_free(struct fasync_struct *);
  /* can be called from interrupts */
  extern void kill_fasync(struct fasync_struct **, int, int);
  
@@ -229,7 +227,7 @@ index 897eae8..7fb92a9 100644
  extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
  extern int f_setown(struct file *filp, unsigned long arg, int force);
  extern void f_delown(struct file *filp);
-@@ -1747,6 +1748,7 @@ struct file_operations {
+@@ -1803,6 +1804,7 @@ struct file_operations {
        ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
        unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
        int (*check_flags)(int);
@@ -237,7 +235,7 @@ index 897eae8..7fb92a9 100644
        int (*flock) (struct file *, int, struct file_lock *);
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
        ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
-@@ -1818,6 +1820,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
+@@ -1873,6 +1875,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
                              struct iovec *fast_pointer,
                              struct iovec **ret_pointer);
  
@@ -250,7 +248,7 @@ index 897eae8..7fb92a9 100644
  extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
  extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
  extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
-@@ -2243,6 +2251,7 @@ extern int current_umask(void);
+@@ -2298,6 +2306,7 @@ extern int current_umask(void);
  extern void ihold(struct inode * inode);
  extern void iput(struct inode *);
  extern int generic_update_time(struct inode *, struct timespec64 *, int);
@@ -258,7 +256,7 @@ index 897eae8..7fb92a9 100644
  
  /* /sys/fs */
  extern struct kobject *fs_kobj;
-@@ -2530,6 +2539,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
+@@ -2585,6 +2594,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
        return false;
  }
  #endif
@@ -267,10 +265,10 @@ index 897eae8..7fb92a9 100644
  extern const struct file_operations def_blk_fops;
  extern const struct file_operations def_chr_fops;
 diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
-index b0d0b51..f73ffaa 100644
+index c5335df2372f..4e48a5059536 100644
 --- a/include/linux/lockdep.h
 +++ b/include/linux/lockdep.h
-@@ -313,6 +313,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
+@@ -306,6 +306,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
        return lock->key == key;
  }
  
@@ -279,7 +277,7 @@ index b0d0b51..f73ffaa 100644
  /*
   * Acquire a lock.
   *
-@@ -439,6 +441,7 @@ struct lockdep_map { };
+@@ -432,6 +434,7 @@ struct lockdep_map { };
  
  #define lockdep_depth(tsk)    (0)
  
@@ -288,7 +286,7 @@ index b0d0b51..f73ffaa 100644
  
  #define lockdep_assert_held(l)                        do { (void)(l); } while (0)
 diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
-index 3594208..24f5fd1 100644
+index 35942084cd40..24f5fd1a789d 100644
 --- a/include/linux/mnt_namespace.h
 +++ b/include/linux/mnt_namespace.h
 @@ -6,11 +6,14 @@
@@ -307,7 +305,7 @@ index 3594208..24f5fd1 100644
  extern const struct file_operations proc_mountinfo_operations;
  extern const struct file_operations proc_mountstats_operations;
 diff --git a/include/linux/splice.h b/include/linux/splice.h
-index 74b4911..19789fb 100644
+index 74b4911ac16d..19789fbea567 100644
 --- a/include/linux/splice.h
 +++ b/include/linux/splice.h
 @@ -87,4 +87,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
@@ -322,19 +320,19 @@ index 74b4911..19789fb 100644
 +                       unsigned int flags);
  #endif
 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index dd13f86..fa6f559 100644
+index 95932333a48b..516ab7da26fb 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -140,7 +140,7 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
- unsigned long nr_lock_classes;
- static struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
+@@ -143,7 +143,7 @@ static
+ #endif
+ struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
  
 -static inline struct lock_class *hlock_class(struct held_lock *hlock)
 +inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
  {
        if (!hlock->class_idx) {
                /*
-@@ -151,6 +151,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
+@@ -154,6 +154,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
        }
        return lock_classes + hlock->class_idx - 1;
  }
@@ -346,10 +344,10 @@ SPDX-License-Identifier: GPL-2.0
 aufs4.x-rcN mmap patch
 
 diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 7e9f07bf..3ab5901 100644
+index f5ed9512d193..e8f8e59d93bb 100644
 --- a/fs/proc/base.c
 +++ b/fs/proc/base.c
-@@ -2016,7 +2016,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) {
@@ -359,7 +357,7 @@ index 7e9f07bf..3ab5901 100644
                rc = 0;
        }
 diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index 3b63be6..fb9913b 100644
+index 3b63be64e436..fb9913bf3d10 100644
 --- a/fs/proc/nommu.c
 +++ b/fs/proc/nommu.c
 @@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -375,7 +373,7 @@ index 3b63be6..fb9913b 100644
                ino = inode->i_ino;
        }
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 5ea1d64..7865a470 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)
@@ -390,7 +388,7 @@ index 5ea1d64..7865a470 100644
                dev = inode->i_sb->s_dev;
                ino = inode->i_ino;
                pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1727,7 +1730,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;
@@ -400,7 +398,7 @@ index 5ea1d64..7865a470 100644
        struct mm_walk walk = {
                .hugetlb_entry = gather_hugetlb_stats,
 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index 0b63d68..400d1c5 100644
+index 0b63d68dedb2..400d1c594ceb 100644
 --- a/fs/proc/task_nommu.c
 +++ b/fs/proc/task_nommu.c
 @@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
@@ -416,10 +414,10 @@ index 0b63d68..400d1c5 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 0416a72..4a298a9 100644
+index 80bb6408fe73..59a1ea611ba7 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -1440,6 +1440,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
+@@ -1518,6 +1518,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
        unmap_mapping_range(mapping, holebegin, holelen, 0);
  }
  
@@ -449,10 +447,10 @@ index 0416a72..4a298a9 100644
                void *buf, int len, unsigned int gup_flags);
  extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 5ed8f62..0122975 100644
+index 2c471a2c43fa..c6e7aa6996ff 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -239,6 +239,7 @@ struct vm_region {
+@@ -244,6 +244,7 @@ struct vm_region {
        unsigned long   vm_top;         /* region allocated to here */
        unsigned long   vm_pgoff;       /* the offset in vm_file corresponding to vm_start */
        struct file     *vm_file;       /* the backing file or NULL */
@@ -460,7 +458,7 @@ index 5ed8f62..0122975 100644
  
        int             vm_usage;       /* region usage count (access under nommu_region_sem) */
        bool            vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -313,6 +314,7 @@ struct vm_area_struct {
+@@ -318,6 +319,7 @@ struct vm_area_struct {
        unsigned long vm_pgoff;         /* Offset (within vm_file) in PAGE_SIZE
                                           units */
        struct file * vm_file;          /* File we map to (can be NULL). */
@@ -469,10 +467,10 @@ index 5ed8f62..0122975 100644
  
        atomic_long_t swap_readahead_info;
 diff --git a/kernel/fork.c b/kernel/fork.c
-index f0b5847..fa562c3 100644
+index b69248e6f0e0..099b89978dd3 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
-@@ -505,7 +505,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
+@@ -547,7 +547,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
                        struct inode *inode = file_inode(file);
                        struct address_space *mapping = file->f_mapping;
  
@@ -482,7 +480,7 @@ index f0b5847..fa562c3 100644
                                atomic_dec(&inode->i_writecount);
                        i_mmap_lock_write(mapping);
 diff --git a/mm/Makefile b/mm/Makefile
-index 26ef77a..b2869af 100644
+index d210cc9d6f80..e77e80ce7298 100644
 --- a/mm/Makefile
 +++ b/mm/Makefile
 @@ -39,7 +39,7 @@ obj-y                        := filemap.o mempool.o oom_kill.o fadvise.o \
@@ -493,12 +491,12 @@ index 26ef77a..b2869af 100644
 +                         prfile.o debug.o $(mmu-y)
  
  obj-y += init-mm.o
+ obj-y += memblock.o
 diff --git a/mm/filemap.c b/mm/filemap.c
-index 52517f2..250f675 100644
+index 9f5e323e883e..90db684a7cf4 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
-@@ -2700,7 +2700,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
+@@ -2677,7 +2677,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
        vm_fault_t ret = VM_FAULT_LOCKED;
  
        sb_start_pagefault(inode->i_sb);
@@ -508,7 +506,7 @@ index 52517f2..250f675 100644
        if (page->mapping != inode->i_mapping) {
                unlock_page(page);
 diff --git a/mm/mmap.c b/mm/mmap.c
-index f7cd9cb..515e88a 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)
@@ -520,7 +518,7 @@ index f7cd9cb..515e88a 100644
        mpol_put(vma_policy(vma));
        vm_area_free(vma);
        return next;
-@@ -905,7 +905,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
+@@ -929,7 +929,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
        if (remove_next) {
                if (file) {
                        uprobe_munmap(next, next->vm_start, next->vm_end);
@@ -529,7 +527,7 @@ index f7cd9cb..515e88a 100644
                }
                if (next->anon_vma)
                        anon_vma_merge(vma, next);
-@@ -1821,8 +1821,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1845,8 +1845,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
        return addr;
  
  unmap_and_free_vma:
@@ -539,7 +537,7 @@ index f7cd9cb..515e88a 100644
  
        /* Undo any partial mapping done by a device driver. */
        unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
-@@ -2641,7 +2641,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)
@@ -548,7 +546,7 @@ index f7cd9cb..515e88a 100644
  
        if (new->vm_ops && new->vm_ops->open)
                new->vm_ops->open(new);
-@@ -2660,7 +2660,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)
@@ -557,7 +555,7 @@ index f7cd9cb..515e88a 100644
        unlink_anon_vmas(new);
   out_free_mpol:
        mpol_put(vma_policy(new));
-@@ -2822,7 +2822,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;
@@ -566,7 +564,7 @@ index f7cd9cb..515e88a 100644
  
        pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
                     current->comm, current->pid);
-@@ -2897,10 +2897,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,
                }
        }
  
@@ -595,7 +593,7 @@ index f7cd9cb..515e88a 100644
  out:
        up_write(&mm->mmap_sem);
        if (populate)
-@@ -3206,7 +3223,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)
@@ -605,7 +603,7 @@ index f7cd9cb..515e88a 100644
                        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 e4aac33..b27b200 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)
@@ -635,7 +633,7 @@ index e4aac33..b27b200 100644
                        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)
@@ -643,10 +641,14 @@ index e4aac33..b27b200 100644
 +              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 0000000..a27ac36
+index 000000000000..024cdcfae1b1
 --- /dev/null
 +++ b/mm/prfile.c
 @@ -0,0 +1,86 @@
@@ -658,7 +660,7 @@ index 0000000..a27ac36
 + *
 + * See Documentation/filesystems/aufs/design/06mmap.txt
 + *
-+ * Copyright (c) 2014-2018 Junjro R. Okajima
++ * Copyright (c) 2014-2019 Junjro R. Okajima
 + * Copyright (c) 2014 Ian Campbell
 + */
 +
@@ -740,10 +742,10 @@ SPDX-License-Identifier: GPL-2.0
 aufs4.x-rcN standalone patch
 
 diff --git a/fs/dcache.c b/fs/dcache.c
-index 9f57bd8..328a136 100644
+index fc18967c2522..50eb587c1253 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -1343,6 +1343,7 @@ void d_walk(struct dentry *parent, void *data,
+@@ -1352,6 +1352,7 @@ void d_walk(struct dentry *parent, void *data,
        seq = 1;
        goto again;
  }
@@ -751,7 +753,7 @@ index 9f57bd8..328a136 100644
  
  struct check_mount {
        struct vfsmount *mnt;
-@@ -2837,6 +2838,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
+@@ -2845,6 +2846,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
  
        write_sequnlock(&rename_lock);
  }
@@ -760,7 +762,7 @@ index 9f57bd8..328a136 100644
  /**
   * d_ancestor - search for an ancestor
 diff --git a/fs/exec.c b/fs/exec.c
-index 1ebf6e5..a72c294 100644
+index fb72d36f7823..7ce68004cbf8 100644
 --- a/fs/exec.c
 +++ b/fs/exec.c
 @@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
@@ -772,7 +774,7 @@ index 1ebf6e5..a72c294 100644
  #ifdef CONFIG_USELIB
  /*
 diff --git a/fs/fcntl.c b/fs/fcntl.c
-index c91b3e3..7751309 100644
+index 78234ee16784..2072f690b121 100644
 --- a/fs/fcntl.c
 +++ b/fs/fcntl.c
 @@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, unsigned long arg)
@@ -784,7 +786,7 @@ index c91b3e3..7751309 100644
  static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
                       int force)
 diff --git a/fs/file_table.c b/fs/file_table.c
-index e49af4c..569020f 100644
+index 5679e7fcb6b0..961eec3df1eb 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -161,6 +161,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred)
@@ -812,7 +814,7 @@ index e49af4c..569020f 100644
  void __init files_init(void)
  {
 diff --git a/fs/inode.c b/fs/inode.c
-index fa6ae6a..69d4a6c 100644
+index 4a1756b8b4bd..6e51d5f9b9f3 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -1666,6 +1666,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
@@ -824,10 +826,10 @@ index fa6ae6a..69d4a6c 100644
  /**
   *    touch_atime     -       update the access time
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 72c93f3..c49803c 100644
+index 9b6a3d0f87a1..8c4d3d56f2df 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
-@@ -437,6 +437,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+@@ -434,6 +434,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
        mnt_dec_writers(real_mount(mnt));
        preempt_enable();
  }
@@ -835,7 +837,7 @@ index 72c93f3..c49803c 100644
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -775,6 +776,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
+@@ -773,6 +774,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
  {
        return check_mnt(real_mount(mnt));
  }
@@ -843,7 +845,7 @@ index 72c93f3..c49803c 100644
  
  /*
   * vfsmount lock must be held for write
-@@ -1832,6 +1834,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1842,6 +1844,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
        }
        return 0;
  }
@@ -852,18 +854,10 @@ index 72c93f3..c49803c 100644
  static void cleanup_group_ids(struct mount *mnt, struct mount *end)
  {
 diff --git a/fs/notify/group.c b/fs/notify/group.c
-index c03b836..817f22c 100644
+index c03b83662876..94d210ca384a 100644
 --- a/fs/notify/group.c
 +++ b/fs/notify/group.c
-@@ -23,6 +23,7 @@
- #include <linux/rculist.h>
- #include <linux/wait.h>
- #include <linux/memcontrol.h>
-+#include <linux/module.h>
- #include <linux/fsnotify_backend.h>
- #include "fsnotify.h"
-@@ -112,6 +113,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
+@@ -112,6 +112,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
  {
        refcount_inc(&group->refcnt);
  }
@@ -871,7 +865,7 @@ index c03b836..817f22c 100644
  
  /*
   * Drop a reference to a group.  Free it if it's through.
-@@ -121,6 +123,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
+@@ -121,6 +122,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
        if (refcount_dec_and_test(&group->refcnt))
                fsnotify_final_destroy_group(group);
  }
@@ -879,7 +873,7 @@ index c03b836..817f22c 100644
  
  /*
   * Create a new fsnotify_group and hold a reference for the group returned.
-@@ -150,6 +153,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
+@@ -150,6 +152,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
  
        return group;
  }
@@ -888,10 +882,10 @@ index c03b836..817f22c 100644
  int fsnotify_fasync(int fd, struct file *file, int on)
  {
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index 59cdb27..ce365c7 100644
+index d2dd16cb5989..cf709b7d611a 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
-@@ -263,6 +263,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
+@@ -289,6 +289,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
        queue_delayed_work(system_unbound_wq, &reaper_work,
                           FSNOTIFY_REAPER_DELAY);
  }
@@ -899,7 +893,7 @@ index 59cdb27..ce365c7 100644
  
  /*
   * Get mark reference when we found the mark via lockless traversal of object
-@@ -417,6 +418,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
+@@ -443,6 +444,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
        mutex_unlock(&group->mark_mutex);
        fsnotify_free_mark(mark);
  }
@@ -907,7 +901,7 @@ index 59cdb27..ce365c7 100644
  
  /*
   * Sorting function for lists of fsnotify marks.
-@@ -632,6 +634,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp,
+@@ -658,6 +660,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp,
        mutex_unlock(&group->mark_mutex);
        return ret;
  }
@@ -915,7 +909,7 @@ index 59cdb27..ce365c7 100644
  
  /*
   * Given a list of marks, find the mark associated with given group. If found
-@@ -754,6 +757,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
+@@ -781,6 +784,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
        fsnotify_get_group(group);
        mark->group = group;
  }
@@ -924,7 +918,7 @@ index 59cdb27..ce365c7 100644
  /*
   * Destroy all marks in destroy_list, waits for SRCU period to finish before
 diff --git a/fs/open.c b/fs/open.c
-index 0285ce7..cb81623 100644
+index 0285ce7dbd51..cb81623a8b09 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -936,7 +930,7 @@ index 0285ce7..cb81623 100644
  long vfs_truncate(const struct path *path, loff_t length)
  {
 diff --git a/fs/read_write.c b/fs/read_write.c
-index 42f64cc..d9cb969 100644
+index 5c18a9e51f37..542e59cd8d27 100644
 --- a/fs/read_write.c
 +++ b/fs/read_write.c
 @@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
@@ -972,10 +966,10 @@ index 42f64cc..d9cb969 100644
  static inline loff_t file_pos_read(struct file *file)
  {
 diff --git a/fs/splice.c b/fs/splice.c
-index 1dd7f96..a5e3bcb 100644
+index 5dcf77b8e1b2..63fe2652c67d 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
-@@ -851,6 +851,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -850,6 +850,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
  
        return splice_write(pipe, out, ppos, len, flags);
  }
@@ -983,7 +977,7 @@ index 1dd7f96..a5e3bcb 100644
  
  /*
   * Attempt to initiate a splice from a file to a pipe.
-@@ -880,6 +881,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -879,6 +880,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
  
        return splice_read(in, ppos, pipe, len, flags);
  }
@@ -992,7 +986,7 @@ index 1dd7f96..a5e3bcb 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/fs/sync.c b/fs/sync.c
-index 2860782..ffd7ea4 100644
+index 28607828e96f..ffd7ea43831e 100644
 --- a/fs/sync.c
 +++ b/fs/sync.c
 @@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block *sb, int wait)
@@ -1004,7 +998,7 @@ index 2860782..ffd7ea4 100644
  /*
   * Write out and wait upon all dirty data associated with this
 diff --git a/fs/xattr.c b/fs/xattr.c
-index 0d6a6a4..7ce4701 100644
+index 0d6a6a4af861..7ce4701b7289 100644
 --- a/fs/xattr.c
 +++ b/fs/xattr.c
 @@ -295,6 +295,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
@@ -1016,10 +1010,10 @@ index 0d6a6a4..7ce4701 100644
  ssize_t
  __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index fa6f559..7ac19ef 100644
+index 516ab7da26fb..c4f72e461d28 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
+@@ -154,6 +154,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
        }
        return lock_classes + hlock->class_idx - 1;
  }
@@ -1028,7 +1022,7 @@ index fa6f559..7ac19ef 100644
  
  #ifdef CONFIG_LOCK_STAT
 diff --git a/kernel/task_work.c b/kernel/task_work.c
-index 0fef395..83fb1ec 100644
+index 0fef395662a6..83fb1ecfc33d 100644
 --- a/kernel/task_work.c
 +++ b/kernel/task_work.c
 @@ -116,3 +116,4 @@ void task_work_run(void)
@@ -1036,47 +1030,20 @@ index 0fef395..83fb1ec 100644
        }
  }
 +EXPORT_SYMBOL_GPL(task_work_run);
-diff --git a/security/commoncap.c b/security/commoncap.c
-index 2e489d6..1e146da 100644
---- a/security/commoncap.c
-+++ b/security/commoncap.c
-@@ -1336,12 +1336,14 @@ int cap_mmap_addr(unsigned long addr)
-       }
-       return ret;
- }
-+EXPORT_SYMBOL_GPL(cap_mmap_addr);
- int cap_mmap_file(struct file *file, unsigned long reqprot,
-                 unsigned long prot, unsigned long flags)
- {
-       return 0;
- }
-+EXPORT_SYMBOL_GPL(cap_mmap_file);
- #ifdef CONFIG_SECURITY
 diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index cd97929..424fd23 100644
+index cd97929fac66..20c59b2e3b26 100644
 --- a/security/device_cgroup.c
 +++ b/security/device_cgroup.c
-@@ -8,6 +8,7 @@
- #include <linux/device_cgroup.h>
- #include <linux/cgroup.h>
- #include <linux/ctype.h>
-+#include <linux/export.h>
- #include <linux/list.h>
- #include <linux/uaccess.h>
- #include <linux/seq_file.h>
-@@ -824,3 +825,4 @@ int __devcgroup_check_permission(short type, u32 major, u32 minor,
+@@ -824,3 +824,4 @@ int __devcgroup_check_permission(short type, u32 major, u32 minor,
  
        return 0;
  }
 +EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
 diff --git a/security/security.c b/security/security.c
-index 736e78d..b314539 100644
+index 55bc49027ba9..b46c4eef1960 100644
 --- a/security/security.c
 +++ b/security/security.c
-@@ -542,6 +542,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
+@@ -566,6 +566,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
                return 0;
        return call_int_hook(path_rmdir, 0, dir, dentry);
  }
@@ -1084,7 +1051,7 @@ index 736e78d..b314539 100644
  
  int security_path_unlink(const struct path *dir, struct dentry *dentry)
  {
-@@ -558,6 +559,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
+@@ -582,6 +583,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
                return 0;
        return call_int_hook(path_symlink, 0, dir, dentry, old_name);
  }
@@ -1092,7 +1059,7 @@ index 736e78d..b314539 100644
  
  int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
                       struct dentry *new_dentry)
-@@ -566,6 +568,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
+@@ -590,6 +592,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
                return 0;
        return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
  }
@@ -1100,7 +1067,7 @@ index 736e78d..b314539 100644
  
  int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
                         const struct path *new_dir, struct dentry *new_dentry,
-@@ -593,6 +596,7 @@ int security_path_truncate(const struct path *path)
+@@ -617,6 +620,7 @@ int security_path_truncate(const struct path *path)
                return 0;
        return call_int_hook(path_truncate, 0, path);
  }
@@ -1108,7 +1075,7 @@ index 736e78d..b314539 100644
  
  int security_path_chmod(const struct path *path, umode_t mode)
  {
-@@ -600,6 +604,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
+@@ -624,6 +628,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
                return 0;
        return call_int_hook(path_chmod, 0, path, mode);
  }
@@ -1116,7 +1083,7 @@ index 736e78d..b314539 100644
  
  int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  {
-@@ -607,6 +612,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
+@@ -631,6 +636,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
                return 0;
        return call_int_hook(path_chown, 0, path, uid, gid);
  }
@@ -1124,15 +1091,7 @@ index 736e78d..b314539 100644
  
  int security_path_chroot(const struct path *path)
  {
-@@ -692,6 +698,7 @@ int security_inode_readlink(struct dentry *dentry)
-               return 0;
-       return call_int_hook(inode_readlink, 0, dentry);
- }
-+EXPORT_SYMBOL_GPL(security_inode_readlink);
- int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
-                              bool rcu)
-@@ -707,6 +714,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -731,6 +737,7 @@ int security_inode_permission(struct inode *inode, int mask)
                return 0;
        return call_int_hook(inode_permission, 0, inode, mask);
  }
@@ -1140,7 +1099,7 @@ index 736e78d..b314539 100644
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -878,6 +886,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -902,6 +909,7 @@ int security_file_permission(struct file *file, int mask)
  
        return fsnotify_perm(file, mask);
  }
@@ -1148,7 +1107,7 @@ index 736e78d..b314539 100644
  
  int security_file_alloc(struct file *file)
  {
-@@ -937,6 +946,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
+@@ -961,6 +969,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
                return ret;
        return ima_file_mmap(file, prot);
  }
@@ -1252,10 +1211,10 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +              will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt    2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/01intro.txt    2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,171 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1427,10 +1386,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt   2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt   2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,258 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1689,10 +1648,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +For this purpose, use "aumvdown" command in aufs-util.git.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt   1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt      2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt      2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,85 @@
 +
-+# Copyright (C) 2015-2018 Junjiro R. Okajima
++# Copyright (C) 2015-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1778,10 +1737,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.t
 +       be implemented in aufs, but not all I am afraid.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt   2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt   2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,113 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1895,10 +1854,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +   by over-mounting something (or another method).
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt   2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/04branch.txt   2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,74 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -1973,10 +1932,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +    same named entry on the upper branch.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt    1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt       2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt       2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,64 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2076,10 +2035,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot li
 +}
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt   2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt   2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,102 @@
 +
-+# Copyright (C) 2017-2018 Junjiro R. Okajima
++# Copyright (C) 2017-2019 Junjiro R. Okajima
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2182,10 +2141,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li
 +equivalen to udba=reval case.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt  1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt     2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt     2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,120 @@
 +
-+# Copyright (C) 2011-2018 Junjiro R. Okajima
++# Copyright (C) 2011-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2306,10 +2265,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linu
 +should restore the original file state after an error happens.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt  1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt     2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt     2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,72 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2382,10 +2341,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +I have to give up this "looks-smater" approach.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt    2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt    2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,96 @@
 +
-+# Copyright (C) 2014-2018 Junjiro R. Okajima
++# Copyright (C) 2014-2019 Junjiro R. Okajima
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2482,10 +2441,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt lin
 +now, aufs implements the branch attributes to ignore the error.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt        1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt   2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/07export.txt   2019-03-05 12:13:00.132557473 +0100
 @@ -0,0 +1,58 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2544,10 +2503,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +  lookup_one_len(), vfs_getattr(), encode_fh() and others.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt  1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt     2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt     2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,52 @@
 +
-+# Copyright (C) 2005-2018 Junjiro R. Okajima
++# Copyright (C) 2005-2019 Junjiro R. Okajima
 +# 
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2600,10 +2559,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +initramfs will use it to replace the old one at the next boot.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt    2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt    2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,47 @@
 +
-+# Copyright (C) 2010-2018 Junjiro R. Okajima
++# Copyright (C) 2010-2019 Junjiro R. Okajima
 +#
 +# This program is free software; you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
@@ -2651,8 +2610,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
 +regular files only.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
 --- /usr/share/empty/Documentation/filesystems/aufs/README     1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README        2018-10-23 12:33:35.579375203 +0200
-@@ -0,0 +1,394 @@
++++ linux/Documentation/filesystems/aufs/README        2019-07-08 09:31:38.324384703 +0200
+@@ -0,0 +1,402 @@
 +
 +Aufs4 -- advanced multi layered unification filesystem version 4.x
 +http://aufs.sf.net
@@ -2907,6 +2866,13 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +  Supports a nested loopback mount in a branch-fs. This patch is
 +  unnecessary until aufs produces a message like "you may want to try
 +  another patch for loopback file".
++- proc_mounts.patch
++  When there are many mountpoints and many mount(2)/umount(2) are
++  running, then /proc/mounts may not show the all mountpoints.  This
++  patch makes /proc/mounts always show the full mountpoints list.
++  If you don't want to apply this patch and meet such problem, then you
++  need to increase the value of 'ProcMounts_Times' make-variable in
++  aufs-util.git as a second best solution.
 +- vfs-ino.patch
 +  Modifies a system global kernel internal function get_next_ino() in
 +  order to stop assigning 0 for an inode-number. Not directly related to
@@ -3030,6 +2996,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +Tomasz Szewczyk made a donation (2016/4).
 +James Burry made a donation (2016/12).
 +Carsten Rose made a donation (2018/9).
++Porteus Kiosk made a donation (2018/10).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -3049,11 +3016,11 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +# End: ;
 diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 --- /usr/share/empty/fs/aufs/aufs.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h       2018-10-23 12:33:35.592708932 +0200
++++ linux/fs/aufs/aufs.h       2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,62 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -3115,11 +3082,11 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c     2018-10-23 12:33:35.592708932 +0200
-@@ -0,0 +1,1422 @@
++++ linux/fs/aufs/branch.c     2019-03-05 12:13:00.135890907 +0100
+@@ -0,0 +1,1423 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -3172,7 +3139,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +
 +      if (br->br_fhsm) {
 +              au_br_fhsm_fin(br->br_fhsm);
-+              kfree(br->br_fhsm);
++              au_kfree_try_rcu(br->br_fhsm);
 +      }
 +
 +      key = br->br_dykey;
@@ -3187,12 +3154,12 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +      lockdep_off();
 +      path_put(&br->br_path);
 +      lockdep_on();
-+      kfree(wbr);
++      au_kfree_rcu(wbr);
 +      au_lcnt_wait_for_fin(&br->br_nfiles);
 +      au_lcnt_wait_for_fin(&br->br_count);
 +      /* I don't know why, but percpu_refcount requires this */
 +      /* synchronize_rcu(); */
-+      kfree(br);
++      au_kfree_rcu(br);
 +}
 +
 +/*
@@ -3293,13 +3260,13 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +              return add_branch; /* success */
 +
 +out_wbr:
-+      kfree(add_branch->br_wbr);
++      au_kfree_rcu(add_branch->br_wbr);
 +out_hnotify:
 +      au_hnotify_fin_br(add_branch);
 +out_xino:
 +      au_xino_put(add_branch);
 +out_br:
-+      kfree(add_branch);
++      au_kfree_rcu(add_branch);
 +out:
 +      return ERR_PTR(err);
 +}
@@ -3465,7 +3432,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +      br->br_perm = old_perm;
 +
 +      if (!err && wbr && !au_br_writable(new_perm)) {
-+              kfree(wbr);
++              au_kfree_rcu(wbr);
 +              br->br_wbr = NULL;
 +      }
 +
@@ -4246,7 +4213,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +
 +      err = copy_from_user(&ibusy, arg, sizeof(ibusy));
 +      if (!err)
-+              err = !access_ok(VERIFY_WRITE, &arg->h_ino, sizeof(arg->h_ino));
++              /* VERIFY_WRITE */
++              err = !access_ok(&arg->h_ino, sizeof(arg->h_ino));
 +      if (unlikely(err)) {
 +              err = -EFAULT;
 +              AuTraceErr(err);
@@ -4492,7 +4460,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +              if (br->br_wbr) {
 +                      err = au_wbr_init(br, sb, mod->perm);
 +                      if (unlikely(err)) {
-+                              kfree(br->br_wbr);
++                              au_kfree_rcu(br->br_wbr);
 +                              br->br_wbr = NULL;
 +                      }
 +              }
@@ -4504,7 +4472,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +              if (!au_br_fhsm(mod->perm)) {
 +                      /* fhsm --> non-fhsm */
 +                      au_br_fhsm_fin(br->br_fhsm);
-+                      kfree(br->br_fhsm);
++                      au_kfree_rcu(br->br_fhsm);
 +                      br->br_fhsm = NULL;
 +              }
 +      } else if (au_br_fhsm(mod->perm))
@@ -4516,7 +4484,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +      goto out; /* success */
 +
 +out_bf:
-+      kfree(bf);
++      au_kfree_try_rcu(bf);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -4541,11 +4509,11 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +}
 diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 --- /usr/share/empty/fs/aufs/branch.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h     2018-10-23 12:33:35.592708932 +0200
-@@ -0,0 +1,367 @@
++++ linux/fs/aufs/branch.h     2019-07-08 09:31:38.324384703 +0200
+@@ -0,0 +1,366 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -4594,9 +4562,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +      } xi_nondir;
 +
 +      struct mutex            xi_mtx; /* protects xi_file array */
-+      /* reserved for future use */
-+      /* wait_queue_head_t    xi_wq; */
-+      /* atomic_t             xi_pending; */
++      struct hlist_bl_head    xi_writing;
 +
 +      atomic_t                xi_truncating;
 +
@@ -4772,7 +4738,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +static const loff_t au_loff_max = LLONG_MAX;
 +
 +aufs_bindex_t au_xi_root(struct super_block *sb, struct dentry *dentry);
-+struct file *au_xino_create(struct super_block *sb, char *fpath, int silent);
++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent,
++                          int wbrtop);
 +struct file *au_xino_create2(struct super_block *sb, struct path *base,
 +                           struct file *copy_src);
 +struct au_xi_new {
@@ -4956,11 +4923,11 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +-include ${srctree}/${src}/conf_priv.mk
 diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 --- /usr/share/empty/fs/aufs/cpup.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c       2018-10-23 12:33:35.596042364 +0200
-@@ -0,0 +1,1444 @@
++++ linux/fs/aufs/cpup.c       2019-03-05 12:13:00.135890907 +0100
+@@ -0,0 +1,1458 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -5297,9 +5264,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      unsigned long blksize;
 +      unsigned char do_kfree;
 +      char *buf;
++      struct super_block *h_sb;
 +
 +      err = -ENOMEM;
-+      blksize = dst->f_path.dentry->d_sb->s_blocksize;
++      h_sb = file_inode(dst)->i_sb;
++      blksize = h_sb->s_blocksize;
 +      if (!blksize || PAGE_SIZE < blksize)
 +              blksize = PAGE_SIZE;
 +      AuDbg("blksize %lu\n", blksize);
@@ -5317,9 +5286,10 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      src->f_pos = 0;
 +      dst->f_pos = 0;
 +      err = au_do_copy_file(dst, src, len, buf, blksize);
-+      if (do_kfree)
-+              kfree(buf);
-+      else
++      if (do_kfree) {
++              AuDebugOn(!au_kfree_do_sz_test(blksize));
++              au_kfree_do_rcu(buf);
++      } else
 +              free_page((unsigned long)buf);
 +
 +out:
@@ -5350,26 +5320,36 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +static int au_clone_or_copy(struct file *dst, struct file *src, loff_t len)
 +{
 +      int err;
++      loff_t lo;
 +      struct super_block *h_src_sb;
 +      struct inode *h_src_inode;
 +
 +      h_src_inode = file_inode(src);
 +      h_src_sb = h_src_inode->i_sb;
 +      if (h_src_sb != file_inode(dst)->i_sb
-+          || !dst->f_op->clone_file_range) {
++          || !dst->f_op->remap_file_range) {
 +              err = au_do_copy(dst, src, len);
 +              goto out;
 +      }
 +
 +      if (!au_test_nfs(h_src_sb)) {
 +              inode_unlock_shared(h_src_inode);
-+              err = vfsub_clone_file_range(src, dst, len);
++              lo = vfsub_clone_file_range(src, dst, len);
 +              inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD);
 +      } else
-+              err = vfsub_clone_file_range(src, dst, len);
-+      /* older XFS has a condition in cloning */
-+      if (unlikely(err != -EOPNOTSUPP))
++              lo = vfsub_clone_file_range(src, dst, len);
++      if (lo == len) {
++              err = 0;
++              goto out; /* success */
++      } else if (lo >= 0)
++              /* todo: possible? */
++              /* paritially succeeded */
++              AuDbg("lo %lld, len %lld. Retrying.\n", lo, len);
++      else if (lo != -EOPNOTSUPP) {
++              /* older XFS has a condition in cloning */
++              err = lo;
 +              goto out;
++      }
 +
 +      /* the backend fs on NFS may not support cloning */
 +      err = au_do_copy(dst, src, len);
@@ -5393,18 +5373,15 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +              struct dentry *dentry;
 +              int force_wr;
 +              struct file *file;
-+              void *label;
 +      } *f, file[] = {
 +              {
 +                      .bindex = cpg->bsrc,
 +                      .flags = O_RDONLY | O_NOATIME | O_LARGEFILE,
-+                      .label = &&out
 +              },
 +              {
 +                      .bindex = cpg->bdst,
 +                      .flags = O_WRONLY | O_NOATIME | O_LARGEFILE,
 +                      .force_wr = !!au_ftest_cpup(cpg->flags, RWDST),
-+                      .label = &&out_src
 +              }
 +      };
 +      struct au_branch *br;
@@ -5419,9 +5396,13 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +              f->dentry = au_h_dptr(cpg->dentry, f->bindex);
 +              f->file = au_h_open(cpg->dentry, f->bindex, f->flags,
 +                                  /*file*/NULL, f->force_wr);
-+              err = PTR_ERR(f->file);
-+              if (IS_ERR(f->file))
-+                      goto *f->label;
++              if (IS_ERR(f->file)) {
++                      err = PTR_ERR(f->file);
++                      if (i == SRC)
++                              goto out;
++                      else
++                              goto out_src;
++              }
 +      }
 +
 +      /* try stopping to update while we copyup */
@@ -5911,7 +5892,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +      }
 +out_parent:
 +      dput(dst_parent);
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      return err;
 +}
@@ -6404,11 +6385,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h       2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/cpup.h       2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,100 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -6508,11 +6489,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +#endif /* __AUFS_CPUP_H__ */
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 --- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c    2018-10-23 12:33:35.596042364 +0200
-@@ -0,0 +1,519 @@
++++ linux/fs/aufs/dbgaufs.c    2019-03-05 12:13:00.135890907 +0100
+@@ -0,0 +1,526 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -6554,7 +6535,14 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +static int dbgaufs_xi_release(struct inode *inode __maybe_unused,
 +                            struct file *file)
 +{
-+      kfree(file->private_data);
++      void *p;
++
++      p = file->private_data;
++      if (p) {
++              /* this is struct dbgaufs_arg */
++              AuDebugOn(!au_kfree_sz_test(p));
++              au_kfree_do_rcu(p);
++      }
 +      return 0;
 +}
 +
@@ -7031,11 +7019,11 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 --- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h    2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dbgaufs.h    2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,53 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -7088,11 +7076,11 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c      2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dcsub.c      2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,225 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -7145,7 +7133,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +      return 0; /* success */
 +
 +out_dpages:
-+      kfree(dpages->dpages);
++      au_kfree_try_rcu(dpages->dpages);
 +out:
 +      return err;
 +}
@@ -7158,7 +7146,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +      p = dpages->dpages;
 +      for (i = 0; i < dpages->ndpage; i++)
 +              au_dpage_free(p++);
-+      kfree(dpages->dpages);
++      au_kfree_try_rcu(dpages->dpages);
 +}
 +
 +static int au_dpages_append(struct au_dcsub_pages *dpages,
@@ -7317,11 +7305,11 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 --- /usr/share/empty/fs/aufs/dcsub.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h      2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dcsub.h      2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,137 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -7458,11 +7446,11 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#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      2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -7482,6 +7470,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 + * debug print functions
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +/* Returns 0, or -errno.  arg is in kp->arg. */
@@ -7798,7 +7787,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +      a->mnt.mnt_sb = sb;
 +      a->fake.br_path.mnt = &a->mnt;
 +      err = do_pri_br(-1, &a->fake);
-+      kfree(a);
++      au_kfree_rcu(a);
 +      dpri("dev 0x%x\n", sb->s_dev);
 +      if (err || !au_test_aufs(sb))
 +              return;
@@ -7902,11 +7891,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h      2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/debug.h      2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,226 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -8132,11 +8121,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +#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     2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -8156,6 +8145,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 + * lookup and dentry operations
 + */
 +
++#include <linux/iversion.h>
 +#include <linux/namei.h>
 +#include "aufs.h"
 +
@@ -8370,7 +8360,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +
 +out_parent:
 +      dput(parent);
-+      kfree(args.whname.name);
++      au_kfree_try_rcu(args.whname.name);
 +      if (dirren)
 +              au_dr_lkup_fin(&args);
 +out:
@@ -9289,11 +9279,11 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 --- /usr/share/empty/fs/aufs/dentry.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h     2018-08-12 23:43:05.453457863 +0200
-@@ -0,0 +1,267 @@
++++ linux/fs/aufs/dentry.h     2019-03-05 12:13:00.135890907 +0100
+@@ -0,0 +1,268 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -9334,6 +9324,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +      aufs_bindex_t           di_btop, di_bbot, di_bwh, di_bdiropq;
 +      unsigned char           di_tmpfile; /* to allow the different name */
 +      struct au_hdentry       *di_hdentry;
++      struct rcu_head         rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -9560,11 +9551,11 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c      2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dinfo.c      2019-03-05 12:13:00.135890907 +0100
 @@ -0,0 +1,554 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -9638,7 +9629,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +              while (bindex++ <= bbot)
 +                      au_hdput(p++);
 +      }
-+      kfree(dinfo->di_hdentry);
++      au_kfree_try_rcu(dinfo->di_hdentry);
 +      au_cache_free_dinfo(dinfo);
 +}
 +
@@ -10118,11 +10109,11 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 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        2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -10143,6 +10134,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 + */
 +
 +#include <linux/fs_stack.h>
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +void au_add_nlink(struct inode *dir, struct inode *h_dir)
@@ -10279,7 +10271,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +out:
 +      dput(a->dentry);
 +      au_nwt_done(&au_sbi(sb)->si_nowait);
-+      kfree(arg);
++      au_kfree_try_rcu(arg);
 +}
 +
 +void au_dir_ts(struct inode *dir, aufs_bindex_t bindex)
@@ -10315,7 +10307,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +      if (unlikely(wkq_err)) {
 +              pr_err("wkq %d\n", wkq_err);
 +              dput(dentry);
-+              kfree(arg);
++              au_kfree_try_rcu(arg);
 +      }
 +
 +out:
@@ -10434,7 +10426,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +              };
 +              err = au_do_open(file, &args);
 +              if (unlikely(err))
-+                      kfree(fidir);
++                      au_kfree_rcu(fidir);
 +      }
 +      si_read_unlock(sb);
 +      return err;
@@ -10470,7 +10462,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +                              if (hf->hf_file)
 +                                      au_hfput(hf, /*execed*/0);
 +              }
-+              kfree(fidir);
++              au_kfree_rcu(fidir);
 +              finfo->fi_hdir = NULL;
 +      }
 +      au_finfo_fin(file);
@@ -10884,11 +10876,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 --- /usr/share/empty/fs/aufs/dir.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h        2018-08-12 23:43:05.453457863 +0200
-@@ -0,0 +1,132 @@
++++ linux/fs/aufs/dir.h        2019-03-05 12:13:00.139224339 +0100
+@@ -0,0 +1,134 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -10932,6 +10924,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +struct au_vdir_dehstr {
 +      struct hlist_node       hash;
 +      struct au_vdir_destr    *str;
++      struct rcu_head         rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +struct au_vdir_de {
@@ -10969,7 +10962,8 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +
 +      u64             vd_version;
 +      unsigned int    vd_deblk_sz;
-+      unsigned long           vd_jiffy;
++      unsigned long   vd_jiffy;
++      struct rcu_head rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -11020,11 +11014,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 --- /usr/share/empty/fs/aufs/dirren.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.c     2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dirren.c     2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,1316 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2017-2018 Junjiro R. Okajima
++ * Copyright (C) 2017-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -11142,7 +11136,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +              hbl = dr->dr_h_ino + i;
 +              /* no spinlock since sbinfo must be write-locked */
 +              hlist_bl_for_each_entry_safe(ent, pos, tmp, hbl, dr_hnode)
-+                      kfree(ent);
++                      au_kfree_rcu(ent);
 +              INIT_HLIST_BL_HEAD(hbl);
 +      }
 +}
@@ -11584,7 +11578,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      *ret = *drinfo;
 +      ssz = vfsub_read_k(file, (void *)ret->oldname, len, &pos);
 +      if (unlikely(ssz != len)) {
-+              kfree(ret);
++              au_kfree_rcu(ret);
 +              ret = ERR_PTR(-EIO);
 +              AuIOErr("ssz %zd, %u, %pD2\n", ssz, len, file);
 +              goto out;
@@ -11780,7 +11774,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +
 +static void au_drinfo_store_work_fin(struct au_drinfo_store *w)
 +{
-+      kfree(w->fdata);
++      au_kfree_rcu(w->fdata);
 +}
 +
 +static void au_drinfo_store_rev(struct au_drinfo_rev *rev,
@@ -11817,7 +11811,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +                             elm->info_last->oldname,
 +                             elm->info_last->oldnamelen);
 +                      err = au_drinfo_store_sio(w, /*elm*/NULL);
-+                      kfree(elm->info_last);
++                      au_kfree_rcu(elm->info_last);
 +              }
 +              if (unlikely(err))
 +                      AuIOErr("%d, %s\n", err, w->whname);
@@ -11893,7 +11887,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      if (unlikely(err)) {
 +              /* revert all drinfo */
 +              au_drinfo_store_rev(rev, &work);
-+              kfree(rev);
++              au_kfree_try_rcu(rev);
 +              *p = NULL;
 +      }
 +      au_hn_inode_unlock(hdir);
@@ -11949,7 +11943,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      /* revert */
 +      if (!already)
 +              au_dr_hino_del(dr, ent);
-+      kfree(ent);
++      au_kfree_rcu(ent);
 +
 +out:
 +      AuTraceErr(err);
@@ -11966,9 +11960,9 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      elm = rev->elm;
 +      for (nelm = rev->nelm; nelm > 0; nelm--, elm++) {
 +              dput(elm->info_dentry);
-+              kfree(elm->info_last);
++              au_kfree_rcu(elm->info_last);
 +      }
-+      kfree(rev);
++      au_kfree_try_rcu(rev);
 +}
 +
 +void au_dr_rename_rev(struct dentry *src, aufs_bindex_t btgt, void *_rev)
@@ -12000,10 +11994,10 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      ent = au_dr_hino_find(dr, h_inode->i_ino);
 +      BUG_ON(!ent);
 +      au_dr_hino_del(dr, ent);
-+      kfree(ent);
++      au_kfree_rcu(ent);
 +
 +out:
-+      kfree(rev);
++      au_kfree_try_rcu(rev);
 +      if (unlikely(err))
 +              pr_err("failed to remove dirren info\n");
 +}
@@ -12128,7 +12122,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      oldname.name = drinfo->oldname;
 +      if (au_qstreq(w->qname, &oldname)) {
 +              /* the name is renamed back */
-+              kfree(drinfo);
++              au_kfree_rcu(drinfo);
 +              drinfo = NULL;
 +
 +              infopath.dentry = info_dentry;
@@ -12143,7 +12137,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +              if (unlikely(e == -EWOULDBLOCK))
 +                      iput(delegated);
 +      }
-+      kfree(w->drinfo[bindex]);
++      au_kfree_rcu(w->drinfo[bindex]);
 +      w->drinfo[bindex] = drinfo;
 +      dput(info_dentry);
 +
@@ -12159,8 +12153,8 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      struct au_drinfo **p = drinfo;
 +
 +      while (n-- > 0)
-+              kfree(*drinfo++);
-+      kfree(p);
++              au_kfree_rcu(*drinfo++);
++      au_kfree_try_rcu(p);
 +}
 +
 +int au_dr_lkup(struct au_do_lookup_args *lkup, struct dentry *dentry,
@@ -12213,7 +12207,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +              ent = au_dr_hino_find(&br->br_dirren, h_dir->i_ino);
 +              AuDebugOn(!ent);
 +              au_dr_hino_del(&br->br_dirren, ent);
-+              kfree(ent);
++              au_kfree_rcu(ent);
 +      }
 +      goto out; /* success */
 +
@@ -12244,7 +12238,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +      if (!drinfo)
 +              goto out;
 +
-+      kfree(lkup->whname.name);
++      au_kfree_try_rcu(lkup->whname.name);
 +      lkup->whname.name = NULL;
 +      lkup->dirren.dr_name.len = drinfo->oldnamelen;
 +      lkup->dirren.dr_name.name = drinfo->oldname;
@@ -12340,11 +12334,11 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 --- /usr/share/empty/fs/aufs/dirren.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.h     2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dirren.h     2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,140 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2017-2018 Junjiro R. Okajima
++ * Copyright (C) 2017-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -12484,11 +12478,11 @@ diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 +#endif /* __AUFS_DIRREN_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c      2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dynop.c      2019-07-08 09:31:38.324384703 +0200
 @@ -0,0 +1,370 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2018 Junjiro R. Okajima
++ * Copyright (C) 2010-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -12528,8 +12522,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +      hlist_bl_lock(hbl);
 +      hlist_bl_for_each_entry(tmp, pos, hbl, dk_hnode)
 +              if (tmp->dk_op.dy_hop == h_op) {
-+                      key = tmp;
-+                      kref_get(&key->dk_kref);
++                      if (kref_get_unless_zero(&tmp->dk_kref))
++                              key = tmp;
 +                      break;
 +              }
 +      hlist_bl_unlock(hbl);
@@ -12583,8 +12577,8 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +      hlist_bl_lock(hbl);
 +      hlist_bl_for_each_entry(tmp, pos, hbl, dk_hnode)
 +              if (tmp->dk_op.dy_hop == h_op) {
-+                      kref_get(&tmp->dk_kref);
-+                      found = tmp;
++                      if (kref_get_unless_zero(&tmp->dk_kref))
++                              found = tmp;
 +                      break;
 +              }
 +      if (!found)
@@ -12730,7 +12724,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +      p->set(key, op->dy_hop, au_br_sb(br));
 +      old = dy_gadd(hbl, key);
 +      if (old) {
-+              kfree(key);
++              au_kfree_rcu(key);
 +              key = old;
 +      }
 +
@@ -12858,11 +12852,11 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 --- /usr/share/empty/fs/aufs/dynop.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h      2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/dynop.h      2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,75 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2010-2018 Junjiro R. Okajima
++ * Copyright (C) 2010-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -12937,11 +12931,11 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +#endif /* __AUFS_DYNOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 --- /usr/share/empty/fs/aufs/export.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c     2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/export.c     2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,838 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -13779,11 +13773,11 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 --- /usr/share/empty/fs/aufs/fhsm.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c       2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/fhsm.c       2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,427 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2011-2018 Junjiro R. Okajima
++ * Copyright (C) 2011-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -14210,11 +14204,11 @@ diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c       2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/file.c       2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,863 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -15077,11 +15071,11 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +};
 diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 --- /usr/share/empty/fs/aufs/file.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h       2018-08-12 23:43:05.456791299 +0200
-@@ -0,0 +1,341 @@
++++ linux/fs/aufs/file.h       2019-03-05 12:13:00.139224339 +0100
+@@ -0,0 +1,342 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -15147,6 +15141,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +
 +      struct hlist_bl_node    fi_hlist;
 +      struct file             *fi_file;       /* very ugly */
++      struct rcu_head         rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -15422,11 +15417,11 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#endif /* __AUFS_FILE_H__ */
 diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 --- /usr/share/empty/fs/aufs/finfo.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c      2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/finfo.c      2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,149 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -15575,11 +15570,11 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 --- /usr/share/empty/fs/aufs/f_op.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c       2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/f_op.c       2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,819 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -16398,11 +16393,11 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 --- /usr/share/empty/fs/aufs/fstype.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h     2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/fstype.h     2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,401 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -16803,11 +16798,11 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 --- /usr/share/empty/fs/aufs/hbl.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hbl.h        2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/hbl.h        2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,65 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2017-2018 Junjiro R. Okajima
++ * Copyright (C) 2017-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -16872,11 +16867,11 @@ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 +#endif /* __AUFS_HBL_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c  2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/hfsnotify.c  2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,289 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -17032,19 +17027,19 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      struct au_br_hfsnotify *hfsn = group->private;
 +
 +      /* AuDbg("here\n"); */
-+      kfree(hfsn);
++      au_kfree_try_rcu(hfsn);
 +}
 +
 +static int au_hfsn_handle_event(struct fsnotify_group *group,
 +                              struct inode *inode,
 +                              u32 mask, const void *data, int data_type,
-+                              const unsigned char *file_name, u32 cookie,
++                              const struct qstr *file_name, u32 cookie,
 +                              struct fsnotify_iter_info *iter_info)
 +{
 +      int err;
 +      struct au_hnotify *hnotify;
 +      struct inode *h_dir, *h_inode;
-+      struct qstr h_child_qstr = QSTR_INIT(file_name, strlen(file_name));
++
 +      struct fsnotify_mark *inode_mark;
 +
 +      AuDebugOn(data_type != FSNOTIFY_EVENT_INODE);
@@ -17059,11 +17054,11 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      h_inode = NULL;
 +#ifdef AuDbgHnotify
 +      au_debug_on();
-+      if (1 || h_child_qstr.len != sizeof(AUFS_XINO_FNAME) - 1
-+          || strncmp(h_child_qstr.name, AUFS_XINO_FNAME, h_child_qstr.len)) {
++      if (1 || file_name.len != sizeof(AUFS_XINO_FNAME) - 1
++          || strncmp(file_name.name, AUFS_XINO_FNAME, file_name.len)) {
 +              AuDbg("i%lu, mask 0x%x %s, hcname %.*s, hi%lu\n",
 +                    h_dir->i_ino, mask, au_hfsn_name(mask),
-+                    AuLNPair(&h_child_qstr), h_inode ? h_inode->i_ino : 0);
++                    AuLNPair(file_name), h_inode ? h_inode->i_ino : 0);
 +              /* WARN_ON(1); */
 +      }
 +      au_debug_off();
@@ -17072,7 +17067,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      inode_mark = fsnotify_iter_inode_mark(iter_info);
 +      AuDebugOn(!inode_mark);
 +      hnotify = container_of(inode_mark, struct au_hnotify, hn_mark);
-+      err = au_hnotify(h_dir, hnotify, mask, &h_child_qstr, h_inode);
++      err = au_hnotify(h_dir, hnotify, mask, file_name, h_inode);
 +
 +out:
 +      return err;
@@ -17128,7 +17123,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +      goto out; /* success */
 +
 +out_hfsn:
-+      kfree(hfsn);
++      au_kfree_try_rcu(hfsn);
 +out:
 +      return err;
 +}
@@ -17165,11 +17160,11 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c    2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/hfsplus.c    2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,60 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2018 Junjiro R. Okajima
++ * Copyright (C) 2010-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -17229,11 +17224,11 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 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    2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -17253,6 +17248,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 + * 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)
@@ -17774,13 +17770,13 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +      iput(a->dir);
 +      si_write_unlock(sb);
 +      au_nwt_done(&sbinfo->si_nowait);
-+      kfree(a);
++      au_kfree_rcu(a);
 +}
 +
 +/* ---------------------------------------------------------------------- */
 +
 +int au_hnotify(struct inode *h_dir, struct au_hnotify *hnotify, u32 mask,
-+             struct qstr *h_child_qstr, struct inode *h_child_inode)
++             const struct qstr *h_child_qstr, struct inode *h_child_inode)
 +{
 +      int err, len;
 +      unsigned int flags[AuHnLast], f;
@@ -17880,7 +17876,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +              iput(args->h_child_inode);
 +              iput(args->h_dir);
 +              iput(args->dir);
-+              kfree(args);
++              au_kfree_rcu(args);
 +      }
 +
 +out:
@@ -17953,11 +17949,11 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +}
 diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 --- /usr/share/empty/fs/aufs/iinfo.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/iinfo.c      2019-03-05 12:13:00.139224339 +0100
 @@ -0,0 +1,286 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -18238,16 +18234,16 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +                      hi++;
 +              }
 +      }
-+      kfree(iinfo->ii_hinode);
++      au_kfree_rcu(iinfo->ii_hinode);
 +      AuRwDestroy(&iinfo->ii_rwsem);
 +}
 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      2018-08-12 23:43:05.460124736 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -18267,6 +18263,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 + * inode functions
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +struct inode *au_igrab(struct inode *inode)
@@ -18775,11 +18772,11 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 --- /usr/share/empty/fs/aufs/inode.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h      2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,696 @@
++++ linux/fs/aufs/inode.h      2019-03-05 12:13:00.142557771 +0100
+@@ -0,0 +1,698 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -18816,6 +18813,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +      struct fsnotify_mark            hn_mark;
 +#endif
 +      struct inode            *hn_aufs_inode; /* no get/put */
++      struct rcu_head         rcu;
 +#endif
 +} ____cacheline_aligned_in_smp;
 +
@@ -18856,9 +18854,10 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +};
 +
 +struct au_icntnr {
-+      struct au_iinfo iinfo;
-+      struct inode vfs_inode;
-+      struct hlist_bl_node plink;
++      struct au_iinfo         iinfo;
++      struct inode            vfs_inode;
++      struct hlist_bl_node    plink;
++      struct rcu_head         rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* au_pin flags */
@@ -19390,7 +19389,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +void au_hn_ctl(struct au_hinode *hinode, int do_set);
 +void au_hn_reset(struct inode *inode, unsigned int flags);
 +int au_hnotify(struct inode *h_dir, struct au_hnotify *hnotify, u32 mask,
-+             struct qstr *h_child_qstr, struct inode *h_child_inode);
++             const struct qstr *file_name, struct inode *h_child_inode);
 +int au_hnotify_reset_br(unsigned int udba, struct au_branch *br, int perm);
 +int au_hnotify_init_br(struct au_branch *br, int perm);
 +void au_hnotify_fin_br(struct au_branch *br);
@@ -19475,11 +19474,11 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/ioctl.c      2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,220 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -19699,11 +19698,11 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#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   2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -19723,6 +19722,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 + * inode operations (add entry)
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +/*
@@ -20063,7 +20063,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      if (!try_aopen)
 +              aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      return err;
 +}
@@ -20523,7 +20523,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      }
 +      aufs_read_and_write_unlock2(dentry, src_dentry);
 +out_kfree:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -20632,17 +20632,17 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +      }
 +      aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      return err;
 +}
 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       2018-10-23 12:33:35.596042364 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -20664,6 +20664,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +
 +#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"
@@ -21698,7 +21699,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +out_si:
 +      si_read_unlock(sb);
 +out_kfree:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -21789,7 +21790,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +      di_write_unlock(dentry);
 +      si_read_unlock(sb);
 +out_kfree:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -22148,11 +22149,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 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   2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -22172,6 +22173,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 + * inode operations (del entry)
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +/*
@@ -22547,7 +22549,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +out_unlock:
 +      aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      return err;
 +}
@@ -22657,18 +22659,18 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +out_unlock:
 +      aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      AuTraceErr(err);
 +      return err;
 +}
 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   2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -22689,6 +22691,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 + * todo: this is crazy monster
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +enum { AuSRC, AuDST, AuSrcDst };
@@ -23910,7 +23913,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +      iput(a->dst_inode);
 +      if (a->thargs)
 +              au_whtmp_rmdir_free(a->thargs);
-+      kfree(a);
++      au_kfree_rcu(a);
 +out:
 +      AuTraceErr(err);
 +      return err;
@@ -24120,11 +24123,11 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 --- /usr/share/empty/fs/aufs/lcnt.h    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/lcnt.h       2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/lcnt.h       2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,186 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2018 Junjiro R. Okajima
++ * Copyright (C) 2018-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -24310,11 +24313,11 @@ diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 +#endif /* __AUFS_LCNT_H__ */
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c       2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/loop.c       2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,148 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -24458,15 +24461,15 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 +{
 +      if (backing_file_func)
 +              symbol_put(loop_backing_file);
-+      kfree(au_warn_loopback_array);
++      au_kfree_try_rcu(au_warn_loopback_array);
 +}
 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       2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,53 @@
++++ linux/fs/aufs/loop.h       2019-07-08 09:31:38.324384703 +0200
+@@ -0,0 +1,55 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -24506,6 +24509,8 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 +int au_loopback_init(void);
 +void au_loopback_fin(void);
 +#else
++AuStub(struct file *, loop_backing_file, return NULL, struct super_block *sb)
++
 +AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
 +         struct dentry *h_adding)
 +AuStubInt0(au_test_loopback_kthread, void)
@@ -24604,11 +24609,11 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
 diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 --- /usr/share/empty/fs/aufs/module.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c     2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/module.c     2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,273 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -24643,7 +24648,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +      if (p) {
 +#if 0 /* unused */
 +              if (!new_sz) {
-+                      kfree(p);
++                      au_kfree_rcu(p);
 +                      p = NULL;
 +                      goto out;
 +              }
@@ -24667,7 +24672,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +              if (q) {
 +                      if (p) {
 +                              memcpy(q, p, new_sz);
-+                              kfree(p);
++                              au_kfree_try_rcu(p);
 +                      }
 +                      p = q;
 +              } else
@@ -24881,11 +24886,11 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +module_exit(aufs_exit);
 diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 --- /usr/share/empty/fs/aufs/module.h  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h     2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,102 @@
++++ linux/fs/aufs/module.h     2019-03-05 12:13:00.142557771 +0100
+@@ -0,0 +1,166 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -24911,6 +24916,11 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#ifdef __KERNEL__
 +
 +#include <linux/slab.h>
++#include "debug.h"
++#include "dentry.h"
++#include "dir.h"
++#include "file.h"
++#include "inode.h"
 +
 +struct path;
 +struct seq_file;
@@ -24927,6 +24937,53 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +void *au_kzrealloc(void *p, unsigned int nused, unsigned int new_sz, gfp_t gfp,
 +                 int may_shrink);
 +
++/*
++ * Comparing the size of the object with sizeof(struct rcu_head)
++ * case 1: object is always larger
++ *    --> au_kfree_rcu() or au_kfree_do_rcu()
++ * case 2: object is always smaller
++ *    --> au_kfree_small()
++ * case 3: object can be any size
++ *    --> au_kfree_try_rcu()
++ */
++
++static inline void au_kfree_do_rcu(const void *p)
++{
++      struct {
++              struct rcu_head rcu;
++      } *a = (void *)p;
++
++      kfree_rcu(a, rcu);
++}
++
++#define au_kfree_rcu(_p) do {                                         \
++              typeof(_p) p = (_p);                                    \
++              BUILD_BUG_ON(sizeof(*p) < sizeof(struct rcu_head));     \
++              if (p)                                                  \
++                      au_kfree_do_rcu(p);                             \
++      } while (0)
++
++#define au_kfree_do_sz_test(sz)       (sz >= sizeof(struct rcu_head))
++#define au_kfree_sz_test(p)   (p && au_kfree_do_sz_test(ksize(p)))
++
++static inline void au_kfree_try_rcu(const void *p)
++{
++      if (!p)
++              return;
++      if (au_kfree_sz_test(p))
++              au_kfree_do_rcu(p);
++      else
++              kfree(p);
++}
++
++static inline void au_kfree_small(const void *p)
++{
++      if (!p)
++              return;
++      AuDebugOn(au_kfree_sz_test(p));
++      kfree(p);
++}
++
 +static inline int au_kmidx_sub(size_t sz, size_t new_sz)
 +{
 +#ifndef CONFIG_SLOB
@@ -24968,11 +25025,23 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +      kmem_cache_create(#type, sizeof(struct type), \
 +                        __alignof__(struct type), AuCacheFlags, ctor)
 +
-+#define AuCacheFuncs(name, index) \
-+static inline struct au_##name *au_cache_alloc_##name(void) \
-+{ return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \
-+static inline void au_cache_free_##name(struct au_##name *p) \
-+{ kmem_cache_free(au_cache[AuCache_##index], p); }
++#define AuCacheFuncs(name, index)                                     \
++      static inline struct au_##name *au_cache_alloc_##name(void)     \
++      { return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \
++      static inline void au_cache_free_##name##_norcu(struct au_##name *p) \
++      { kmem_cache_free(au_cache[AuCache_##index], p); }              \
++                                                                      \
++      static inline void au_cache_free_##name##_rcu_cb(struct rcu_head *rcu) \
++      { void *p = rcu;                                                \
++              p -= offsetof(struct au_##name, rcu);                   \
++              kmem_cache_free(au_cache[AuCache_##index], p); }        \
++      static inline void au_cache_free_##name##_rcu(struct au_##name *p) \
++      { BUILD_BUG_ON(sizeof(struct au_##name) < sizeof(struct rcu_head)); \
++              call_rcu(&p->rcu, au_cache_free_##name##_rcu_cb); }     \
++                                                                      \
++      static inline void au_cache_free_##name(struct au_##name *p)    \
++      { /* au_cache_free_##name##_norcu(p); */                        \
++              au_cache_free_##name##_rcu(p); }
 +
 +AuCacheFuncs(dinfo, DINFO);
 +AuCacheFuncs(icntnr, ICNTNR);
@@ -24987,11 +25056,11 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c     2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,705 @@
++++ linux/fs/aufs/mvdown.c     2019-03-05 12:13:00.142557771 +0100
+@@ -0,0 +1,706 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2011-2018 Junjiro R. Okajima
++ * Copyright (C) 2011-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -25634,7 +25703,8 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +
 +      err = copy_from_user(&args->mvdown, uarg, sizeof(args->mvdown));
 +      if (!err)
-+              err = !access_ok(VERIFY_WRITE, uarg, sizeof(*uarg));
++              /* VERIFY_WRITE */
++              err = !access_ok(uarg, sizeof(*uarg));
 +      if (unlikely(err)) {
 +              err = -EFAULT;
 +              AuTraceErr(err);
@@ -25689,18 +25759,18 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +      e = copy_to_user(uarg, &args->mvdown, sizeof(args->mvdown));
 +      if (unlikely(e))
 +              err = -EFAULT;
-+      kfree(args);
++      au_kfree_rcu(args);
 +out:
 +      AuTraceErr(err);
 +      return err;
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 --- /usr/share/empty/fs/aufs/opts.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c       2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/opts.c       2019-07-08 09:31:38.324384703 +0200
 @@ -0,0 +1,1877 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -26618,7 +26688,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +      int err;
 +      struct file *file;
 +
-+      file = au_xino_create(sb, args[0].from, /*silent*/0);
++      file = au_xino_create(sb, args[0].from, /*silent*/0, /*wbrtop*/0);
 +      err = PTR_ERR(file);
 +      if (IS_ERR(file))
 +              goto out;
@@ -26960,7 +27030,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +              }
 +      }
 +
-+      kfree(a);
++      au_kfree_rcu(a);
 +      dump_opts(opts);
 +      if (unlikely(err))
 +              au_opts_free(opts);
@@ -27390,7 +27460,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +              au_hn_inode_unlock(hdir);
 +
 +              if (!err && do_free) {
-+                      kfree(wbr);
++                      au_kfree_rcu(wbr);
 +                      br->br_wbr = NULL;
 +              }
 +      }
@@ -27577,11 +27647,11 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +}
 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       2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/opts.h       2019-05-06 09:03:04.820143837 +0200
 @@ -0,0 +1,225 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -27627,7 +27697,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +#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 */
 +
@@ -27806,11 +27876,11 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +#endif /* __AUFS_OPTS_H__ */
 diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 --- /usr/share/empty/fs/aufs/plink.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/plink.c      2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,516 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -28326,11 +28396,11 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +}
 diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 --- /usr/share/empty/fs/aufs/poll.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c       2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/poll.c       2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,51 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -28381,11 +28451,11 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 +}
 diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 --- /usr/share/empty/fs/aufs/posix_acl.c       1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/posix_acl.c  2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/posix_acl.c  2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,103 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2014-2018 Junjiro R. Okajima
++ * Copyright (C) 2014-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -28488,11 +28558,11 @@ diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 +}
 diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 --- /usr/share/empty/fs/aufs/procfs.c  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c     2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/procfs.c     2019-07-08 09:31:38.324384703 +0200
 @@ -0,0 +1,171 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2018 Junjiro R. Okajima
++ * Copyright (C) 2010-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -28553,8 +28623,8 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +      hlist_bl_lock(&au_sbilist);
 +      hlist_bl_for_each_entry(sbinfo, pos, &au_sbilist, si_list)
 +              if (id == sysaufs_si_id(sbinfo)) {
-+                      kobject_get(&sbinfo->si_kobj);
-+                      sb = sbinfo->si_sb;
++                      if (kobject_get_unless_zero(&sbinfo->si_kobj))
++                              sb = sbinfo->si_sb;
 +                      break;
 +              }
 +      hlist_bl_unlock(&au_sbilist);
@@ -28663,11 +28733,11 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 --- /usr/share/empty/fs/aufs/rdu.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c        2018-08-12 23:43:05.463458173 +0200
-@@ -0,0 +1,382 @@
++++ linux/fs/aufs/rdu.c        2019-03-05 12:13:00.142557771 +0100
+@@ -0,0 +1,384 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -28801,7 +28871,8 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +      struct file *h_file;
 +      struct au_rdu_cookie *cookie = &rdu->cookie;
 +
-+      err = !access_ok(VERIFY_WRITE, rdu->ent.e, rdu->sz);
++      /* VERIFY_WRITE */
++      err = !access_ok(rdu->ent.e, rdu->sz);
 +      if (unlikely(err)) {
 +              err = -EFAULT;
 +              AuTraceErr(err);
@@ -28907,7 +28978,8 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +              /* unnecessary to support mmap_sem since this is a dir */
 +              err = copy_from_user(&ent, u->e, sizeof(ent));
 +              if (!err)
-+                      err = !access_ok(VERIFY_WRITE, &u->e->ino, sizeof(ino));
++                      /* VERIFY_WRITE */
++                      err = !access_ok(&u->e->ino, sizeof(ino));
 +              if (unlikely(err)) {
 +                      err = -EFAULT;
 +                      AuTraceErr(err);
@@ -29049,11 +29121,11 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 --- /usr/share/empty/fs/aufs/rwsem.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/rwsem.h      2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,73 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -29126,11 +29198,11 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#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     2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -29150,6 +29222,7 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 + * superblock private data
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +/*
@@ -29176,13 +29249,13 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +      au_br_free(sbinfo);
 +      au_rw_write_unlock(&sbinfo->si_rwsem);
 +
-+      kfree(sbinfo->si_branch);
++      au_kfree_try_rcu(sbinfo->si_branch);
 +      mutex_destroy(&sbinfo->si_xib_mtx);
 +      AuRwDestroy(&sbinfo->si_rwsem);
 +
 +      au_lcnt_wait_for_fin(&sbinfo->si_ninodes);
 +      /* si_nfiles is waited too */
-+      kfree(sbinfo);
++      au_kfree_rcu(sbinfo);
 +}
 +
 +int au_si_alloc(struct super_block *sb)
@@ -29258,9 +29331,9 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +      return 0; /* success */
 +
 +out_br:
-+      kfree(sbinfo->si_branch);
++      au_kfree_try_rcu(sbinfo->si_branch);
 +out_sbinfo:
-+      kfree(sbinfo);
++      au_kfree_rcu(sbinfo);
 +out:
 +      return err;
 +}
@@ -29443,11 +29516,11 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +}
 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      2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -29467,6 +29540,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 + * mount and super_block operations
 + */
 +
++#include <linux/iversion.h>
 +#include <linux/mm.h>
 +#include <linux/seq_file.h>
 +#include <linux/statfs.h>
@@ -30495,11 +30569,11 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +};
 diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 --- /usr/share/empty/fs/aufs/super.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/super.h      2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,589 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31088,11 +31162,11 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#endif /* __AUFS_SUPER_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 --- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c    2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/sysaufs.c    2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,93 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31185,11 +31259,11 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 --- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h    2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/sysaufs.h    2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,102 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31291,11 +31365,11 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#endif /* __SYSAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 --- /usr/share/empty/fs/aufs/sysfs.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c      2018-08-12 23:43:05.463458173 +0200
-@@ -0,0 +1,373 @@
++++ linux/fs/aufs/sysfs.c      2019-03-05 12:13:00.142557771 +0100
+@@ -0,0 +1,374 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31505,7 +31579,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +              if (unlikely(err == PAGE_SIZE))
 +                      err = -EFBIG;
 +      }
-+      kfree(seq);
++      au_kfree_rcu(seq);
 +out_unlock:
 +      si_read_unlock(sb);
 +out:
@@ -31542,7 +31616,8 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +
 +      sz = sizeof(*arg) - offsetof(union aufs_brinfo, path);
 +      for (bindex = 0; bindex <= bbot; bindex++, arg++) {
-+              err = !access_ok(VERIFY_WRITE, arg, sizeof(*arg));
++              /* VERIFY_WRITE */
++              err = !access_ok(arg, sizeof(*arg));
 +              if (unlikely(err))
 +                      break;
 +
@@ -31576,7 +31651,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +              err = -EFAULT;
 +
 +out_seq:
-+      kfree(seq);
++      au_kfree_rcu(seq);
 +out_buf:
 +      free_page((unsigned long)buf);
 +out:
@@ -31668,11 +31743,11 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 --- /usr/share/empty/fs/aufs/sysrq.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/sysrq.c      2019-03-05 12:13:00.142557771 +0100
 @@ -0,0 +1,160 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31832,11 +31907,11 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +}
 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       2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -31856,6 +31931,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 + * virtual or vertical directory
 + */
 +
++#include <linux/iversion.h>
 +#include "aufs.h"
 +
 +static unsigned int calc_size(int nlen)
@@ -31947,7 +32023,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      struct hlist_node *node;
 +
 +      hlist_for_each_entry_safe(pos, node, head, wh_hash)
-+              kfree(pos);
++              au_kfree_rcu(pos);
 +}
 +
 +static void au_nhash_de_do_free(struct hlist_head *head)
@@ -31974,7 +32050,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +              nhash_count(head);
 +              free(head++);
 +      }
-+      kfree(nhash->nh_head);
++      au_kfree_try_rcu(nhash->nh_head);
 +}
 +
 +void au_nhash_wh_free(struct au_nhash *whlist)
@@ -32193,8 +32269,8 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +
 +      deblk = vdir->vd_deblk;
 +      while (vdir->vd_nblk--)
-+              kfree(*deblk++);
-+      kfree(vdir->vd_deblk);
++              au_kfree_try_rcu(*deblk++);
++      au_kfree_try_rcu(vdir->vd_deblk);
 +      au_cache_free_vdir(vdir);
 +}
 +
@@ -32229,7 +32305,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      if (!err)
 +              return vdir; /* success */
 +
-+      kfree(vdir->vd_deblk);
++      au_kfree_try_rcu(vdir->vd_deblk);
 +
 +out_free:
 +      au_cache_free_vdir(vdir);
@@ -32244,7 +32320,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +      union au_vdir_deblk_p p, deblk_end;
 +
 +      while (vdir->vd_nblk > 1) {
-+              kfree(vdir->vd_deblk[vdir->vd_nblk - 1]);
++              au_kfree_try_rcu(vdir->vd_deblk[vdir->vd_nblk - 1]);
 +              /* vdir->vd_deblk[vdir->vd_nblk - 1] = NULL; */
 +              vdir->vd_nblk--;
 +      }
@@ -32731,11 +32807,11 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 --- /usr/share/empty/fs/aufs/vfsub.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/vfsub.c      2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,902 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -33637,11 +33713,11 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +}
 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      2018-10-23 12:33:35.599375796 +0200
-@@ -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-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -33667,7 +33743,6 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#ifdef __KERNEL__
 +
 +#include <linux/fs.h>
-+#include <linux/iversion.h>
 +#include <linux/mount.h>
 +#include <linux/posix_acl.h>
 +#include <linux/xattr.h>
@@ -33913,13 +33988,13 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 + * re-use branch fs's ioctl(FICLONE) while aufs itself doesn't support such
 + * ioctl.
 + */
-+static inline int vfsub_clone_file_range(struct file *src, struct file *dst,
-+                                       u64 len)
++static inline loff_t vfsub_clone_file_range(struct file *src, struct file *dst,
++                                          loff_t len)
 +{
-+      int err;
++      loff_t err;
 +
 +      lockdep_off();
-+      err = vfs_clone_file_range(src, 0, dst, 0, len);
++      err = vfs_clone_file_range(src, 0, dst, 0, len, /*remap_flags*/0);
 +      lockdep_on();
 +
 +      return err;
@@ -33996,11 +34071,11 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#endif /* __AUFS_VFSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 --- /usr/share/empty/fs/aufs/wbr_policy.c      1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c 2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/wbr_policy.c 2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,830 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -34461,7 +34536,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +
 +      mfs->mfsrr_bytes = bavail;
 +      AuDbg("b%d\n", mfs->mfs_bindex);
-+      kfree(st);
++      au_kfree_rcu(st);
 +}
 +
 +static int au_wbr_create_mfs(struct dentry *dentry, unsigned int flags)
@@ -34830,11 +34905,11 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +};
 diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 --- /usr/share/empty/fs/aufs/whout.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c      2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/whout.c      2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,1062 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -34997,7 +35072,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +
 +out_name:
 +      if (name != defname)
-+              kfree(name);
++              au_kfree_try_rcu(name);
 +out:
 +      AuTraceErrPtr(dentry);
 +      return dentry;
@@ -35437,7 +35512,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +      au_lcnt_dec(&a->br->br_count);
 +      si_write_unlock(a->sb);
 +      au_nwt_done(&au_sbi(a->sb)->si_nowait);
-+      kfree(arg);
++      au_kfree_rcu(a);
 +      if (unlikely(err))
 +              AuIOErr("err %d\n", err);
 +}
@@ -35465,7 +35540,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +              if (unlikely(wkq_err)) {
 +                      atomic_dec(&br->br_wbr->wbr_wh_running);
 +                      au_lcnt_dec(&br->br_count);
-+                      kfree(arg);
++                      au_kfree_rcu(arg);
 +              }
 +              do_dec = 0;
 +      }
@@ -35624,7 +35699,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +      wh_dentry = ERR_PTR(err);
 +      if (!err) {
 +              wh_dentry = vfsub_lkup_one(&wh_name, h_parent);
-+              kfree(wh_name.name);
++              au_kfree_try_rcu(wh_name.name);
 +      }
 +      return wh_dentry;
 +}
@@ -35742,7 +35817,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +              rdhash = AUFS_RDHASH_DEF;
 +      err = au_nhash_alloc(&whtmp->whlist, rdhash, gfp);
 +      if (unlikely(err)) {
-+              kfree(whtmp);
++              au_kfree_rcu(whtmp);
 +              whtmp = ERR_PTR(err);
 +      }
 +
@@ -35757,7 +35832,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +      dput(whtmp->wh_dentry);
 +      iput(whtmp->dir);
 +      au_nhash_wh_free(&whtmp->whlist);
-+      kfree(whtmp);
++      au_kfree_rcu(whtmp);
 +}
 +
 +/*
@@ -35896,11 +35971,11 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +}
 diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 --- /usr/share/empty/fs/aufs/whout.h   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h      2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/whout.h      2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,86 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -35986,11 +36061,11 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +#endif /* __AUFS_WHOUT_H__ */
 diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 --- /usr/share/empty/fs/aufs/wkq.c     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c        2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/wkq.c        2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,392 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -36162,7 +36237,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +
 +static void au_wkq_lockdep_free(struct au_wkinfo *wkinfo)
 +{
-+      kfree(wkinfo->hlock);
++      au_kfree_try_rcu(wkinfo->hlock);
 +}
 +
 +static void au_wkq_lockdep_pre(struct au_wkinfo *wkinfo)
@@ -36214,7 +36289,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +      else {
 +              kobject_put(wkinfo->kobj);
 +              module_put(THIS_MODULE); /* todo: ?? */
-+              kfree(wkinfo);
++              au_kfree_rcu(wkinfo);
 +      }
 +}
 +
@@ -36237,7 +36312,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +
 +static void au_wkq_comp_free(struct completion *comp)
 +{
-+      kfree(comp);
++      au_kfree_rcu(comp);
 +}
 +
 +#else
@@ -36382,11 +36457,11 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 --- /usr/share/empty/fs/aufs/wkq.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h        2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/wkq.h        2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,89 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -36475,11 +36550,11 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 +#endif /* __AUFS_WKQ_H__ */
 diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 --- /usr/share/empty/fs/aufs/xattr.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xattr.c      2018-08-12 23:43:05.466791610 +0200
++++ linux/fs/aufs/xattr.c      2019-03-05 12:13:00.145891204 +0100
 @@ -0,0 +1,356 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2014-2018 Junjiro R. Okajima
++ * Copyright (C) 2014-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -36658,10 +36733,10 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 +              AuTraceErr(err);
 +      }
 +
-+      kfree(value);
++      au_kfree_try_rcu(value);
 +
 +out_free:
-+      kfree(o);
++      au_kfree_try_rcu(o);
 +out:
 +      if (!unlocked)
 +              inode_unlock_shared(h_isrc);
@@ -36835,11 +36910,11 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 +}
 diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 --- /usr/share/empty/fs/aufs/xino.c    1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c       2018-10-23 12:33:35.599375796 +0200
-@@ -0,0 +1,1890 @@
++++ linux/fs/aufs/xino.c       2019-07-08 09:31:38.327718137 +0200
+@@ -0,0 +1,1965 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -36999,22 +37074,28 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +/*
 + * create and set a new xino file
 + */
-+struct file *au_xino_create(struct super_block *sb, char *fpath, int silent)
++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent,
++                          int wbrtop)
 +{
 +      struct file *file;
 +      struct dentry *h_parent, *d;
 +      struct inode *h_dir, *inode;
 +      int err;
++      static DEFINE_MUTEX(mtx);
 +
 +      /*
 +       * at mount-time, and the xino file is the default path,
 +       * hnotify is disabled so we have no notify events to ignore.
 +       * when a user specified the xino, we cannot get au_hdir to be ignored.
 +       */
++      if (!wbrtop)
++              mutex_lock(&mtx);
 +      file = vfsub_filp_open(fpath, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE
 +                             /* | __FMODE_NONOTIFY */,
 +                             0666);
 +      if (IS_ERR(file)) {
++              if (!wbrtop)
++                      mutex_unlock(&mtx);
 +              if (!silent)
 +                      pr_err("open %s(%ld)\n", fpath, PTR_ERR(file));
 +              return file;
@@ -37024,6 +37105,8 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      err = 0;
 +      d = file->f_path.dentry;
 +      h_parent = au_dget_parent_lock(d, AuLsc_I_PARENT);
++      if (!wbrtop)
++              mutex_unlock(&mtx);
 +      /* mnt_want_write() is unnecessary here */
 +      h_dir = d_inode(h_parent);
 +      inode = file_inode(file);
@@ -37311,7 +37394,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +              au_sbi(sb)->si_xino_jiffy = jiffy;
 +
 +out_st:
-+      kfree(st);
++      au_kfree_rcu(st);
 +out:
 +      return err;
 +}
@@ -37348,7 +37431,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      au_lcnt_dec(&br->br_count);
 +      si_write_unlock(sb);
 +      au_nwt_done(&au_sbi(sb)->si_nowait);
-+      kfree(args);
++      au_kfree_rcu(args);
 +}
 +
 +/*
@@ -37420,7 +37503,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +
 +      pr_err("wkq %d\n", wkq_err);
 +      au_lcnt_dec(&br->br_count);
-+      kfree(args);
++      au_kfree_rcu(args);
 +
 +out:
 +      atomic_dec(&br->br_xino->xi_truncating);
@@ -37486,6 +37569,11 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      ino_t ino;
 +};
 +
++struct au_xi_writing {
++      struct hlist_bl_node node;
++      ino_t h_ino, ino;
++};
++
 +static int au_xino_do_write(vfs_writef_t write, struct file *file,
 +                          struct au_xi_calc *calc, ino_t ino);
 +
@@ -37497,6 +37585,9 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      struct au_sbinfo *sbi;
 +      struct inode *root;
 +      struct file *file;
++      struct au_xi_writing *del, *p;
++      struct hlist_bl_head *hbl;
++      struct hlist_bl_node *pos;
 +      int err;
 +
 +      br = a->br;
@@ -37506,20 +37597,39 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      root = d_inode(sb->s_root);
 +      ii_read_lock_child(root);
 +      err = au_xino_do_new_async(sb, br, &a->calc);
-+      if (!err) {
-+              file = au_xino_file(br->br_xino, a->calc.idx);
-+              if (file)
-+                      err = au_xino_do_write(sbi->si_xwrite, file, &a->calc,
-+                                             a->ino);
-+              if (unlikely(err))
-+                      AuIOErr("err %d\n", err);
-+      } else
++      if (unlikely(err)) {
++              AuIOErr("err %d\n", err);
++              goto out;
++      }
++
++      file = au_xino_file(br->br_xino, a->calc.idx);
++      AuDebugOn(!file);
++      err = au_xino_do_write(sbi->si_xwrite, file, &a->calc, a->ino);
++      if (unlikely(err)) {
 +              AuIOErr("err %d\n", err);
++              goto out;
++      }
++
++      del = NULL;
++      hbl = &br->br_xino->xi_writing;
++      hlist_bl_lock(hbl);
++      au_hbl_for_each(pos, hbl) {
++              p = container_of(pos, struct au_xi_writing, node);
++              if (p->ino == a->ino) {
++                      del = p;
++                      hlist_bl_del(&p->node);
++                      break;
++              }
++      }
++      hlist_bl_unlock(hbl);
++      au_kfree_rcu(del);
++
++out:
 +      au_lcnt_dec(&br->br_count);
 +      ii_read_unlock(root);
 +      si_read_unlock(sb);
 +      au_nwt_done(&sbi->si_nowait);
-+      kfree(args);
++      au_kfree_rcu(a);
 +}
 +
 +/*
@@ -37545,7 +37655,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      if (unlikely(err)) {
 +              pr_err("wkq %d\n", err);
 +              au_lcnt_dec(&br->br_count);
-+              kfree(arg);
++              au_kfree_rcu(arg);
 +      }
 +
 +out:
@@ -37564,6 +37674,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      struct au_xi_calc calc;
 +      struct au_sbinfo *sbinfo;
 +      struct file *file;
++      struct au_xino *xi;
++      struct hlist_bl_head *hbl;
++      struct hlist_bl_node *pos;
++      struct au_xi_writing *p;
 +
 +      *ino = 0;
 +      if (!au_opt_test(au_mntflags(sb), XINO))
@@ -37571,10 +37685,24 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +
 +      err = 0;
 +      au_xi_calc(sb, h_ino, &calc);
-+      file = au_xino_file(au_sbr(sb, bindex)->br_xino, calc.idx);
-+      if (!file
-+          || vfsub_f_size_read(file) < calc.pos + sizeof(*ino))
-+              return 0; /* no ino */
++      xi = au_sbr(sb, bindex)->br_xino;
++      file = au_xino_file(xi, calc.idx);
++      if (!file) {
++              hbl = &xi->xi_writing;
++              hlist_bl_lock(hbl);
++              au_hbl_for_each(pos, hbl) {
++                      p = container_of(pos, struct au_xi_writing, node);
++                      if (p->h_ino == h_ino) {
++                              AuDbg("hi%llu, i%llu, found\n",
++                                    (u64)p->h_ino, (u64)p->ino);
++                              *ino = p->ino;
++                              break;
++                      }
++              }
++              hlist_bl_unlock(hbl);
++              return 0;
++      } else if (vfsub_f_size_read(file) < calc.pos + sizeof(*ino))
++              return 0; /* no xino */
 +
 +      sbinfo = au_sbi(sb);
 +      sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &calc.pos);
@@ -37618,6 +37746,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      struct file *file;
 +      struct au_branch *br;
 +      struct au_xino *xi;
++      struct au_xi_writing *p;
 +
 +      SiMustAnyLock(sb);
 +
@@ -37630,6 +37759,12 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      xi = br->br_xino;
 +      file = au_xino_file(xi, calc.idx);
 +      if (!file) {
++              /* store the inum pair into the list */
++              p = kmalloc(sizeof(*p), GFP_NOFS | __GFP_NOFAIL);
++              p->h_ino = h_ino;
++              p->ino = ino;
++              au_hbl_add(&p->node, &xi->xi_writing);
++
 +              /* create and write a new xino file asynchronously */
 +              err = au_xino_new_async(sb, br, &calc, ino);
 +              if (!err)
@@ -38077,16 +38212,15 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      spin_lock_init(&xi->xi_nondir.spin);
 +      init_waitqueue_head(&xi->xi_nondir.wqh);
 +      mutex_init(&xi->xi_mtx);
-+      /* init_waitqueue_head(&xi->xi_wq); */
-+      /* atomic_set(&xi->xi_pending, 0); */
++      INIT_HLIST_BL_HEAD(&xi->xi_writing);
 +      atomic_set(&xi->xi_truncating, 0);
 +      kref_init(&xi->xi_kref);
 +      goto out; /* success */
 +
 +out_file:
-+      kfree(xi->xi_file);
++      au_kfree_try_rcu(xi->xi_file);
 +out_free:
-+      kfree(xi);
++      au_kfree_rcu(xi);
 +      xi = NULL;
 +out:
 +      return xi;
@@ -38118,6 +38252,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +{
 +      struct au_xino *xi;
 +      int i;
++      unsigned long ul;
++      struct hlist_bl_head *hbl;
++      struct hlist_bl_node *pos, *n;
++      struct au_xi_writing *p;
 +
 +      xi = container_of(kref, struct au_xino, xi_kref);
 +      for (i = 0; i < xi->xi_nfile; i++)
@@ -38126,9 +38264,20 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +      for (i = xi->xi_nondir.total - 1; i >= 0; i--)
 +              AuDebugOn(xi->xi_nondir.array[i]);
 +      mutex_destroy(&xi->xi_mtx);
-+      kfree(xi->xi_file);
-+      kfree(xi->xi_nondir.array);
-+      kfree(xi);
++      hbl = &xi->xi_writing;
++      ul = au_hbl_count(hbl);
++      if (unlikely(ul)) {
++              pr_warn("xi_writing %lu\n", ul);
++              hlist_bl_lock(hbl);
++              hlist_bl_for_each_entry_safe (p, pos, n, hbl, node) {
++                      hlist_bl_del(&p->node);
++                      au_kfree_rcu(p);
++              }
++              hlist_bl_unlock(hbl);
++      }
++      au_kfree_try_rcu(xi->xi_file);
++      au_kfree_try_rcu(xi->xi_nondir.array);
++      au_kfree_rcu(xi);
 +}
 +
 +int au_xino_put(struct au_branch *br)
@@ -38440,11 +38589,12 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +              if (!IS_ERR(p)) {
 +                      strcat(p, "/" AUFS_XINO_FNAME);
 +                      AuDbg("%s\n", p);
-+                      file = au_xino_create(sb, p, /*silent*/0);
++                      file = au_xino_create(sb, p, /*silent*/0, /*wbrtop*/1);
 +              }
 +              free_page((unsigned long)page);
 +      } else {
-+              file = au_xino_create(sb, AUFS_XINO_DEFPATH, /*silent*/0);
++              file = au_xino_create(sb, AUFS_XINO_DEFPATH, /*silent*/0,
++                                    /*wbrtop*/0);
 +              if (IS_ERR(file))
 +                      goto out;
 +              h_sb = file->f_path.dentry->d_sb;
@@ -38729,11 +38879,11 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +}
 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       2018-10-23 12:33:35.602709228 +0200
++++ linux/include/uapi/linux/aufs_type.h       2019-07-08 09:31:38.327718137 +0200
 @@ -0,0 +1,448 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2018 Junjiro R. Okajima
++ * Copyright (C) 2005-2019 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -38773,7 +38923,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION  "4.x-rcN-20181022"
++#define AUFS_VERSION  "4.x-rcN-20190610"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC      ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -39183,10 +39333,10 @@ SPDX-License-Identifier: GPL-2.0
 aufs4.x-rcN loopback patch
 
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 9e534a3..74cd74e 100644
+index a271e17e4b10..ee17c7577224 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -626,6 +626,15 @@ static inline void loop_update_dio(struct loop_device *lo)
+@@ -625,6 +625,15 @@ static inline void loop_update_dio(struct loop_device *lo)
                        lo->use_dio);
  }
  
@@ -39202,18 +39352,18 @@ index 9e534a3..74cd74e 100644
  static void loop_reread_partitions(struct loop_device *lo,
                                   struct block_device *bdev)
  {
-@@ -690,6 +699,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -678,6 +687,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
                          unsigned int arg)
  {
-       struct file     *file, *old_file;
+       struct file     *file = NULL, *old_file;
 +      struct file     *f, *virt_file = NULL, *old_virt_file;
        int             error;
+       bool            partscan;
  
-       error = -ENXIO;
-@@ -705,12 +715,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -697,12 +707,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
        file = fget(arg);
        if (!file)
-               goto out;
+               goto out_err;
 +      f = loop_real_file(file);
 +      if (f) {
 +              virt_file = file;
@@ -39223,14 +39373,14 @@ index 9e534a3..74cd74e 100644
  
        error = loop_validate_file(file, bdev);
        if (error)
-               goto out_putf;
+               goto out_err;
  
        old_file = lo->lo_backing_file;
 +      old_virt_file = lo->lo_backing_virt_file;
  
        error = -EINVAL;
  
-@@ -722,6 +739,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -714,6 +731,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
        blk_mq_freeze_queue(lo->lo_queue);
        mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
        lo->lo_backing_file = file;
@@ -39238,24 +39388,25 @@ index 9e534a3..74cd74e 100644
        lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
        mapping_set_gfp_mask(file->f_mapping,
                             lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
-@@ -729,12 +747,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
-       blk_mq_unfreeze_queue(lo->lo_queue);
+@@ -727,6 +745,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+        * dependency.
+        */
        fput(old_file);
 +      if (old_virt_file)
 +              fput(old_virt_file);
-       if (lo->lo_flags & LO_FLAGS_PARTSCAN)
+       if (partscan)
                loop_reread_partitions(lo, bdev);
        return 0;
-  out_putf:
-       fput(file);
+@@ -735,6 +755,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+       mutex_unlock(&loop_ctl_mutex);
+       if (file)
+               fput(file);
 +      if (virt_file)
 +              fput(virt_file);
-  out:
        return error;
  }
-@@ -922,7 +944,7 @@ static int loop_prepare_queue(struct loop_device *lo)
+@@ -921,7 +943,7 @@ static int loop_prepare_queue(struct loop_device *lo)
  static int loop_set_fd(struct loop_device *lo, fmode_t mode,
                       struct block_device *bdev, unsigned int arg)
  {
@@ -39275,9 +39426,9 @@ index 9e534a3..74cd74e 100644
 +              get_file(file);
 +      }
  
-       error = -EBUSY;
-       if (lo->lo_state != Lo_unbound)
-@@ -968,6 +996,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+       error = mutex_lock_killable(&loop_ctl_mutex);
+       if (error)
+@@ -972,6 +1000,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
        lo->lo_device = bdev;
        lo->lo_flags = lo_flags;
        lo->lo_backing_file = file;
@@ -39285,42 +39436,42 @@ index 9e534a3..74cd74e 100644
        lo->transfer = NULL;
        lo->ioctl = NULL;
        lo->lo_sizelimit = 0;
-@@ -1001,6 +1030,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
 out_putf:
+@@ -1009,6 +1038,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+       mutex_unlock(&loop_ctl_mutex);
+ out_putf:
        fput(file);
 +      if (virt_file)
 +              fput(virt_file);
 out:
+ out:
        /* This is safe: open() is still holding a reference. */
        module_put(THIS_MODULE);
-@@ -1047,6 +1078,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
- static int loop_clr_fd(struct loop_device *lo)
+@@ -1055,6 +1086,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
+ static int __loop_clr_fd(struct loop_device *lo, bool release)
  {
-       struct file *filp = lo->lo_backing_file;
+       struct file *filp = NULL;
 +      struct file *virt_filp = lo->lo_backing_virt_file;
        gfp_t gfp = lo->old_gfp_mask;
        struct block_device *bdev = lo->lo_device;
+       int err = 0;
+@@ -1078,6 +1110,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
  
-@@ -1078,6 +1110,7 @@ static int loop_clr_fd(struct loop_device *lo)
        spin_lock_irq(&lo->lo_lock);
-       lo->lo_state = Lo_rundown;
        lo->lo_backing_file = NULL;
 +      lo->lo_backing_virt_file = NULL;
        spin_unlock_irq(&lo->lo_lock);
  
        loop_release_xfer(lo);
-@@ -1126,6 +1159,8 @@ static int loop_clr_fd(struct loop_device *lo)
-        * bd_mutex which is usually taken before lo_ctl_mutex.
+@@ -1146,6 +1179,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
         */
-       fput(filp);
+       if (filp)
+               fput(filp);
 +      if (virt_filp)
 +              fput(virt_filp);
-       return 0;
+       return err;
  }
  
 diff --git a/drivers/block/loop.h b/drivers/block/loop.h
-index 4d42c7a..a4974ee 100644
+index af75a5ee4094..1e6ee5a4f623 100644
 --- a/drivers/block/loop.h
 +++ b/drivers/block/loop.h
 @@ -46,7 +46,7 @@ struct loop_device {
@@ -39333,7 +39484,7 @@ index 4d42c7a..a4974ee 100644
        void            *key_data; 
  
 diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
-index 5309874..1a334cf 100644
+index 0309f0d502ff..19feb4f3cb5f 100644
 --- a/fs/aufs/f_op.c
 +++ b/fs/aufs/f_op.c
 @@ -359,7 +359,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
@@ -39346,12 +39497,12 @@ index 5309874..1a334cf 100644
                if (file->f_mapping != h_file->f_mapping) {
                        file->f_mapping = h_file->f_mapping;
 diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
-index 3d84349..a642de5 100644
+index f05887d612fd..6f0505723cb4 100644
 --- a/fs/aufs/loop.c
 +++ b/fs/aufs/loop.c
 @@ -133,3 +133,19 @@ void au_loopback_fin(void)
                symbol_put(loop_backing_file);
-       kfree(au_warn_loopback_array);
+       au_kfree_try_rcu(au_warn_loopback_array);
  }
 +
 +/* ---------------------------------------------------------------------- */
@@ -39370,22 +39521,19 @@ index 3d84349..a642de5 100644
 +      return f;
 +}
 diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
-index 05d703d..6bb23c8 100644
+index f31e40aff267..e13fb1a0717a 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, struct super_block *sb)
+@@ -36,6 +38,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
  
  AuStubInt0(au_loopback_init, void)
  AuStubVoid(au_loopback_fin, void)
@@ -39395,10 +39543,10 @@ index 05d703d..6bb23c8 100644
  
  #endif /* __KERNEL__ */
 diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index 777503e..7130061 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,
@@ -39411,10 +39559,10 @@ index 777503e..7130061 100644
  
  /* ---------------------------------------------------------------------- */
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 7fb92a9..cff3ca3 100644
+index 5db265e7d35a..8895cd2343e3 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -1882,6 +1882,10 @@ struct super_operations {
+@@ -1937,6 +1937,10 @@ struct super_operations {
                                  struct shrink_control *);
        long (*free_cached_objects)(struct super_block *,
                                    struct shrink_control *);
This page took 0.269614 seconds and 4 git commands to generate.