[packages/kernel] - up to 4.4.3 - aufs security fixes: https://sourceforge.net/p/aufs/mailman/message/34864744/
baggins
baggins at pld-linux.org
Sun Feb 28 12:23:56 CET 2016
commit 8cdd506658fabb22c3d6a06eb6782d22cc7dbb55
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Feb 28 12:22:46 2016 +0100
- up to 4.4.3
- aufs security fixes: https://sourceforge.net/p/aufs/mailman/message/34864744/
kernel-aufs4.patch | 554 ++++++++++++++++++++++++++++++-----------------
kernel-small_fixes.patch | 163 --------------
kernel.spec | 4 +-
3 files changed, 352 insertions(+), 369 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index b4bd6d4..98d55ae 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -71,7 +71,7 @@
%define rel 1
%define basever 4.4
-%define postver .2
+%define postver .3
# define this to '-%{basever}' for longterm branch
%define versuffix %{nil}
@@ -120,7 +120,7 @@ Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
# Source0-md5: 9a78fa2eb6c68ca5a40ed5af08142599
%if "%{postver}" != ".0"
Patch0: http://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: abdfe599a4ea827f9975cf0631148e70
+# Patch0-md5: 078427483ee96f3e072e7b5409b5a117
%endif
Source1: kernel.sysconfig
diff --git a/kernel-aufs4.patch b/kernel-aufs4.patch
index 5897ca7..e9aae06 100644
--- a/kernel-aufs4.patch
+++ b/kernel-aufs4.patch
@@ -626,7 +626,7 @@ index b06623a..b9206c5 100644
#ifdef CONFIG_USELIB
/*
diff --git a/fs/file_table.c b/fs/file_table.c
-index ad17e05..df66450 100644
+index ad17e05..38e046a 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -147,6 +147,7 @@ over:
@@ -637,7 +637,23 @@ index ad17e05..df66450 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);
}
}
@@ -809,6 +825,15 @@ index 9b932b9..44c457a 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 53fa971..f80d564 100644
+--- a/kernel/task_work.c
++++ b/kernel/task_work.c
+@@ -118,3 +118,4 @@ void task_work_run(void)
+ } while (work);
+ }
+ }
++EXPORT_SYMBOL(task_work_run);
diff --git a/security/commoncap.c b/security/commoncap.c
index 1832cf7..987ff5f 100644
--- a/security/commoncap.c
@@ -934,7 +959,7 @@ index 46f405c..54488b0 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:32.569971135 +0100
@@ -0,0 +1,50 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
@@ -988,7 +1013,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:32.569971135 +0100
@@ -0,0 +1,31 @@
+What: /sys/fs/aufs/si_<id>/
+Date: March 2009
@@ -1023,10 +1048,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:32.569971135 +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
@@ -1197,10 +1222,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:32.569971135 +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
@@ -1459,10 +1484,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:32.569971135 +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
@@ -1548,10 +1573,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:32.569971135 +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
@@ -1665,10 +1690,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:32.569971135 +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
@@ -1743,10 +1768,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:32.569971135 +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
@@ -1811,10 +1836,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:32.569971135 +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
@@ -1935,10 +1960,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:32.569971135 +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
@@ -2011,10 +2036,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:32.569971135 +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
@@ -2111,10 +2136,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:32.569971135 +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
@@ -2173,10 +2198,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:32.569971135 +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
@@ -2229,10 +2254,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:32.569971135 +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
@@ -2280,8 +2305,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:32.569971135 +0100
+@@ -0,0 +1,391 @@
+
+Aufs4 -- advanced multi layered unification filesystem version 4.x
+http://aufs.sf.net
@@ -2655,6 +2680,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
@@ -2674,10 +2700,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:32.569971135 +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
@@ -2737,10 +2763,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-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/branch.c 2016-02-28 11:26:32.569971135 +0100
@@ -0,0 +1,1407 @@
+/*
-+ * 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
@@ -4148,10 +4174,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-13 20:11:11.666426853 +0100
++++ linux/fs/aufs/branch.h 2016-02-28 11:26:32.569971135 +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
@@ -4431,7 +4457,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:32.569971135 +0100
@@ -0,0 +1,38 @@
+
+AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
@@ -4473,10 +4499,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:32.569971135 +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
@@ -4498,6 +4524,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)
@@ -4870,6 +4897,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;
@@ -4887,7 +4915,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:
@@ -4986,6 +5028,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)
@@ -4998,7 +5091,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. */
@@ -5030,7 +5123,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);
@@ -5038,17 +5131,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);
@@ -5065,6 +5149,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)
@@ -5796,10 +5882,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:32.569971135 +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
@@ -5894,10 +5980,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:32.569971135 +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
@@ -6330,10 +6416,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:32.569971135 +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
@@ -6382,10 +6468,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:32.569971135 +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
@@ -6610,10 +6696,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:32.569971135 +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
@@ -6750,10 +6836,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:32.569971135 +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
@@ -7192,10 +7278,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:32.569971135 +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
@@ -7421,10 +7507,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:32.569971135 +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
@@ -8561,10 +8647,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:32.569971135 +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
@@ -8799,10 +8885,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:32.569971135 +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
@@ -9353,10 +9439,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:32.569971135 +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
@@ -9607,11 +9693,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);
@@ -9623,6 +9711,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);
@@ -10110,10 +10201,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:32.569971135 +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
@@ -10245,10 +10336,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:32.569971135 +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
@@ -10618,10 +10709,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:32.569971135 +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
@@ -10696,10 +10787,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:32.569971135 +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
@@ -11310,7 +11401,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);
@@ -11532,10 +11623,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:32.573304539 +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
@@ -11962,10 +12053,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:32.573304539 +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
@@ -12810,10 +12901,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:32.573304539 +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
@@ -13105,10 +13196,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:32.573304539 +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
@@ -13265,10 +13356,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:32.569971135 +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
@@ -13298,7 +13389,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;
+
@@ -13311,10 +13402,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 {
@@ -13332,6 +13432,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;
+}
+
@@ -14007,10 +14108,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:32.573304539 +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
@@ -14411,10 +14512,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:32.573304539 +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
@@ -14703,10 +14804,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:32.573304539 +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
@@ -14763,10 +14864,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:32.573304539 +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
@@ -15477,10 +15578,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:32.573304539 +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
@@ -15758,10 +15859,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:32.573304539 +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
@@ -16289,10 +16390,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:32.573304539 +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
@@ -16978,10 +17079,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:32.573304539 +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
@@ -17201,10 +17302,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:32.573304539 +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
@@ -18137,10 +18238,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-13 20:11:11.669760262 +0100
-@@ -0,0 +1,1484 @@
++++ linux/fs/aufs/i_op.c 2016-02-28 11:26:32.573304539 +0100
+@@ -0,0 +1,1490 @@
+/*
-+ * 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
@@ -19117,6 +19218,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);
+
@@ -19625,10 +19732,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:32.573304539 +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
@@ -20139,10 +20246,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:32.573304539 +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
@@ -21158,7 +21265,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:32.569971135 +0100
@@ -0,0 +1,185 @@
+config AUFS_FS
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
@@ -21347,10 +21454,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:32.573304539 +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
@@ -21497,10 +21604,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:32.573304539 +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
@@ -21553,7 +21660,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:32.573304539 +0100
@@ -0,0 +1,30 @@
+
+# defined in ${srctree}/fs/fuse/inode.c
@@ -21587,7 +21694,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:32.569971135 +0100
@@ -0,0 +1,44 @@
+
+include ${src}/magic.mk
@@ -21635,10 +21742,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-13 20:11:11.669760262 +0100
++++ linux/fs/aufs/module.c 2016-02-28 11:26:32.573304539 +0100
@@ -0,0 +1,221 @@
+/*
-+ * 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
@@ -21748,7 +21855,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);
+
@@ -21860,10 +21967,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:32.573304539 +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
@@ -21895,6 +22002,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;
+
+/* ---------------------------------------------------------------------- */
+
@@ -21968,10 +22076,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:32.573304539 +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
@@ -22675,10 +22783,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:32.573304539 +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
@@ -24538,10 +24646,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:32.573304539 +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
@@ -24753,10 +24861,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:32.573304539 +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
@@ -25285,10 +25393,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:32.573304539 +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
@@ -25341,10 +25449,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:32.573304539 +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
@@ -25365,7 +25473,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)
@@ -25444,10 +25551,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:32.573304539 +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
@@ -25617,10 +25724,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:32.573304539 +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
@@ -26009,10 +26116,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:32.573304539 +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
@@ -26204,10 +26311,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-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/sbinfo.c 2016-02-28 11:26:32.573304539 +0100
@@ -0,0 +1,366 @@
+/*
-+ * 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
@@ -26574,10 +26681,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:32.573304539 +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
@@ -26689,10 +26796,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-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/super.c 2016-02-28 11:26:32.573304539 +0100
@@ -0,0 +1,1039 @@
+/*
-+ * 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
@@ -27732,10 +27839,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-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/super.h 2016-02-28 11:26:32.573304539 +0100
@@ -0,0 +1,641 @@
+/*
-+ * 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
@@ -28377,10 +28484,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:32.573304539 +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
@@ -28485,10 +28592,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:32.573304539 +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
@@ -28590,10 +28697,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-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/sysfs.c 2016-02-28 11:26:32.573304539 +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
@@ -28970,10 +29077,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-13 20:11:11.673093671 +0100
++++ linux/fs/aufs/sysrq.c 2016-02-28 11:26:32.573304539 +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
@@ -29131,10 +29238,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:32.573304539 +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
@@ -30023,10 +30130,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:32.573304539 +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
@@ -30047,10 +30154,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;
@@ -30875,10 +31000,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-13 20:11:11.673093671 +0100
-@@ -0,0 +1,287 @@
++++ linux/fs/aufs/vfsub.h 2016-02-28 11:26:32.576637942 +0100
+@@ -0,0 +1,308 @@
+/*
-+ * 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
@@ -30905,6 +31030,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"
+
@@ -30955,6 +31081,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);
@@ -31094,6 +31226,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);
@@ -31166,10 +31312,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:32.576637942 +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
@@ -31935,10 +32081,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:32.576637942 +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
@@ -32999,10 +33145,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:32.576637942 +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
@@ -33088,10 +33234,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:32.576637942 +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
@@ -33305,10 +33451,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:32.576637942 +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
@@ -33400,10 +33546,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:32.576637942 +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
@@ -33748,10 +33894,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
++++ linux/fs/aufs/xino.c 2016-02-28 11:26:32.576637942 +0100
@@ -0,0 +1,1318 @@
+/*
-+ * 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
@@ -35070,10 +35216,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-24 20:34:09.159976795 +0100
++++ linux/include/uapi/linux/aufs_type.h 2016-02-28 11:26:32.576637942 +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
@@ -35113,7 +35259,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
+
+#include <linux/limits.h>
+
-+#define AUFS_VERSION "4.4-20160118"
++#define AUFS_VERSION "4.4-20160223"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -35673,10 +35819,10 @@ index fb2237c..c3888c5 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;
@@ -35686,7 +35832,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)
@@ -35710,7 +35856,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);
@@ -35735,7 +35881,7 @@ index 6d9864d..3322557 100644
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index 98cfd64..a705a0e 100644
+index b41d789..51d2fb9 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -832,7 +832,10 @@ static const struct super_operations aufs_sop = {
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index 92cfb5e..1870865 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -29,132 +29,6 @@
From: Dave Chinner <dchinner at redhat.com>
-When we do inode readahead in log recovery, we do can do the
-readahead before we've replayed the icreate transaction that stamps
-the buffer with inode cores. The inode readahead verifier catches
-this and marks the buffer as !done to indicate that it doesn't yet
-contain valid inodes.
-
-In adding buffer error notification (i.e. setting b_error = -EIO at
-the same time as as we clear the done flag) to such a readahead
-verifier failure, we can then get subsequent inode recovery failing
-with this error:
-
-XFS (dm-0): metadata I/O error: block 0xa00060 ("xlog_recover_do..(read#2)") error 5 numblks 32
-
-This occurs when readahead completion races with icreate item replay
-such as:
-
- inode readahead
- find buffer
- lock buffer
- submit RA io
- ....
- icreate recovery
- xfs_trans_get_buffer
- find buffer
- lock buffer
- <blocks on RA completion>
- .....
- <ra completion>
- fails verifier
- clear XBF_DONE
- set bp->b_error = -EIO
- release and unlock buffer
- <icreate gains lock>
- icreate initialises buffer
- marks buffer as done
- adds buffer to delayed write queue
- releases buffer
-
-At this point, we have an initialised inode buffer that is up to
-date but has an -EIO state registered against it. When we finally
-get to recovering an inode in that buffer:
-
- inode item recovery
- xfs_trans_read_buffer
- find buffer
- lock buffer
- sees XBF_DONE is set, returns buffer
- sees bp->b_error is set
- fail log recovery!
-
-Essentially, we need xfs_trans_get_buf_map() to clear the error status of
-the buffer when doing a lookup. This function returns uninitialised
-buffers, so the buffer returned can not be in an error state and
-none of the code that uses this function expects b_error to be set
-on return. Indeed, there is an ASSERT(!bp->b_error); in the
-transaction case in xfs_trans_get_buf_map() that would have caught
-this if log recovery used transactions....
-
-This patch firstly changes the inode readahead failure to set -EIO
-on the buffer, and secondly changes xfs_buf_get_map() to never
-return a buffer with an error state set so this first change doesn't
-cause unexpected log recovery failures.
-
-Signed-off-by: Dave Chinner <dchinner at redhat.com>
----
- fs/xfs/libxfs/xfs_inode_buf.c | 12 +++++++-----
- fs/xfs/xfs_buf.c | 7 +++++++
- 2 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
-index 1b8d98a..ff17c48 100644
---- a/fs/xfs/libxfs/xfs_inode_buf.c
-+++ b/fs/xfs/libxfs/xfs_inode_buf.c
-@@ -62,11 +62,12 @@ xfs_inobp_check(
- * has not had the inode cores stamped into it. Hence for readahead, the buffer
- * may be potentially invalid.
- *
-- * If the readahead buffer is invalid, we don't want to mark it with an error,
-- * but we do want to clear the DONE status of the buffer so that a followup read
-- * will re-read it from disk. This will ensure that we don't get an unnecessary
-- * warnings during log recovery and we don't get unnecssary panics on debug
-- * kernels.
-+ * If the readahead buffer is invalid, we need to mark it with an error and
-+ * clear the DONE status of the buffer so that a followup read will re-read it
-+ * from disk. We don't report the error otherwise to avoid warnings during log
-+ * recovery and we don't get unnecssary panics on debug kernels. We use EIO here
-+ * because all we want to do is say readahead failed; there is no-one to report
-+ * the error to, so this will distinguish it from a non-ra verifier failure.
- */
- static void
- xfs_inode_buf_verify(
-@@ -93,6 +94,7 @@ xfs_inode_buf_verify(
- XFS_RANDOM_ITOBP_INOTOBP))) {
- if (readahead) {
- bp->b_flags &= ~XBF_DONE;
-+ xfs_buf_ioerror(bp, -EIO);
- return;
- }
-
-diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
-index 45a8ea7..ae86b16 100644
---- a/fs/xfs/xfs_buf.c
-+++ b/fs/xfs/xfs_buf.c
-@@ -604,6 +604,13 @@ found:
- }
- }
-
-+ /*
-+ * Clear b_error if this is a lookup from a caller that doesn't expect
-+ * valid data to be found in the buffer.
-+ */
-+ if (!(flags & XBF_READ))
-+ xfs_buf_ioerror(bp, 0);
-+
- XFS_STATS_INC(target->bt_mount, xb_get);
- trace_xfs_buf_get(bp, flags, _RET_IP_);
- return bp;
---
-2.5.0
-
-_______________________________________________
-xfs mailing list
-xfs at oss.sgi.com
-http://oss.sgi.com/mailman/listinfo/xfs
-From: Dave Chinner <dchinner at redhat.com>
-
When we do dquot readahead in log recovery, we do not use a verifier
as the underlying buffer may not have dquots in it. e.g. the
allocation operation hasn't yet been replayed. Hence we do not want
@@ -361,40 +235,3 @@ _______________________________________________
xfs mailing list
xfs at oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
-From david at fromorbit.com Tue Jan 12 23:12:48 2016
-From: david at fromorbit.com (Dave Chinner)
-Date: Wed, 13 Jan 2016 16:12:48 +1100
-Subject: [PATCH] Revert "xfs: clear PF_NOFREEZE for xfsaild kthread"
-Message-ID: <1452661968-11482-1-git-send-email-david at fromorbit.com>
-Content-Length: 916
-Lines: 30
-
-This reverts commit 24ba16bb3d499c49974669cd8429c3e4138ab102 as it
-prevents machines from suspending. This regression occurs when the
-xfsaild is idle on entry to suspend, and so there s no activity to
-wake it from it's idle sleep and hence see that it is supposed to
-freeze. Hence the freezer times out waiting for it and suspend is
-cancelled.
-
-There is no obvious fix for this short of freezing the filesystem
-properly, so revert this change for now.
-
-Signed-off-by: Dave Chinner <david at fromorbit.com>
----
- fs/xfs/xfs_trans_ail.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
-index aa67339..4f18fd9 100644
---- a/fs/xfs/xfs_trans_ail.c
-+++ b/fs/xfs/xfs_trans_ail.c
-@@ -497,7 +497,6 @@ xfsaild(
- long tout = 0; /* milliseconds */
-
- current->flags |= PF_MEMALLOC;
-- set_freezable();
-
- while (!kthread_should_stop()) {
- if (tout && tout <= 20)
---
-2.5.0
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/8cdd506658fabb22c3d6a06eb6782d22cc7dbb55
More information about the pld-cvs-commit
mailing list