commit 504659fe105863e185c2d1e37e56f0a2e192a13e
Author: Jan RÄ™korajski <[email protected]>
Date:   Sun Feb 28 12:32:55 2016 +0100

    - aufs security fixes: 
https://sourceforge.net/p/aufs/mailman/message/34864744/
    - rel 2

 kernel-aufs4.patch | 714 +++++++++++++++++++++++++++++++----------------------
 kernel.spec        |   2 +-
 2 files changed, 420 insertions(+), 296 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 19b5bf4..a7c6957 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -69,7 +69,7 @@
 %define                have_pcmcia     0
 %endif
 
-%define                rel             1
+%define                rel             2
 %define                basever         4.1
 %define                postver         .18
 
diff --git a/kernel-aufs4.patch b/kernel-aufs4.patch
index 3eb634b..48b2543 100644
--- a/kernel-aufs4.patch
+++ b/kernel-aufs4.patch
@@ -1,4 +1,4 @@
-aufs4.1.13+ kbuild patch
+aufs4.1 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
 index 011f433..b1083f6 100644
@@ -33,7 +33,7 @@ index 1a0006a..ddad01a 100644
  header-y += auto_fs4.h
  header-y += auto_fs.h
  header-y += auxvec.h
-aufs4.1.13+ base patch
+aufs4.1 base patch
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index d8afd29..feac5ea 100644
@@ -60,10 +60,10 @@ index d8afd29..feac5ea 100644
  M:    Miguel Ojeda Sandonis <[email protected]>
  W:    http://miguelojeda.es/auxdisplay.htm
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index cef6fa8..a5b343d 100644
+index d7173cb..0160952 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -538,6 +538,24 @@ static inline int is_loop_device(struct file *file)
+@@ -540,6 +540,24 @@ static inline int is_loop_device(struct file *file)
        return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
  }
  
@@ -89,10 +89,10 @@ index cef6fa8..a5b343d 100644
  
  static ssize_t loop_attr_show(struct device *dev, char *page,
 diff --git a/fs/dcache.c b/fs/dcache.c
-index 0046ab7..23bdfa1 100644
+index 37b5afd..bc261e2 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -1167,7 +1167,7 @@ enum d_walk_ret {
+@@ -1164,7 +1164,7 @@ enum d_walk_ret {
   *
   * The @enter() and @finish() callbacks are called with d_lock held.
   */
@@ -175,10 +175,10 @@ index f87d308..9a290b3 100644
  static inline void fput_light(struct file *file, int fput_needed)
  {
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index fdc369f..da37e51 100644
+index 35ec87e..3229f97 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -1663,6 +1663,12 @@ ssize_t rw_copy_check_uvector(int type, const struct 
iovec __user * uvector,
+@@ -1649,6 +1649,12 @@ ssize_t rw_copy_check_uvector(int type, const struct 
iovec __user * uvector,
                              struct iovec *fast_pointer,
                              struct iovec **ret_pointer);
  
@@ -206,7 +206,7 @@ index da2751d..2e0fca6 100644
 +                       struct pipe_inode_info *pipe, size_t len,
 +                       unsigned int flags);
  #endif
-aufs4.1.13+ mmap patch
+aufs4.1 mmap patch
 
 diff --git a/fs/buffer.c b/fs/buffer.c
 index c7a5602..8c50a22 100644
@@ -292,10 +292,10 @@ index 599ec2e..1740207 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 b208558..bda1930 100644
+index 0755b9f..2ee5500 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -1200,6 +1200,28 @@ static inline int fixup_user_fault(struct task_struct 
*tsk,
+@@ -1172,6 +1172,28 @@ static inline int fixup_user_fault(struct task_struct 
*tsk,
  }
  #endif
  
@@ -325,10 +325,10 @@ index b208558..bda1930 100644
  extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
                void *buf, int len, int write);
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index c0c6b33..e65090c 100644
+index 8d37e26..ce89d4c 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -232,6 +232,7 @@ struct vm_region {
+@@ -241,6 +241,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 */
@@ -336,7 +336,7 @@ index c0c6b33..e65090c 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
-@@ -296,6 +297,7 @@ struct vm_area_struct {
+@@ -305,6 +306,7 @@ struct vm_area_struct {
        unsigned long vm_pgoff;         /* Offset (within vm_file) in PAGE_SIZE
                                           units, *not* PAGE_CACHE_SIZE */
        struct file * vm_file;          /* File we map to (can be NULL). */
@@ -345,7 +345,7 @@ index c0c6b33..e65090c 100644
  
  #ifndef CONFIG_MMU
 diff --git a/kernel/fork.c b/kernel/fork.c
-index 8209fa2..7c655e8 100644
+index 03c1eaa..7e215ba 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
 @@ -456,7 +456,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct 
*oldmm)
@@ -371,7 +371,7 @@ index 98c4eae..3f0c9b9 100644
  obj-y += init-mm.o
  
 diff --git a/mm/filemap.c b/mm/filemap.c
-index 1ffef05..13a1981 100644
+index 6bf5e42..a863d0f 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
 @@ -2062,7 +2062,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, 
struct vm_fault *vmf)
@@ -384,7 +384,7 @@ index 1ffef05..13a1981 100644
        if (page->mapping != inode->i_mapping) {
                unlock_page(page);
 diff --git a/mm/memory.c b/mm/memory.c
-index 2a9e098..2a8d5ec 100644
+index 22e037e..62096a2 100644
 --- a/mm/memory.c
 +++ b/mm/memory.c
 @@ -2034,7 +2034,7 @@ static inline int wp_page_reuse(struct mm_struct *mm,
@@ -612,13 +612,13 @@ index 0000000..b323b8a
 +              fput(pr);
 +}
 +#endif /* !CONFIG_MMU */
-aufs4.1.13+ standalone patch
+aufs4.1 standalone patch
 
 diff --git a/fs/dcache.c b/fs/dcache.c
-index 23bdfa1..7e3ccfa 100644
+index bc261e2..8d7951d 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -1272,6 +1272,7 @@ rename_retry:
+@@ -1269,6 +1269,7 @@ rename_retry:
        seq = 1;
        goto again;
  }
@@ -627,7 +627,7 @@ index 23bdfa1..7e3ccfa 100644
  /*
   * Search for at least 1 mount point in the dentry's subdirs.
 diff --git a/fs/file_table.c b/fs/file_table.c
-index 294174d..3cea027 100644
+index 294174d..a3c818d 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -147,6 +147,7 @@ over:
@@ -638,7 +638,23 @@ index 294174d..3cea027 100644
  
  /**
   * alloc_file - allocate and initialize a 'struct file'
-@@ -308,6 +309,7 @@ void put_filp(struct file *file)
+@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
+ {
+       delayed_fput(NULL);
+ }
++EXPORT_SYMBOL(flush_delayed_fput);
+ 
+ static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
+ 
+@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
+ }
+ 
+ EXPORT_SYMBOL(fput);
++EXPORT_SYMBOL(__fput_sync);
+ 
+ void put_filp(struct file *file)
+ {
+@@ -308,6 +311,7 @@ void put_filp(struct file *file)
                file_free(file);
        }
  }
@@ -647,7 +663,7 @@ index 294174d..3cea027 100644
  void __init files_init(unsigned long mempages)
  { 
 diff --git a/fs/inode.c b/fs/inode.c
-index 6e342ca..59a6409 100644
+index ea37cd1..58f5f58 100644
 --- a/fs/inode.c
 +++ b/fs/inode.c
 @@ -58,6 +58,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
@@ -659,7 +675,7 @@ index 6e342ca..59a6409 100644
  /*
   * Empty aops. Can be used for the cases where the user does not
 diff --git a/fs/namespace.c b/fs/namespace.c
-index fce3cc1..777b481 100644
+index 1b9e111..d45b81b 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -670,7 +686,7 @@ index fce3cc1..777b481 100644
  
  /**
   * mnt_drop_write - give up write access to a mount
-@@ -1792,6 +1793,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), 
void *arg,
+@@ -1768,6 +1769,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), 
void *arg,
        }
        return 0;
  }
@@ -715,7 +731,7 @@ index d16b62c..06ca6bc 100644
  int fsnotify_fasync(int fd, struct file *file, int on)
  {
 diff --git a/fs/notify/mark.c b/fs/notify/mark.c
-index 39ddcaf..39a838a 100644
+index 92e48c7..d2c4b68 100644
 --- a/fs/notify/mark.c
 +++ b/fs/notify/mark.c
 @@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
@@ -742,7 +758,7 @@ index 39ddcaf..39a838a 100644
  
  int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group 
*group,
                      struct inode *inode, struct vfsmount *mnt, int allow_dups)
-@@ -475,6 +478,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
+@@ -455,6 +458,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
        atomic_set(&mark->refcnt, 1);
        mark->free_mark = free_mark;
  }
@@ -751,7 +767,7 @@ index 39ddcaf..39a838a 100644
  static int fsnotify_mark_destroy(void *ignored)
  {
 diff --git a/fs/open.c b/fs/open.c
-index f9d2bf9..268ea92 100644
+index 98e5a52..a94e2e7 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, 
unsigned int time_attrs,
@@ -769,7 +785,7 @@ index f9d2bf9..268ea92 100644
 +EXPORT_SYMBOL(open_check_o_direct);
  
  static int do_dentry_open(struct file *f,
-                         struct inode *inode,
+                         int (*open)(struct inode *, struct file *),
 diff --git a/fs/read_write.c b/fs/read_write.c
 index fd0414e..8ace6ec 100644
 --- a/fs/read_write.c
@@ -822,6 +838,15 @@ index 4ef6985..6bb6303 100644
  
  /* Compare an extended attribute value with the given value */
  int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
+diff --git a/kernel/task_work.c b/kernel/task_work.c
+index 8727032..7003e5a 100644
+--- a/kernel/task_work.c
++++ b/kernel/task_work.c
+@@ -126,3 +126,4 @@ void task_work_run(void)
+               } while (work);
+       }
+ }
++EXPORT_SYMBOL(task_work_run);
 diff --git a/security/commoncap.c b/security/commoncap.c
 index f2875cd..ebf06ec 100644
 --- a/security/commoncap.c
@@ -944,7 +969,7 @@ index 8e9b1f4..c1c7cd1 100644
  {
 diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 
linux/Documentation/ABI/testing/debugfs-aufs
 --- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs    1970-01-01 
01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/debugfs-aufs       2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/ABI/testing/debugfs-aufs       2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,50 @@
 +What:         /debug/aufs/si_<id>/
 +Date:         March 2009
@@ -998,7 +1023,7 @@ diff -urN 
/usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Document
 +              will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 
linux/Documentation/ABI/testing/sysfs-aufs
 --- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs      1970-01-01 
01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2016-01-13 20:11:11.663093444 
+0100
++++ linux/Documentation/ABI/testing/sysfs-aufs 2016-02-28 11:26:44.736895402 
+0100
 @@ -0,0 +1,31 @@
 +What:         /sys/fs/aufs/si_<id>/
 +Date:         March 2009
@@ -1033,10 +1058,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    2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt    2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,170 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -1207,10 +1232,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   2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt   2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,258 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -1469,10 +1494,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      
2016-01-13 20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt      
2016-02-28 11:26:44.736895402 +0100
 @@ -0,0 +1,85 @@
 +
-+# Copyright (C) 2015 Junjiro R. Okajima
++# Copyright (C) 2015-2016 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
@@ -1558,10 +1583,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   2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt   2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,113 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -1675,10 +1700,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   2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt   2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,74 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -1753,10 +1778,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       
2016-01-13 20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt       
2016-02-28 11:26:44.736895402 +0100
 @@ -0,0 +1,64 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -1821,10 +1846,10 @@ diff -urN 
/usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
 +  copyup policy.
 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     2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt     2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,120 @@
 +
-+# Copyright (C) 2011-2015 Junjiro R. Okajima
++# Copyright (C) 2011-2016 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
@@ -1945,10 +1970,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     2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt     2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,72 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -2021,10 +2046,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    2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt    2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,96 @@
 +
-+# Copyright (C) 2014-2015 Junjiro R. Okajima
++# Copyright (C) 2014-2016 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
@@ -2121,10 +2146,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   2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt   2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,58 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -2183,10 +2208,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     2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt     2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,52 @@
 +
-+# Copyright (C) 2005-2015 Junjiro R. Okajima
++# Copyright (C) 2005-2016 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
@@ -2239,10 +2264,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    2016-01-13 
20:11:11.663093444 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt    2016-02-28 
11:26:44.736895402 +0100
 @@ -0,0 +1,47 @@
 +
-+# Copyright (C) 2010-2015 Junjiro R. Okajima
++# Copyright (C) 2010-2016 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
@@ -2290,8 +2315,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        2016-01-13 
20:11:11.663093444 +0100
-@@ -0,0 +1,390 @@
++++ linux/Documentation/filesystems/aufs/README        2016-02-28 
11:26:44.736895402 +0100
+@@ -0,0 +1,391 @@
 +
 +Aufs4 -- advanced multi layered unification filesystem version 4.x
 +http://aufs.sf.net
@@ -2665,6 +2690,7 @@ diff -urN 
/usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +James B made a donation (2014/7 and 2015/7).
 +Stefano Di Biase made a donation (2014/8).
 +Daniel Epellei made a donation (2015/1).
++OmegaPhil made a donation (2016/1).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -2684,10 +2710,10 @@ 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       2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/aufs.h       2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,59 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -2747,10 +2773,10 @@ 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     2016-01-31 21:55:05.413097911 +0100
++++ linux/fs/aufs/branch.c     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,1408 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -4159,10 +4185,10 @@ 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     2016-01-31 21:55:05.413097911 +0100
++++ linux/fs/aufs/branch.h     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,279 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -4442,7 +4468,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h 
linux/fs/aufs/branch.h
 +#endif /* __AUFS_BRANCH_H__ */
 diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 --- /usr/share/empty/fs/aufs/conf.mk   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/conf.mk      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/conf.mk      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,38 @@
 +
 +AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -4484,10 +4510,10 @@ 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       2016-01-13 20:11:11.666426853 +0100
-@@ -0,0 +1,1319 @@
++++ linux/fs/aufs/cpup.c       2016-02-28 11:26:44.740228806 +0100
+@@ -0,0 +1,1379 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -4509,6 +4535,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +
 +#include <linux/fs_stack.h>
 +#include <linux/mm.h>
++#include <linux/task_work.h>
 +#include "aufs.h"
 +
 +void au_cpup_attr_flags(struct inode *dst, unsigned int iflags)
@@ -4881,6 +4908,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +              }
 +      };
 +      struct super_block *sb;
++      struct task_struct *tsk = current;
 +
 +      /* bsrc branch can be ro/rw. */
 +      sb = cpg->dentry->d_sb;
@@ -4898,7 +4926,21 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +      IMustLock(d_inode(file[SRC].dentry));
 +      err = au_copy_file(file[DST].file, file[SRC].file, cpg->len);
 +
-+      fput(file[DST].file);
++      /* i wonder if we had O_NO_DELAY_FPUT flag */
++      if (tsk->flags & PF_KTHREAD)
++              __fput_sync(file[DST].file);
++      else {
++              WARN(1, "%pD\nPlease report this warning to aufs-users ML",
++                   file[DST].file);
++              fput(file[DST].file);
++              /*
++               * too bad.
++               * we have to call both since we don't know which place the file
++               * was added to.
++               */
++              task_work_run();
++              flush_delayed_fput();
++      }
 +      au_sbr_put(sb, file[DST].bindex);
 +
 +out_src:
@@ -4997,6 +5039,57 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +      return err;
 +}
 +
++/*
++ * regardless 'acl' option, reset all ACL.
++ * All ACL will be copied up later from the original entry on the lower 
branch.
++ */
++static int au_reset_acl(struct inode *h_dir, struct path *h_path, umode_t 
mode)
++{
++      int err;
++      struct dentry *h_dentry;
++      struct inode *h_inode;
++
++      h_dentry = h_path->dentry;
++      h_inode = d_inode(h_dentry);
++      /* forget_all_cached_acls(h_inode)); */
++      err = vfsub_removexattr(h_dentry, XATTR_NAME_POSIX_ACL_ACCESS);
++      AuTraceErr(err);
++      if (err == -EOPNOTSUPP)
++              err = 0;
++      if (!err)
++              err = vfsub_acl_chmod(h_inode, mode);
++
++      AuTraceErr(err);
++      return err;
++}
++
++static int au_do_cpup_dir(struct au_cp_generic *cpg, struct dentry 
*dst_parent,
++                        struct inode *h_dir, struct path *h_path)
++{
++      int err;
++      struct inode *dir, *inode;
++
++      err = vfsub_removexattr(h_path->dentry, XATTR_NAME_POSIX_ACL_DEFAULT);
++      AuTraceErr(err);
++      if (err == -EOPNOTSUPP)
++              err = 0;
++      if (unlikely(err))
++              goto out;
++
++      /*
++       * strange behaviour from the users view,
++       * particularry setattr case
++       */
++      dir = d_inode(dst_parent);
++      if (au_ibstart(dir) == cpg->bdst)
++              au_cpup_attr_nlink(dir, /*force*/1);
++      inode = d_inode(cpg->dentry);
++      au_cpup_attr_nlink(inode, /*force*/1);
++
++out:
++      return err;
++}
++
 +static noinline_for_stack
 +int cpup_entry(struct au_cp_generic *cpg, struct dentry *dst_parent,
 +             struct au_cpup_reg_attr *h_src_attr)
@@ -5009,7 +5102,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +      struct au_dtime dt;
 +      struct path h_path;
 +      struct dentry *h_src, *h_dst, *h_parent;
-+      struct inode *h_inode, *h_dir, *dir, *inode;
++      struct inode *h_inode, *h_dir;
 +      struct super_block *sb;
 +
 +      /* bsrc branch can be ro/rw. */
@@ -5041,7 +5134,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +      switch (mode & S_IFMT) {
 +      case S_IFREG:
 +              isreg = 1;
-+              err = vfsub_create(h_dir, &h_path, mode | S_IWUSR,
++              err = vfsub_create(h_dir, &h_path, S_IRUSR | S_IWUSR,
 +                                 /*want_excl*/true);
 +              if (!err)
 +                      err = au_do_cpup_regular(cpg, h_src_attr);
@@ -5049,17 +5142,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +      case S_IFDIR:
 +              isdir = 1;
 +              err = vfsub_mkdir(h_dir, &h_path, mode);
-+              if (!err) {
-+                      /*
-+                       * strange behaviour from the users view,
-+                       * particularry setattr case
-+                       */
-+                      dir = d_inode(dst_parent);
-+                      if (au_ibstart(dir) == cpg->bdst)
-+                              au_cpup_attr_nlink(dir, /*force*/1);
-+                      inode = d_inode(cpg->dentry);
-+                      au_cpup_attr_nlink(inode, /*force*/1);
-+              }
++              if (!err)
++                      err = au_do_cpup_dir(cpg, dst_parent, h_dir, &h_path);
 +              break;
 +      case S_IFLNK:
 +              err = au_do_cpup_symlink(&h_path, h_src, h_dir);
@@ -5076,6 +5160,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c 
linux/fs/aufs/cpup.c
 +              AuIOErr("Unknown inode type 0%o\n", mode);
 +              err = -EIO;
 +      }
++      if (!err)
++              err = au_reset_acl(h_dir, &h_path, mode);
 +
 +      mnt_flags = au_mntflags(sb);
 +      if (!au_opt_test(mnt_flags, UDBA_NONE)
@@ -5807,10 +5893,10 @@ 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       2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/cpup.h       2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,94 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -5905,10 +5991,10 @@ 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    2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/dbgaufs.c    2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,432 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -6341,10 +6427,10 @@ 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    2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/dbgaufs.h    2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,48 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -6393,10 +6479,10 @@ 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      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/dcsub.c      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,224 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -6621,10 +6707,10 @@ 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      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/dcsub.h      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,136 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -6761,10 +6847,10 @@ 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      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/debug.c      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,438 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -7203,10 +7289,10 @@ 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      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/debug.h      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,225 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -7432,10 +7518,10 @@ 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     2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/dentry.c     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,1136 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -8572,10 +8658,10 @@ 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     2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/dentry.h     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,234 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -8810,10 +8896,10 @@ 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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/dinfo.c      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,550 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -9364,10 +9450,10 @@ 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        2016-01-13 20:11:11.669760262 +0100
-@@ -0,0 +1,753 @@
++++ linux/fs/aufs/dir.c        2016-02-28 11:26:44.740228806 +0100
+@@ -0,0 +1,758 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -9618,11 +9704,13 @@ diff -urN /usr/share/empty/fs/aufs/dir.c 
linux/fs/aufs/dir.c
 +      int err;
 +      aufs_bindex_t bindex, btail;
 +      struct dentry *dentry, *h_dentry;
++      struct vfsmount *mnt;
 +
 +      FiMustWriteLock(file);
 +      AuDebugOn(h_file);
 +
 +      err = 0;
++      mnt = file->f_path.mnt;
 +      dentry = file->f_path.dentry;
 +      file->f_version = d_inode(dentry)->i_version;
 +      bindex = au_dbstart(dentry);
@@ -9634,6 +9722,9 @@ diff -urN /usr/share/empty/fs/aufs/dir.c 
linux/fs/aufs/dir.c
 +              if (!h_dentry)
 +                      continue;
 +
++              err = vfsub_test_mntns(mnt, h_dentry->d_sb);
++              if (unlikely(err))
++                      break;
 +              h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0);
 +              if (IS_ERR(h_file)) {
 +                      err = PTR_ERR(h_file);
@@ -10121,10 +10212,10 @@ 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        2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/dir.h        2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,131 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -10256,10 +10347,10 @@ 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/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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/dynop.c      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,369 @@
 +/*
-+ * Copyright (C) 2010-2015 Junjiro R. Okajima
++ * Copyright (C) 2010-2016 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
@@ -10629,10 +10720,10 @@ 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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/dynop.h      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,74 @@
 +/*
-+ * Copyright (C) 2010-2015 Junjiro R. Okajima
++ * Copyright (C) 2010-2016 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
@@ -10707,10 +10798,10 @@ 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     2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/export.c     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,832 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -11321,7 +11412,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c 
linux/fs/aufs/export.c
 +      ino = decode_ino(fh + Fh_ino);
 +      /* it should never happen */
 +      if (unlikely(ino == AUFS_ROOT_INO))
-+              goto out;
++              goto out_unlock;
 +
 +      dir_ino = decode_ino(fh + Fh_dir_ino);
 +      dentry = decode_by_ino(sb, ino, dir_ino);
@@ -11543,10 +11634,10 @@ 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       2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/fhsm.c       2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,426 @@
 +/*
-+ * Copyright (C) 2011-2015 Junjiro R. Okajima
++ * Copyright (C) 2011-2016 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
@@ -11973,10 +12064,10 @@ 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       2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/file.c       2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,844 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -12821,10 +12912,10 @@ 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       2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/file.h       2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,291 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -13116,10 +13207,10 @@ 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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/finfo.c      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,156 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -13276,10 +13367,10 @@ 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       2016-01-13 20:11:11.669760262 +0100
-@@ -0,0 +1,738 @@
++++ linux/fs/aufs/f_op.c       2016-02-28 11:26:44.740228806 +0100
+@@ -0,0 +1,748 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -13309,7 +13400,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c 
linux/fs/aufs/f_op.c
 +{
 +      int err;
 +      aufs_bindex_t bindex;
-+      struct dentry *dentry;
++      struct dentry *dentry, *h_dentry;
 +      struct au_finfo *finfo;
 +      struct inode *h_inode;
 +
@@ -13322,10 +13413,19 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c 
linux/fs/aufs/f_op.c
 +      memset(&finfo->fi_htop, 0, sizeof(finfo->fi_htop));
 +      atomic_set(&finfo->fi_mmapped, 0);
 +      bindex = au_dbstart(dentry);
-+      if (!h_file)
++      if (!h_file) {
++              h_dentry = au_h_dptr(dentry, bindex);
++              err = vfsub_test_mntns(file->f_path.mnt, h_dentry->d_sb);
++              if (unlikely(err))
++                      goto out;
 +              h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0);
-+      else
++      } else {
++              h_dentry = h_file->f_path.dentry;
++              err = vfsub_test_mntns(file->f_path.mnt, h_dentry->d_sb);
++              if (unlikely(err))
++                      goto out;
 +              get_file(h_file);
++      }
 +      if (IS_ERR(h_file))
 +              err = PTR_ERR(h_file);
 +      else {
@@ -13343,6 +13443,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c 
linux/fs/aufs/f_op.c
 +              /* file->f_ra = h_file->f_ra; */
 +      }
 +
++out:
 +      return err;
 +}
 +
@@ -14018,10 +14119,10 @@ 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     2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/fstype.h     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,400 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -14422,10 +14523,10 @@ 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/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  2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/hfsnotify.c  2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,288 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -14714,10 +14815,10 @@ 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    2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/hfsplus.c    2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,56 @@
 +/*
-+ * Copyright (C) 2010-2015 Junjiro R. Okajima
++ * Copyright (C) 2010-2016 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
@@ -14774,10 +14875,10 @@ 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    2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/hnotify.c    2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,710 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -15488,10 +15589,10 @@ 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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/iinfo.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,277 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -15769,10 +15870,10 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c 
linux/fs/aufs/iinfo.c
 +}
 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      2016-01-24 20:34:04.746537160 +0100
++++ linux/fs/aufs/inode.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,527 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -16300,10 +16401,10 @@ 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      2016-01-24 20:34:04.746537160 +0100
++++ linux/fs/aufs/inode.h      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,685 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -16989,10 +17090,10 @@ 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      2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/ioctl.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,219 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -17212,10 +17313,10 @@ 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   2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/i_op_add.c   2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,932 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -18148,10 +18249,10 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c 
linux/fs/aufs/i_op_add.c
 +}
 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       2016-01-31 21:55:05.416431341 +0100
-@@ -0,0 +1,1449 @@
++++ linux/fs/aufs/i_op.c       2016-02-28 11:26:44.740228806 +0100
+@@ -0,0 +1,1455 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -19129,6 +19230,12 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c 
linux/fs/aufs/i_op.c
 +                      break;
 +              }
 +      }
++      /*
++       * regardless aufs 'acl' option setting.
++       * why don't all acl-aware fs call this func from their ->setattr()?
++       */
++      if (!err && (ia->ia_valid & ATTR_MODE))
++              err = vfsub_acl_chmod(a->h_inode, ia->ia_mode);
 +      if (!err)
 +              au_cpup_attr_changeable(inode);
 +
@@ -19601,10 +19708,10 @@ 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   2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/i_op_del.c   2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,510 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -20115,10 +20222,10 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c 
linux/fs/aufs/i_op_del.c
 +}
 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   2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/i_op_ren.c   2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,1015 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -21134,7 +21241,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c 
linux/fs/aufs/i_op_ren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 --- /usr/share/empty/fs/aufs/Kconfig   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Kconfig      2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/Kconfig      2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,185 @@
 +config AUFS_FS
 +      tristate "Aufs (Advanced multi layered unification filesystem) support"
@@ -21323,10 +21430,10 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig 
linux/fs/aufs/Kconfig
 +endif
 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       2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/loop.c       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,146 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -21473,10 +21580,10 @@ diff -urN /usr/share/empty/fs/aufs/loop.c 
linux/fs/aufs/loop.c
 +}
 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       2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/loop.h       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,52 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -21529,7 +21636,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.h 
linux/fs/aufs/loop.h
 +#endif /* __AUFS_LOOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
 --- /usr/share/empty/fs/aufs/magic.mk  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/magic.mk     2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/magic.mk     2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,30 @@
 +
 +# defined in ${srctree}/fs/fuse/inode.c
@@ -21563,7 +21670,7 @@ diff -urN /usr/share/empty/fs/aufs/magic.mk 
linux/fs/aufs/magic.mk
 +endif
 diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 --- /usr/share/empty/fs/aufs/Makefile  1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile     2016-01-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/Makefile     2016-02-28 11:26:44.740228806 +0100
 @@ -0,0 +1,44 @@
 +
 +include ${src}/magic.mk
@@ -21611,10 +21718,10 @@ 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     2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/module.c     2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,222 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -21725,7 +21832,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c 
linux/fs/aufs/module.c
 +module_param_named(brs, sysaufs_brs, int, S_IRUGO);
 +
 +/* this module parameter has no meaning when USER_NS is disabled */
-+static bool au_userns;
++bool au_userns;
 +MODULE_PARM_DESC(allow_userns, "allow unprivileged to mount under userns");
 +module_param_named(allow_userns, au_userns, bool, S_IRUGO);
 +
@@ -21837,10 +21944,10 @@ 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     2016-01-13 20:11:11.669760262 +0100
-@@ -0,0 +1,104 @@
++++ linux/fs/aufs/module.h     2016-02-28 11:26:44.743562210 +0100
+@@ -0,0 +1,105 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -21872,6 +21979,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h 
linux/fs/aufs/module.h
 +
 +/* module parameters */
 +extern int sysaufs_brs;
++extern bool au_userns;
 +
 +/* ---------------------------------------------------------------------- */
 +
@@ -21945,10 +22053,10 @@ 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     2016-01-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/mvdown.c     2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,703 @@
 +/*
-+ * Copyright (C) 2011-2015 Junjiro R. Okajima
++ * Copyright (C) 2011-2016 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
@@ -22652,10 +22760,10 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c 
linux/fs/aufs/mvdown.c
 +}
 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       2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/opts.c       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,1859 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -24515,10 +24623,10 @@ 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       2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/opts.h       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,211 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -24730,10 +24838,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/plink.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,528 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -25262,10 +25370,10 @@ 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       2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/poll.c       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,52 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -25318,10 +25426,10 @@ 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  2016-01-13 20:11:11.673093671 +0100
-@@ -0,0 +1,99 @@
++++ linux/fs/aufs/posix_acl.c  2016-02-28 11:26:44.743562210 +0100
+@@ -0,0 +1,98 @@
 +/*
-+ * Copyright (C) 2014-2015 Junjiro R. Okajima
++ * Copyright (C) 2014-2016 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
@@ -25342,7 +25450,6 @@ diff -urN /usr/share/empty/fs/aufs/posix_acl.c 
linux/fs/aufs/posix_acl.c
 + */
 +
 +#include <linux/fs.h>
-+#include <linux/posix_acl.h>
 +#include "aufs.h"
 +
 +struct posix_acl *aufs_get_acl(struct inode *inode, int type)
@@ -25421,10 +25528,10 @@ 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     2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/procfs.c     2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,169 @@
 +/*
-+ * Copyright (C) 2010-2015 Junjiro R. Okajima
++ * Copyright (C) 2010-2016 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
@@ -25594,10 +25701,10 @@ 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        2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/rdu.c        2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,388 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -25986,10 +26093,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/rwsem.h      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,191 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -26181,10 +26288,10 @@ 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     2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/sbinfo.c     2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,362 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -26547,10 +26654,10 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c 
linux/fs/aufs/sbinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
 --- /usr/share/empty/fs/aufs/spl.h     1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/spl.h        2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/spl.h        2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,111 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -26662,10 +26769,10 @@ diff -urN /usr/share/empty/fs/aufs/spl.h 
linux/fs/aufs/spl.h
 +#endif /* __AUFS_SPL_H__ */
 diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 --- /usr/share/empty/fs/aufs/super.c   1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c      2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/super.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,1038 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -27704,10 +27811,10 @@ 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      2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/super.h      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,637 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -28345,10 +28452,10 @@ 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    2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/sysaufs.c    2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,104 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -28453,10 +28560,10 @@ 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    2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/sysaufs.h    2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,101 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -28558,10 +28665,10 @@ 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      2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/sysfs.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,376 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -28938,10 +29045,10 @@ 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      2016-01-31 21:55:05.416431341 +0100
++++ linux/fs/aufs/sysrq.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,157 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -29099,10 +29206,10 @@ 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       2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/vdir.c       2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,888 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -29991,10 +30098,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
-@@ -0,0 +1,848 @@
++++ linux/fs/aufs/vfsub.c      2016-02-28 11:26:44.743562210 +0100
+@@ -0,0 +1,866 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -30015,10 +30122,28 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c 
linux/fs/aufs/vfsub.c
 + */
 +
 +#include <linux/namei.h>
++#include <linux/nsproxy.h>
 +#include <linux/security.h>
 +#include <linux/splice.h>
++#include "../fs/mount.h"
 +#include "aufs.h"
 +
++#ifdef CONFIG_AUFS_BR_FUSE
++int vfsub_test_mntns(struct vfsmount *mnt, struct super_block *h_sb)
++{
++      struct nsproxy *ns;
++
++      if (!au_test_fuse(h_sb) || !au_userns)
++              return 0;
++
++      ns = current->nsproxy;
++      /* no {get,put}_nsproxy(ns) */
++      return real_mount(mnt)->mnt_ns == ns->mnt_ns ? 0 : -EACCES;
++}
++#endif
++
++/* ---------------------------------------------------------------------- */
++
 +int vfsub_update_h_iattr(struct path *h_path, int *did)
 +{
 +      int err;
@@ -30843,10 +30968,10 @@ 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      2016-01-31 21:55:05.416431341 +0100
-@@ -0,0 +1,286 @@
++++ linux/fs/aufs/vfsub.h      2016-02-28 11:26:44.743562210 +0100
+@@ -0,0 +1,307 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -30873,6 +30998,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h 
linux/fs/aufs/vfsub.h
 +
 +#include <linux/fs.h>
 +#include <linux/mount.h>
++#include <linux/posix_acl.h>
 +#include <linux/xattr.h>
 +#include "debug.h"
 +
@@ -30924,6 +31050,12 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h 
linux/fs/aufs/vfsub.h
 +              || IS_IMMUTABLE(inode);
 +}
 +
++#ifdef CONFIG_AUFS_BR_FUSE
++int vfsub_test_mntns(struct vfsmount *mnt, struct super_block *h_sb);
++#else
++AuStubInt0(vfsub_test_mntns, struct vfsmount *mnt, struct super_block *h_sb);
++#endif
++
 +/* ---------------------------------------------------------------------- */
 +
 +int vfsub_update_h_iattr(struct path *h_path, int *did);
@@ -31061,6 +31193,20 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h 
linux/fs/aufs/vfsub.h
 +      /* no vfsub_update_h_iattr() since we don't have struct path */
 +}
 +
++#ifdef CONFIG_FS_POSIX_ACL
++static inline int vfsub_acl_chmod(struct inode *h_inode, umode_t h_mode)
++{
++      int err;
++
++      err = posix_acl_chmod(h_inode, h_mode);
++      if (err == -EOPNOTSUPP)
++              err = 0;
++      return err;
++}
++#else
++AuStubInt0(vfsub_acl_chmod, struct inode *h_inode, umode_t h_mode);
++#endif
++
 +long vfsub_splice_to(struct file *in, loff_t *ppos,
 +                   struct pipe_inode_info *pipe, size_t len,
 +                   unsigned int flags);
@@ -31133,10 +31279,10 @@ 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 2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/wbr_policy.c 2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,765 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -31902,10 +32048,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/whout.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,1060 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -32966,10 +33112,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/whout.h      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,85 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -33055,10 +33201,10 @@ 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        2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/wkq.c        2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,213 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -33272,10 +33418,10 @@ 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        2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/wkq.h        2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,91 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -33367,10 +33513,10 @@ 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      2016-01-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/xattr.c      2016-02-28 11:26:44.743562210 +0100
 @@ -0,0 +1,344 @@
 +/*
-+ * Copyright (C) 2014-2015 Junjiro R. Okajima
++ * Copyright (C) 2014-2016 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
@@ -33715,10 +33861,10 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c 
linux/fs/aufs/xattr.c
 +#endif
 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       2016-01-13 20:11:11.673093671 +0100
-@@ -0,0 +1,1318 @@
++++ linux/fs/aufs/xino.c       2016-02-28 11:26:44.746895614 +0100
+@@ -0,0 +1,1296 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -33772,9 +33918,6 @@ diff -urN /usr/share/empty/fs/aufs/xino.c 
linux/fs/aufs/xino.c
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void 
*buf,
-+                             size_t size, loff_t *pos);
-+
 +static ssize_t do_xino_fwrite(vfs_writef_t func, struct file *file, void 
*kbuf,
 +                            size_t size, loff_t *pos)
 +{
@@ -33784,26 +33927,14 @@ diff -urN /usr/share/empty/fs/aufs/xino.c 
linux/fs/aufs/xino.c
 +              void *k;
 +              const char __user *u;
 +      } buf;
-+      int i;
-+      const int prevent_endless = 10;
 +
-+      i = 0;
 +      buf.k = kbuf;
 +      oldfs = get_fs();
 +      set_fs(KERNEL_DS);
 +      do {
++              /* todo: signal_pending? */
 +              err = func(file, buf.u, size, pos);
-+              if (err == -EINTR
-+                  && !au_wkq_test()
-+                  && fatal_signal_pending(current)) {
-+                      set_fs(oldfs);
-+                      err = xino_fwrite_wkq(func, file, kbuf, size, pos);
-+                      BUG_ON(err == -EINTR);
-+                      oldfs = get_fs();
-+                      set_fs(KERNEL_DS);
-+              }
-+      } while (i++ < prevent_endless
-+               && (err == -EAGAIN || err == -EINTR));
++      } while (err == -EAGAIN || err == -EINTR);
 +      set_fs(oldfs);
 +
 +#if 0 /* reserved for future use */
@@ -33829,42 +33960,35 @@ diff -urN /usr/share/empty/fs/aufs/xino.c 
linux/fs/aufs/xino.c
 +      *a->errp = do_xino_fwrite(a->func, a->file, a->buf, a->size, a->pos);
 +}
 +
-+static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void 
*buf,
-+                             size_t size, loff_t *pos)
-+{
-+      ssize_t err;
-+      int wkq_err;
-+      struct do_xino_fwrite_args args = {
-+              .errp   = &err,
-+              .func   = func,
-+              .file   = file,
-+              .buf    = buf,
-+              .size   = size,
-+              .pos    = pos
-+      };
-+
-+      /*
-+       * it breaks RLIMIT_FSIZE and normal user's limit,
-+       * users should care about quota and real 'filesystem full.'
-+       */
-+      wkq_err = au_wkq_wait(call_do_xino_fwrite, &args);
-+      if (unlikely(wkq_err))
-+              err = wkq_err;
-+
-+      return err;
-+}
-+
 +ssize_t xino_fwrite(vfs_writef_t func, struct file *file, void *buf,
 +                  size_t size, loff_t *pos)
 +{
 +      ssize_t err;
 +
++      /* todo: signal block and no wkq? */
 +      if (rlimit(RLIMIT_FSIZE) == RLIM_INFINITY) {
 +              lockdep_off();
 +              err = do_xino_fwrite(func, file, buf, size, pos);
 +              lockdep_on();
-+      } else
-+              err = xino_fwrite_wkq(func, file, buf, size, pos);
++      } else {
++              /*
++               * it breaks RLIMIT_FSIZE and normal user's limit,
++               * users should care about quota and real 'filesystem full.'
++               */
++              int wkq_err;
++              struct do_xino_fwrite_args args = {
++                      .errp   = &err,
++                      .func   = func,
++                      .file   = file,
++                      .buf    = buf,
++                      .size   = size,
++                      .pos    = pos
++              };
++
++              wkq_err = au_wkq_wait(call_do_xino_fwrite, &args);
++              if (unlikely(wkq_err))
++                      err = wkq_err;
++      }
 +
 +      return err;
 +}
@@ -35037,10 +35161,10 @@ 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       2016-01-31 21:55:05.416431341 
+0100
++++ linux/include/uapi/linux/aufs_type.h       2016-02-28 11:26:44.746895614 
+0100
 @@ -0,0 +1,419 @@
 +/*
-+ * Copyright (C) 2005-2015 Junjiro R. Okajima
++ * Copyright (C) 2005-2016 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
@@ -35080,7 +35204,7 @@ diff -urN 
/usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION  "4.1.13+-20160118"
++#define AUFS_VERSION  "4.1-20160223"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC      ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -35458,13 +35582,13 @@ diff -urN 
/usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +#define AUFS_CTL_FHSM_FD      _IOW(AuCtlType, AuCtl_FHSM_FD, int)
 +
 +#endif /* __AUFS_TYPE_H__ */
-aufs4.1.13+ loopback patch
+aufs4.1 loopback patch
 
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index a5b343d..d697561 100644
+index 0160952..866f8e2 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
-@@ -417,7 +417,7 @@ static int do_req_filebacked(struct loop_device *lo, 
struct request *rq)
+@@ -419,7 +419,7 @@ static int do_req_filebacked(struct loop_device *lo, 
struct request *rq)
  }
  
  struct switch_request {
@@ -35473,7 +35597,7 @@ index a5b343d..d697561 100644
        struct completion wait;
  };
  
-@@ -437,6 +437,7 @@ static void do_loop_switch(struct loop_device *lo, struct 
switch_request *p)
+@@ -439,6 +439,7 @@ static void do_loop_switch(struct loop_device *lo, struct 
switch_request *p)
        mapping = file->f_mapping;
        mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
        lo->lo_backing_file = file;
@@ -35481,7 +35605,7 @@ index a5b343d..d697561 100644
        lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
                mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
        lo->old_gfp_mask = mapping_gfp_mask(mapping);
-@@ -448,11 +449,13 @@ static void do_loop_switch(struct loop_device *lo, 
struct switch_request *p)
+@@ -450,11 +451,13 @@ static void do_loop_switch(struct loop_device *lo, 
struct switch_request *p)
   * First it needs to flush existing IO, it does this by sending a magic
   * BIO down the pipe. The completion of this BIO does the actual switch.
   */
@@ -35496,7 +35620,7 @@ index a5b343d..d697561 100644
  
        /* freeze queue and wait for completion of scheduled requests */
        blk_mq_freeze_queue(lo->lo_queue);
-@@ -471,7 +474,16 @@ static int loop_switch(struct loop_device *lo, struct 
file *file)
+@@ -473,7 +476,16 @@ static int loop_switch(struct loop_device *lo, struct 
file *file)
   */
  static int loop_flush(struct loop_device *lo)
  {
@@ -35514,7 +35638,7 @@ index a5b343d..d697561 100644
  }
  
  /*
-@@ -486,6 +498,7 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
+@@ -488,6 +500,7 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
                          unsigned int arg)
  {
        struct file     *file, *old_file;
@@ -35522,7 +35646,7 @@ index a5b343d..d697561 100644
        struct inode    *inode;
        int             error;
  
-@@ -502,9 +515,16 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
+@@ -504,9 +517,16 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
        file = fget(arg);
        if (!file)
                goto out;
@@ -35539,7 +35663,7 @@ index a5b343d..d697561 100644
  
        error = -EINVAL;
  
-@@ -516,17 +536,21 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
+@@ -518,17 +538,21 @@ static int loop_change_fd(struct loop_device *lo, struct 
block_device *bdev,
                goto out_putf;
  
        /* and ... switch */
@@ -35562,7 +35686,7 @@ index a5b343d..d697561 100644
   out:
        return error;
  }
-@@ -687,7 +711,7 @@ static void loop_config_discard(struct loop_device *lo)
+@@ -689,7 +713,7 @@ static void loop_config_discard(struct loop_device *lo)
  static int loop_set_fd(struct loop_device *lo, fmode_t mode,
                       struct block_device *bdev, unsigned int arg)
  {
@@ -35571,7 +35695,7 @@ index a5b343d..d697561 100644
        struct inode    *inode;
        struct address_space *mapping;
        unsigned lo_blocksize;
-@@ -702,6 +726,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t 
mode,
+@@ -704,6 +728,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t 
mode,
        file = fget(arg);
        if (!file)
                goto out;
@@ -35584,7 +35708,7 @@ index a5b343d..d697561 100644
  
        error = -EBUSY;
        if (lo->lo_state != Lo_unbound)
-@@ -756,6 +786,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t 
mode,
+@@ -752,6 +782,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;
@@ -35592,7 +35716,7 @@ index a5b343d..d697561 100644
        lo->transfer = NULL;
        lo->ioctl = NULL;
        lo->lo_sizelimit = 0;
-@@ -787,6 +818,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t 
mode,
+@@ -783,6 +814,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t 
mode,
  
   out_putf:
        fput(file);
@@ -35601,7 +35725,7 @@ index a5b343d..d697561 100644
   out:
        /* This is safe: open() is still holding a reference. */
        module_put(THIS_MODULE);
-@@ -833,6 +866,7 @@ loop_init_xfer(struct loop_device *lo, struct 
loop_func_table *xfer,
+@@ -829,6 +862,7 @@ loop_init_xfer(struct loop_device *lo, struct 
loop_func_table *xfer,
  static int loop_clr_fd(struct loop_device *lo)
  {
        struct file *filp = lo->lo_backing_file;
@@ -35609,7 +35733,7 @@ index a5b343d..d697561 100644
        gfp_t gfp = lo->old_gfp_mask;
        struct block_device *bdev = lo->lo_device;
  
-@@ -861,6 +895,7 @@ static int loop_clr_fd(struct loop_device *lo)
+@@ -857,6 +891,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;
@@ -35617,7 +35741,7 @@ index a5b343d..d697561 100644
        spin_unlock_irq(&lo->lo_lock);
  
        loop_release_xfer(lo);
-@@ -904,6 +939,8 @@ static int loop_clr_fd(struct loop_device *lo)
+@@ -898,6 +933,8 @@ static int loop_clr_fd(struct loop_device *lo)
         * bd_mutex which is usually taken before lo_ctl_mutex.
         */
        fput(filp);
@@ -35627,7 +35751,7 @@ index a5b343d..d697561 100644
  }
  
 diff --git a/drivers/block/loop.h b/drivers/block/loop.h
-index 49564ed..83a7860 100644
+index 301c27f..df84aa0 100644
 --- a/drivers/block/loop.h
 +++ b/drivers/block/loop.h
 @@ -46,7 +46,7 @@ struct loop_device {
@@ -35640,10 +35764,10 @@ index 49564ed..83a7860 100644
        unsigned        lo_blocksize;
        void            *key_data; 
 diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
-index 91c2ce7..d4ee5a7 100644
+index 2baacd7..22bcb89 100644
 --- a/fs/aufs/f_op.c
 +++ b/fs/aufs/f_op.c
-@@ -389,7 +389,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t 
*ppos,
+@@ -399,7 +399,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t 
*ppos,
        if (IS_ERR(h_file))
                goto out;
  
@@ -35653,7 +35777,7 @@ index 91c2ce7..d4ee5a7 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 f324758..4555e7b 100644
+index 5711e7a..9df5d16 100644
 --- a/fs/aufs/loop.c
 +++ b/fs/aufs/loop.c
 @@ -131,3 +131,19 @@ void au_loopback_fin(void)
@@ -35677,7 +35801,7 @@ index f324758..4555e7b 100644
 +      return f;
 +}
 diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
-index 6d9864d..3322557 100644
+index 48bf070..66afec7 100644
 --- a/fs/aufs/loop.h
 +++ b/fs/aufs/loop.h
 @@ -25,7 +25,11 @@ void au_warn_loopback(struct super_block *h_sb);
@@ -35702,7 +35826,7 @@ index 6d9864d..3322557 100644
  
  #endif /* __KERNEL__ */
 diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index 7ded31a..3ab5291 100644
+index 575e1d9..07b72a1 100644
 --- a/fs/aufs/super.c
 +++ b/fs/aufs/super.c
 @@ -831,7 +831,10 @@ static const struct super_operations aufs_sop = {
@@ -35718,10 +35842,10 @@ index 7ded31a..3ab5291 100644
  
  /* ---------------------------------------------------------------------- */
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index da37e51..10ee750 100644
+index 3229f97..f63cc0d 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
-@@ -1710,6 +1710,10 @@ struct super_operations {
+@@ -1696,6 +1696,10 @@ struct super_operations {
                                  struct shrink_control *);
        long (*free_cached_objects)(struct super_block *,
                                    struct shrink_control *);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/504659fe105863e185c2d1e37e56f0a2e192a13e


_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to