[packages/kernel/LINUX_4_19] - 4.19.18

baggins baggins at pld-linux.org
Mon Jan 28 14:52:16 CET 2019


commit e49925d1d536503d560a8f3cbb7b137fe3e8eacf
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Jan 28 14:52:02 2019 +0100

    - 4.19.18

 kernel-aufs4.patch | 666 ++++++++++++++++++++++++++++++++---------------------
 kernel.spec        |   8 +-
 2 files changed, 411 insertions(+), 263 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 2bbf62a1..c0767cce 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -68,9 +68,9 @@
 %define		have_pcmcia	0
 %endif
 
-%define		rel		3
+%define		rel		1
 %define		basever		4.19
-%define		postver		.16
+%define		postver		.18
 
 # define this to '-%{basever}' for longterm branch
 %define		versuffix	-%{basever}
@@ -122,7 +122,7 @@ Source0:	https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
 # Source0-md5:	740a90cf810c2105df8ee12e5d0bb900
 %if "%{postver}" != ".0"
 Patch0:		https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5:	faa1c7284f57ca690ad021fa20a2a69a
+# Patch0-md5:	2a13b1d30bf27c126a8e91ad6e8a844d
 %endif
 Source1:	kernel.sysconfig
 
@@ -196,7 +196,7 @@ Patch101:	kernel-vserver-fixes.patch
 # Patch creation:
 # git clone git://github.com/sfjro/aufs4-standalone.git
 # cd aufs4-standalone
-# git checkout -b aufs4.17 origin/aufs4.17
+# git checkout -b aufs4.19 origin/aufs4.19
 # cat aufs4-kbuild.patch aufs4-base.patch aufs4-mmap.patch aufs4-standalone.patch > ~/rpm/packages/kernel/kernel-aufs4.patch
 # rm -rf linux && mkdir linux; cp -a Documentation fs include linux
 # diff -urN /usr/share/empty linux | filterdiff -x linux/include/uapi/linux/Kbuild >> ~/rpm/packages/kernel/kernel-aufs4.patch
diff --git a/kernel-aufs4.patch b/kernel-aufs4.patch
index a25984be..de9a1f2b 100644
--- a/kernel-aufs4.patch
+++ b/kernel-aufs4.patch
@@ -1,5 +1,5 @@
 SPDX-License-Identifier: GPL-2.0
-aufs4.x-rcN kbuild patch
+aufs4.19 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
 index ac474a6..284cee9 100644
@@ -23,10 +23,10 @@ index 293733f..12d19d0 100644
  obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 SPDX-License-Identifier: GPL-2.0
-aufs4.x-rcN base patch
+aufs4.19 base patch
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 6ac000c..16404bb 100644
+index b2f710e..d211619 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -2605,6 +2605,19 @@ F:	include/linux/audit.h
@@ -343,7 +343,7 @@ index dd13f86..fa6f559 100644
  #ifdef CONFIG_LOCK_STAT
  static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);
 SPDX-License-Identifier: GPL-2.0
-aufs4.x-rcN mmap patch
+aufs4.19 mmap patch
 
 diff --git a/fs/proc/base.c b/fs/proc/base.c
 index 7e9f07bf..3ab5901 100644
@@ -737,7 +737,7 @@ index 0000000..a27ac36
 +}
 +#endif /* !CONFIG_MMU */
 SPDX-License-Identifier: GPL-2.0
-aufs4.x-rcN standalone patch
+aufs4.19 standalone patch
 
 diff --git a/fs/dcache.c b/fs/dcache.c
 index 9f57bd8..328a136 100644
@@ -1158,7 +1158,7 @@ index 736e78d..b314539 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	2018-08-12 23:43:05.450124426 +0200
++++ linux/Documentation/ABI/testing/debugfs-aufs	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,55 @@
 +What:		/debug/aufs/si_<id>/
 +Date:		March 2009
@@ -1217,7 +1217,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	2017-07-29 12:14:25.893041746 +0200
++++ linux/Documentation/ABI/testing/sysfs-aufs	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,31 @@
 +What:		/sys/fs/aufs/si_<id>/
 +Date:		March 2009
@@ -1252,7 +1252,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +		will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/01intro.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,171 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -1427,7 +1427,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,258 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -1689,7 +1689,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +For this purpose, use "aumvdown" command in aufs-util.git.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,85 @@
 +
 +# Copyright (C) 2015-2018 Junjiro R. Okajima
@@ -1778,7 +1778,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.t
 +       be implemented in aufs, but not all I am afraid.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,113 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -1895,7 +1895,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +   by over-mounting something (or another method).
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/04branch.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,74 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -1973,7 +1973,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +    same named entry on the upper branch.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,64 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -2041,7 +2041,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
 +  copyup policy.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot linux/Documentation/filesystems/aufs/design/06dirren.dot
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.dot	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06dirren.dot	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,31 @@
 +
 +// to view this graph, run dot(1) command in GRAPHVIZ.
@@ -2076,7 +2076,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot li
 +}
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,102 @@
 +
 +# Copyright (C) 2017-2018 Junjiro R. Okajima
@@ -2182,7 +2182,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li
 +equivalen to udba=reval case.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,120 @@
 +
 +# Copyright (C) 2011-2018 Junjiro R. Okajima
@@ -2306,7 +2306,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linu
 +should restore the original file state after an error happens.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,72 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -2382,7 +2382,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +I have to give up this "looks-smater" approach.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,96 @@
 +
 +# Copyright (C) 2014-2018 Junjiro R. Okajima
@@ -2482,7 +2482,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt lin
 +now, aufs implements the branch attributes to ignore the error.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/07export.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,58 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -2544,7 +2544,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +  lookup_one_len(), vfs_getattr(), encode_fh() and others.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,52 @@
 +
 +# Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -2600,7 +2600,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +initramfs will use it to replace the old one at the next boot.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2018-04-15 08:49:13.394483860 +0200
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2019-01-28 14:36:12.215751270 +0100
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2010-2018 Junjiro R. Okajima
@@ -2651,8 +2651,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
 +regular files only.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
 --- /usr/share/empty/Documentation/filesystems/aufs/README	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README	2018-10-23 12:33:35.579375203 +0200
-@@ -0,0 +1,394 @@
++++ linux/Documentation/filesystems/aufs/README	2019-01-28 14:36:12.215751270 +0100
+@@ -0,0 +1,395 @@
 +
 +Aufs4 -- advanced multi layered unification filesystem version 4.x
 +http://aufs.sf.net
@@ -3030,6 +3030,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +Tomasz Szewczyk made a donation (2016/4).
 +James Burry made a donation (2016/12).
 +Carsten Rose made a donation (2018/9).
++Porteus Kiosk made a donation (2018/10).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -3049,7 +3050,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +# End: ;
 diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 --- /usr/share/empty/fs/aufs/aufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h	2018-10-23 12:33:35.592708932 +0200
++++ linux/fs/aufs/aufs.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,62 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -3115,7 +3116,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c	2018-10-23 12:33:35.592708932 +0200
++++ linux/fs/aufs/branch.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,1422 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -3172,7 +3173,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +
 +	if (br->br_fhsm) {
 +		au_br_fhsm_fin(br->br_fhsm);
-+		kfree(br->br_fhsm);
++		au_kfree_try_rcu(br->br_fhsm);
 +	}
 +
 +	key = br->br_dykey;
@@ -3187,12 +3188,12 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	lockdep_off();
 +	path_put(&br->br_path);
 +	lockdep_on();
-+	kfree(wbr);
++	au_kfree_rcu(wbr);
 +	au_lcnt_wait_for_fin(&br->br_nfiles);
 +	au_lcnt_wait_for_fin(&br->br_count);
 +	/* I don't know why, but percpu_refcount requires this */
 +	/* synchronize_rcu(); */
-+	kfree(br);
++	au_kfree_rcu(br);
 +}
 +
 +/*
@@ -3293,13 +3294,13 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +		return add_branch; /* success */
 +
 +out_wbr:
-+	kfree(add_branch->br_wbr);
++	au_kfree_rcu(add_branch->br_wbr);
 +out_hnotify:
 +	au_hnotify_fin_br(add_branch);
 +out_xino:
 +	au_xino_put(add_branch);
 +out_br:
-+	kfree(add_branch);
++	au_kfree_rcu(add_branch);
 +out:
 +	return ERR_PTR(err);
 +}
@@ -3465,7 +3466,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	br->br_perm = old_perm;
 +
 +	if (!err && wbr && !au_br_writable(new_perm)) {
-+		kfree(wbr);
++		au_kfree_rcu(wbr);
 +		br->br_wbr = NULL;
 +	}
 +
@@ -4492,7 +4493,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +		if (br->br_wbr) {
 +			err = au_wbr_init(br, sb, mod->perm);
 +			if (unlikely(err)) {
-+				kfree(br->br_wbr);
++				au_kfree_rcu(br->br_wbr);
 +				br->br_wbr = NULL;
 +			}
 +		}
@@ -4504,7 +4505,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +		if (!au_br_fhsm(mod->perm)) {
 +			/* fhsm --> non-fhsm */
 +			au_br_fhsm_fin(br->br_fhsm);
-+			kfree(br->br_fhsm);
++			au_kfree_rcu(br->br_fhsm);
 +			br->br_fhsm = NULL;
 +		}
 +	} else if (au_br_fhsm(mod->perm))
@@ -4516,7 +4517,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	goto out; /* success */
 +
 +out_bf:
-+	kfree(bf);
++	au_kfree_try_rcu(bf);
 +out:
 +	AuTraceErr(err);
 +	return err;
@@ -4541,8 +4542,8 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +}
 diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 --- /usr/share/empty/fs/aufs/branch.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h	2018-10-23 12:33:35.592708932 +0200
-@@ -0,0 +1,367 @@
++++ linux/fs/aufs/branch.h	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,365 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -4594,9 +4595,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +	} xi_nondir;
 +
 +	struct mutex		xi_mtx;	/* protects xi_file array */
-+	/* reserved for future use */
-+	/* wait_queue_head_t	xi_wq; */
-+	/* atomic_t		xi_pending; */
++	struct hlist_bl_head	xi_writing;
 +
 +	atomic_t		xi_truncating;
 +
@@ -4912,7 +4911,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	2018-06-04 09:08:09.181412645 +0200
++++ linux/fs/aufs/conf.mk	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,40 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -4956,8 +4955,8 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +-include ${srctree}/${src}/conf_priv.mk
 diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 --- /usr/share/empty/fs/aufs/cpup.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c	2018-10-23 12:33:35.596042364 +0200
-@@ -0,0 +1,1444 @@
++++ linux/fs/aufs/cpup.c	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,1448 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -5297,9 +5296,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	unsigned long blksize;
 +	unsigned char do_kfree;
 +	char *buf;
++	struct super_block *h_sb;
 +
 +	err = -ENOMEM;
-+	blksize = dst->f_path.dentry->d_sb->s_blocksize;
++	h_sb = file_inode(dst)->i_sb;
++	blksize = h_sb->s_blocksize;
 +	if (!blksize || PAGE_SIZE < blksize)
 +		blksize = PAGE_SIZE;
 +	AuDbg("blksize %lu\n", blksize);
@@ -5317,9 +5318,10 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	src->f_pos = 0;
 +	dst->f_pos = 0;
 +	err = au_do_copy_file(dst, src, len, buf, blksize);
-+	if (do_kfree)
-+		kfree(buf);
-+	else
++	if (do_kfree) {
++		AuDebugOn(!au_kfree_do_sz_test(blksize));
++		au_kfree_do_rcu(buf);
++	} else
 +		free_page((unsigned long)buf);
 +
 +out:
@@ -5393,18 +5395,15 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		struct dentry *dentry;
 +		int force_wr;
 +		struct file *file;
-+		void *label;
 +	} *f, file[] = {
 +		{
 +			.bindex = cpg->bsrc,
 +			.flags = O_RDONLY | O_NOATIME | O_LARGEFILE,
-+			.label = &&out
 +		},
 +		{
 +			.bindex = cpg->bdst,
 +			.flags = O_WRONLY | O_NOATIME | O_LARGEFILE,
 +			.force_wr = !!au_ftest_cpup(cpg->flags, RWDST),
-+			.label = &&out_src
 +		}
 +	};
 +	struct au_branch *br;
@@ -5419,9 +5418,13 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		f->dentry = au_h_dptr(cpg->dentry, f->bindex);
 +		f->file = au_h_open(cpg->dentry, f->bindex, f->flags,
 +				    /*file*/NULL, f->force_wr);
-+		err = PTR_ERR(f->file);
-+		if (IS_ERR(f->file))
-+			goto *f->label;
++		if (IS_ERR(f->file)) {
++			err = PTR_ERR(f->file);
++			if (i == SRC)
++				goto out;
++			else
++				goto out_src;
++		}
 +	}
 +
 +	/* try stopping to update while we copyup */
@@ -5911,7 +5914,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	}
 +out_parent:
 +	dput(dst_parent);
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	return err;
 +}
@@ -6404,7 +6407,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/cpup.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,100 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -6508,8 +6511,8 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +#endif /* __AUFS_CPUP_H__ */
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 --- /usr/share/empty/fs/aufs/dbgaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c	2018-10-23 12:33:35.596042364 +0200
-@@ -0,0 +1,519 @@
++++ linux/fs/aufs/dbgaufs.c	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,526 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -6554,7 +6557,14 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +static int dbgaufs_xi_release(struct inode *inode __maybe_unused,
 +			      struct file *file)
 +{
-+	kfree(file->private_data);
++	void *p;
++
++	p = file->private_data;
++	if (p) {
++		/* this is struct dbgaufs_arg */
++		AuDebugOn(!au_kfree_sz_test(p));
++		au_kfree_do_rcu(p);
++	}
 +	return 0;
 +}
 +
@@ -7031,7 +7041,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 --- /usr/share/empty/fs/aufs/dbgaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dbgaufs.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,53 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -7088,7 +7098,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dcsub.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,225 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -7145,7 +7155,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +	return 0; /* success */
 +
 +out_dpages:
-+	kfree(dpages->dpages);
++	au_kfree_try_rcu(dpages->dpages);
 +out:
 +	return err;
 +}
@@ -7158,7 +7168,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +	p = dpages->dpages;
 +	for (i = 0; i < dpages->ndpage; i++)
 +		au_dpage_free(p++);
-+	kfree(dpages->dpages);
++	au_kfree_try_rcu(dpages->dpages);
 +}
 +
 +static int au_dpages_append(struct au_dcsub_pages *dpages,
@@ -7317,7 +7327,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 --- /usr/share/empty/fs/aufs/dcsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dcsub.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,137 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -7458,7 +7468,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#endif /* __AUFS_DCSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 --- /usr/share/empty/fs/aufs/debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/debug.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,440 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -7798,7 +7808,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +	a->mnt.mnt_sb = sb;
 +	a->fake.br_path.mnt = &a->mnt;
 +	err = do_pri_br(-1, &a->fake);
-+	kfree(a);
++	au_kfree_rcu(a);
 +	dpri("dev 0x%x\n", sb->s_dev);
 +	if (err || !au_test_aufs(sb))
 +		return;
@@ -7902,7 +7912,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/debug.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,226 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -8132,7 +8142,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +#endif /* __AUFS_DEBUG_H__ */
 diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 --- /usr/share/empty/fs/aufs/dentry.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dentry.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,1153 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -8370,7 +8380,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +
 +out_parent:
 +	dput(parent);
-+	kfree(args.whname.name);
++	au_kfree_try_rcu(args.whname.name);
 +	if (dirren)
 +		au_dr_lkup_fin(&args);
 +out:
@@ -9289,8 +9299,8 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 --- /usr/share/empty/fs/aufs/dentry.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h	2018-08-12 23:43:05.453457863 +0200
-@@ -0,0 +1,267 @@
++++ linux/fs/aufs/dentry.h	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,268 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -9334,6 +9344,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +	aufs_bindex_t		di_btop, di_bbot, di_bwh, di_bdiropq;
 +	unsigned char		di_tmpfile; /* to allow the different name */
 +	struct au_hdentry	*di_hdentry;
++	struct rcu_head		rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -9560,7 +9571,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dinfo.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,554 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -9638,7 +9649,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +		while (bindex++ <= bbot)
 +			au_hdput(p++);
 +	}
-+	kfree(dinfo->di_hdentry);
++	au_kfree_try_rcu(dinfo->di_hdentry);
 +	au_cache_free_dinfo(dinfo);
 +}
 +
@@ -10118,7 +10129,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 --- /usr/share/empty/fs/aufs/dir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dir.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,762 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -10279,7 +10290,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +out:
 +	dput(a->dentry);
 +	au_nwt_done(&au_sbi(sb)->si_nowait);
-+	kfree(arg);
++	au_kfree_try_rcu(arg);
 +}
 +
 +void au_dir_ts(struct inode *dir, aufs_bindex_t bindex)
@@ -10315,7 +10326,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +	if (unlikely(wkq_err)) {
 +		pr_err("wkq %d\n", wkq_err);
 +		dput(dentry);
-+		kfree(arg);
++		au_kfree_try_rcu(arg);
 +	}
 +
 +out:
@@ -10434,7 +10445,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +		};
 +		err = au_do_open(file, &args);
 +		if (unlikely(err))
-+			kfree(fidir);
++			au_kfree_rcu(fidir);
 +	}
 +	si_read_unlock(sb);
 +	return err;
@@ -10470,7 +10481,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +				if (hf->hf_file)
 +					au_hfput(hf, /*execed*/0);
 +		}
-+		kfree(fidir);
++		au_kfree_rcu(fidir);
 +		finfo->fi_hdir = NULL;
 +	}
 +	au_finfo_fin(file);
@@ -10884,8 +10895,8 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 --- /usr/share/empty/fs/aufs/dir.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h	2018-08-12 23:43:05.453457863 +0200
-@@ -0,0 +1,132 @@
++++ linux/fs/aufs/dir.h	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,134 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -10932,6 +10943,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +struct au_vdir_dehstr {
 +	struct hlist_node	hash;
 +	struct au_vdir_destr	*str;
++	struct rcu_head		rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +struct au_vdir_de {
@@ -10969,7 +10981,8 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +
 +	u64		vd_version;
 +	unsigned int	vd_deblk_sz;
-+	unsigned long		vd_jiffy;
++	unsigned long	vd_jiffy;
++	struct rcu_head	rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -11020,7 +11033,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 --- /usr/share/empty/fs/aufs/dirren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dirren.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,1316 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -11142,7 +11155,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +		hbl = dr->dr_h_ino + i;
 +		/* no spinlock since sbinfo must be write-locked */
 +		hlist_bl_for_each_entry_safe(ent, pos, tmp, hbl, dr_hnode)
-+			kfree(ent);
++			au_kfree_rcu(ent);
 +		INIT_HLIST_BL_HEAD(hbl);
 +	}
 +}
@@ -11584,7 +11597,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	*ret = *drinfo;
 +	ssz = vfsub_read_k(file, (void *)ret->oldname, len, &pos);
 +	if (unlikely(ssz != len)) {
-+		kfree(ret);
++		au_kfree_rcu(ret);
 +		ret = ERR_PTR(-EIO);
 +		AuIOErr("ssz %zd, %u, %pD2\n", ssz, len, file);
 +		goto out;
@@ -11780,7 +11793,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +
 +static void au_drinfo_store_work_fin(struct au_drinfo_store *w)
 +{
-+	kfree(w->fdata);
++	au_kfree_rcu(w->fdata);
 +}
 +
 +static void au_drinfo_store_rev(struct au_drinfo_rev *rev,
@@ -11817,7 +11830,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +			       elm->info_last->oldname,
 +			       elm->info_last->oldnamelen);
 +			err = au_drinfo_store_sio(w, /*elm*/NULL);
-+			kfree(elm->info_last);
++			au_kfree_rcu(elm->info_last);
 +		}
 +		if (unlikely(err))
 +			AuIOErr("%d, %s\n", err, w->whname);
@@ -11893,7 +11906,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	if (unlikely(err)) {
 +		/* revert all drinfo */
 +		au_drinfo_store_rev(rev, &work);
-+		kfree(rev);
++		au_kfree_try_rcu(rev);
 +		*p = NULL;
 +	}
 +	au_hn_inode_unlock(hdir);
@@ -11949,7 +11962,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	/* revert */
 +	if (!already)
 +		au_dr_hino_del(dr, ent);
-+	kfree(ent);
++	au_kfree_rcu(ent);
 +
 +out:
 +	AuTraceErr(err);
@@ -11966,9 +11979,9 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	elm = rev->elm;
 +	for (nelm = rev->nelm; nelm > 0; nelm--, elm++) {
 +		dput(elm->info_dentry);
-+		kfree(elm->info_last);
++		au_kfree_rcu(elm->info_last);
 +	}
-+	kfree(rev);
++	au_kfree_try_rcu(rev);
 +}
 +
 +void au_dr_rename_rev(struct dentry *src, aufs_bindex_t btgt, void *_rev)
@@ -12000,10 +12013,10 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	ent = au_dr_hino_find(dr, h_inode->i_ino);
 +	BUG_ON(!ent);
 +	au_dr_hino_del(dr, ent);
-+	kfree(ent);
++	au_kfree_rcu(ent);
 +
 +out:
-+	kfree(rev);
++	au_kfree_try_rcu(rev);
 +	if (unlikely(err))
 +		pr_err("failed to remove dirren info\n");
 +}
@@ -12128,7 +12141,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	oldname.name = drinfo->oldname;
 +	if (au_qstreq(w->qname, &oldname)) {
 +		/* the name is renamed back */
-+		kfree(drinfo);
++		au_kfree_rcu(drinfo);
 +		drinfo = NULL;
 +
 +		infopath.dentry = info_dentry;
@@ -12143,7 +12156,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +		if (unlikely(e == -EWOULDBLOCK))
 +			iput(delegated);
 +	}
-+	kfree(w->drinfo[bindex]);
++	au_kfree_rcu(w->drinfo[bindex]);
 +	w->drinfo[bindex] = drinfo;
 +	dput(info_dentry);
 +
@@ -12159,8 +12172,8 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	struct au_drinfo **p = drinfo;
 +
 +	while (n-- > 0)
-+		kfree(*drinfo++);
-+	kfree(p);
++		au_kfree_rcu(*drinfo++);
++	au_kfree_try_rcu(p);
 +}
 +
 +int au_dr_lkup(struct au_do_lookup_args *lkup, struct dentry *dentry,
@@ -12213,7 +12226,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +		ent = au_dr_hino_find(&br->br_dirren, h_dir->i_ino);
 +		AuDebugOn(!ent);
 +		au_dr_hino_del(&br->br_dirren, ent);
-+		kfree(ent);
++		au_kfree_rcu(ent);
 +	}
 +	goto out; /* success */
 +
@@ -12244,7 +12257,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +	if (!drinfo)
 +		goto out;
 +
-+	kfree(lkup->whname.name);
++	au_kfree_try_rcu(lkup->whname.name);
 +	lkup->whname.name = NULL;
 +	lkup->dirren.dr_name.len = drinfo->oldnamelen;
 +	lkup->dirren.dr_name.name = drinfo->oldname;
@@ -12340,7 +12353,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 --- /usr/share/empty/fs/aufs/dirren.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.h	2018-08-12 23:43:05.453457863 +0200
++++ linux/fs/aufs/dirren.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,140 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -12484,7 +12497,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 +#endif /* __AUFS_DIRREN_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/dynop.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,370 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -12602,7 +12615,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +
 +	key = container_of(rcu, struct au_dykey, dk_rcu);
 +	DyPrSym(key);
-+	kfree(key);
++	au_kfree_rcu(key);
 +}
 +
 +static void dy_free(struct kref *kref)
@@ -12730,7 +12743,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +	p->set(key, op->dy_hop, au_br_sb(br));
 +	old = dy_gadd(hbl, key);
 +	if (old) {
-+		kfree(key);
++		au_kfree_rcu(key);
 +		key = old;
 +	}
 +
@@ -12858,7 +12871,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 --- /usr/share/empty/fs/aufs/dynop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h	2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/dynop.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,75 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -12937,7 +12950,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +#endif /* __AUFS_DYNOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 --- /usr/share/empty/fs/aufs/export.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/export.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,838 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -13779,7 +13792,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 --- /usr/share/empty/fs/aufs/fhsm.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/fhsm.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,427 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -14210,7 +14223,7 @@ diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/file.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,863 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -15077,8 +15090,8 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +};
 diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 --- /usr/share/empty/fs/aufs/file.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h	2018-08-12 23:43:05.456791299 +0200
-@@ -0,0 +1,341 @@
++++ linux/fs/aufs/file.h	2019-01-28 14:36:12.219084659 +0100
+@@ -0,0 +1,342 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -15147,6 +15160,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +
 +	struct hlist_bl_node	fi_hlist;
 +	struct file		*fi_file;	/* very ugly */
++	struct rcu_head		rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* ---------------------------------------------------------------------- */
@@ -15422,7 +15436,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#endif /* __AUFS_FILE_H__ */
 diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 --- /usr/share/empty/fs/aufs/finfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/finfo.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,149 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -15575,7 +15589,7 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 --- /usr/share/empty/fs/aufs/f_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/f_op.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,819 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -16398,7 +16412,7 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 --- /usr/share/empty/fs/aufs/fstype.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h	2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/fstype.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,401 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -16803,7 +16817,7 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 --- /usr/share/empty/fs/aufs/hbl.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hbl.h	2018-08-12 23:43:05.456791299 +0200
++++ linux/fs/aufs/hbl.h	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,65 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -16872,7 +16886,7 @@ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 +#endif /* __AUFS_HBL_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/hfsnotify.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,289 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -17032,7 +17046,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +	struct au_br_hfsnotify *hfsn = group->private;
 +
 +	/* AuDbg("here\n"); */
-+	kfree(hfsn);
++	au_kfree_try_rcu(hfsn);
 +}
 +
 +static int au_hfsn_handle_event(struct fsnotify_group *group,
@@ -17128,7 +17142,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +	goto out; /* success */
 +
 +out_hfsn:
-+	kfree(hfsn);
++	au_kfree_try_rcu(hfsn);
 +out:
 +	return err;
 +}
@@ -17165,7 +17179,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/hfsplus.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,60 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -17229,7 +17243,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 --- /usr/share/empty/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/hnotify.c	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,720 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -17774,7 +17788,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +	iput(a->dir);
 +	si_write_unlock(sb);
 +	au_nwt_done(&sbinfo->si_nowait);
-+	kfree(a);
++	au_kfree_rcu(a);
 +}
 +
 +/* ---------------------------------------------------------------------- */
@@ -17880,7 +17894,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +		iput(args->h_child_inode);
 +		iput(args->h_dir);
 +		iput(args->dir);
-+		kfree(args);
++		au_kfree_rcu(args);
 +	}
 +
 +out:
@@ -17953,7 +17967,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +}
 diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 --- /usr/share/empty/fs/aufs/iinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/iinfo.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,286 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -18238,12 +18252,12 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +			hi++;
 +		}
 +	}
-+	kfree(iinfo->ii_hinode);
++	au_kfree_rcu(iinfo->ii_hinode);
 +	AuRwDestroy(&iinfo->ii_rwsem);
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 --- /usr/share/empty/fs/aufs/inode.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/inode.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,528 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -18775,8 +18789,8 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 --- /usr/share/empty/fs/aufs/inode.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h	2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,696 @@
++++ linux/fs/aufs/inode.h	2019-01-28 14:36:12.222418047 +0100
+@@ -0,0 +1,698 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -18816,6 +18830,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +	struct fsnotify_mark		hn_mark;
 +#endif
 +	struct inode		*hn_aufs_inode;	/* no get/put */
++	struct rcu_head		rcu;
 +#endif
 +} ____cacheline_aligned_in_smp;
 +
@@ -18856,9 +18871,10 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +};
 +
 +struct au_icntnr {
-+	struct au_iinfo iinfo;
-+	struct inode vfs_inode;
-+	struct hlist_bl_node plink;
++	struct au_iinfo		iinfo;
++	struct inode		vfs_inode;
++	struct hlist_bl_node	plink;
++	struct rcu_head		rcu;
 +} ____cacheline_aligned_in_smp;
 +
 +/* au_pin flags */
@@ -19475,7 +19491,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/ioctl.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,220 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -19699,7 +19715,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 --- /usr/share/empty/fs/aufs/i_op_add.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/i_op_add.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,935 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -20063,7 +20079,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	if (!try_aopen)
 +		aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	return err;
 +}
@@ -20523,7 +20539,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	}
 +	aufs_read_and_write_unlock2(dentry, src_dentry);
 +out_kfree:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	AuTraceErr(err);
 +	return err;
@@ -20632,13 +20648,13 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	}
 +	aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	return err;
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 --- /usr/share/empty/fs/aufs/i_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c	2018-10-23 12:33:35.596042364 +0200
++++ linux/fs/aufs/i_op.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,1506 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -21698,7 +21714,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +out_si:
 +	si_read_unlock(sb);
 +out_kfree:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	AuTraceErr(err);
 +	return err;
@@ -21789,7 +21805,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +	di_write_unlock(dentry);
 +	si_read_unlock(sb);
 +out_kfree:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	AuTraceErr(err);
 +	return err;
@@ -22148,7 +22164,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 --- /usr/share/empty/fs/aufs/i_op_del.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/i_op_del.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,512 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -22547,7 +22563,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +out_unlock:
 +	aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	return err;
 +}
@@ -22657,14 +22673,14 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +out_unlock:
 +	aufs_read_unlock(dentry, AuLock_DW);
 +out_free:
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	AuTraceErr(err);
 +	return err;
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 --- /usr/share/empty/fs/aufs/i_op_ren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/i_op_ren.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,1249 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -23910,14 +23926,14 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +	iput(a->dst_inode);
 +	if (a->thargs)
 +		au_whtmp_rmdir_free(a->thargs);
-+	kfree(a);
++	au_kfree_rcu(a);
 +out:
 +	AuTraceErr(err);
 +	return err;
 +}
 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	2018-06-04 09:08:09.181412645 +0200
++++ linux/fs/aufs/Kconfig	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,199 @@
 +# SPDX-License-Identifier: GPL-2.0
 +config AUFS_FS
@@ -24120,7 +24136,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 --- /usr/share/empty/fs/aufs/lcnt.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/lcnt.h	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/lcnt.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,186 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -24310,7 +24326,7 @@ diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 +#endif /* __AUFS_LCNT_H__ */
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/loop.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,148 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -24458,11 +24474,11 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 +{
 +	if (backing_file_func)
 +		symbol_put(loop_backing_file);
-+	kfree(au_warn_loopback_array);
++	au_kfree_try_rcu(au_warn_loopback_array);
 +}
 diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 --- /usr/share/empty/fs/aufs/loop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/loop.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,53 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -24519,7 +24535,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	2018-06-04 09:08:09.188079511 +0200
++++ linux/fs/aufs/magic.mk	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,31 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -24554,7 +24570,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	2018-06-04 09:08:09.181412645 +0200
++++ linux/fs/aufs/Makefile	2019-01-28 14:36:12.219084659 +0100
 @@ -0,0 +1,46 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -24604,7 +24620,7 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
 diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 --- /usr/share/empty/fs/aufs/module.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/module.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,273 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -24643,7 +24659,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +	if (p) {
 +#if 0 /* unused */
 +		if (!new_sz) {
-+			kfree(p);
++			au_kfree_rcu(p);
 +			p = NULL;
 +			goto out;
 +		}
@@ -24667,7 +24683,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +		if (q) {
 +			if (p) {
 +				memcpy(q, p, new_sz);
-+				kfree(p);
++				au_kfree_try_rcu(p);
 +			}
 +			p = q;
 +		} else
@@ -24881,8 +24897,8 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +module_exit(aufs_exit);
 diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 --- /usr/share/empty/fs/aufs/module.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h	2018-08-12 23:43:05.460124736 +0200
-@@ -0,0 +1,102 @@
++++ linux/fs/aufs/module.h	2019-01-28 14:36:12.222418047 +0100
+@@ -0,0 +1,166 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -24911,6 +24927,11 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#ifdef __KERNEL__
 +
 +#include <linux/slab.h>
++#include "debug.h"
++#include "dentry.h"
++#include "dir.h"
++#include "file.h"
++#include "inode.h"
 +
 +struct path;
 +struct seq_file;
@@ -24927,6 +24948,53 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +void *au_kzrealloc(void *p, unsigned int nused, unsigned int new_sz, gfp_t gfp,
 +		   int may_shrink);
 +
++/*
++ * Comparing the size of the object with sizeof(struct rcu_head)
++ * case 1: object is always larger
++ *	--> au_kfree_rcu() or au_kfree_do_rcu()
++ * case 2: object is always smaller
++ *	--> au_kfree_small()
++ * case 3: object can be any size
++ *	--> au_kfree_try_rcu()
++ */
++
++static inline void au_kfree_do_rcu(const void *p)
++{
++	struct {
++		struct rcu_head rcu;
++	} *a = (void *)p;
++
++	kfree_rcu(a, rcu);
++}
++
++#define au_kfree_rcu(_p) do {						\
++		typeof(_p) p = (_p);					\
++		BUILD_BUG_ON(sizeof(*p) < sizeof(struct rcu_head));	\
++		if (p)							\
++			au_kfree_do_rcu(p);				\
++	} while (0)
++
++#define au_kfree_do_sz_test(sz)	(sz >= sizeof(struct rcu_head))
++#define au_kfree_sz_test(p)	(p && au_kfree_do_sz_test(ksize(p)))
++
++static inline void au_kfree_try_rcu(const void *p)
++{
++	if (!p)
++		return;
++	if (au_kfree_sz_test(p))
++		au_kfree_do_rcu(p);
++	else
++		kfree(p);
++}
++
++static inline void au_kfree_small(const void *p)
++{
++	if (!p)
++		return;
++	AuDebugOn(au_kfree_sz_test(p));
++	kfree(p);
++}
++
 +static inline int au_kmidx_sub(size_t sz, size_t new_sz)
 +{
 +#ifndef CONFIG_SLOB
@@ -24968,11 +25036,23 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +	kmem_cache_create(#type, sizeof(struct type), \
 +			  __alignof__(struct type), AuCacheFlags, ctor)
 +
-+#define AuCacheFuncs(name, index) \
-+static inline struct au_##name *au_cache_alloc_##name(void) \
-+{ return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \
-+static inline void au_cache_free_##name(struct au_##name *p) \
-+{ kmem_cache_free(au_cache[AuCache_##index], p); }
++#define AuCacheFuncs(name, index)					\
++	static inline struct au_##name *au_cache_alloc_##name(void)	\
++	{ return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \
++	static inline void au_cache_free_##name##_norcu(struct au_##name *p) \
++	{ kmem_cache_free(au_cache[AuCache_##index], p); }		\
++									\
++	static inline void au_cache_free_##name##_rcu_cb(struct rcu_head *rcu) \
++	{ void *p = rcu;						\
++		p -= offsetof(struct au_##name, rcu);			\
++		kmem_cache_free(au_cache[AuCache_##index], p); }	\
++	static inline void au_cache_free_##name##_rcu(struct au_##name *p) \
++	{ BUILD_BUG_ON(sizeof(struct au_##name) < sizeof(struct rcu_head)); \
++		call_rcu(&p->rcu, au_cache_free_##name##_rcu_cb); }	\
++									\
++	static inline void au_cache_free_##name(struct au_##name *p)	\
++	{ /* au_cache_free_##name##_norcu(p); */			\
++		au_cache_free_##name##_rcu(p); }
 +
 +AuCacheFuncs(dinfo, DINFO);
 +AuCacheFuncs(icntnr, ICNTNR);
@@ -24987,7 +25067,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/mvdown.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,705 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -25689,14 +25769,14 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +	e = copy_to_user(uarg, &args->mvdown, sizeof(args->mvdown));
 +	if (unlikely(e))
 +		err = -EFAULT;
-+	kfree(args);
++	au_kfree_rcu(args);
 +out:
 +	AuTraceErr(err);
 +	return err;
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 --- /usr/share/empty/fs/aufs/opts.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/opts.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,1877 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -26960,7 +27040,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +		}
 +	}
 +
-+	kfree(a);
++	au_kfree_rcu(a);
 +	dump_opts(opts);
 +	if (unlikely(err))
 +		au_opts_free(opts);
@@ -27390,7 +27470,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +		au_hn_inode_unlock(hdir);
 +
 +		if (!err && do_free) {
-+			kfree(wbr);
++			au_kfree_rcu(wbr);
 +			br->br_wbr = NULL;
 +		}
 +	}
@@ -27577,7 +27657,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 --- /usr/share/empty/fs/aufs/opts.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/opts.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,225 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -27806,7 +27886,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +#endif /* __AUFS_OPTS_H__ */
 diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 --- /usr/share/empty/fs/aufs/plink.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/plink.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,516 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -28326,7 +28406,7 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +}
 diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 --- /usr/share/empty/fs/aufs/poll.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/poll.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,51 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -28381,7 +28461,7 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 +}
 diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 --- /usr/share/empty/fs/aufs/posix_acl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/posix_acl.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/posix_acl.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,103 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -28488,7 +28568,7 @@ diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 +}
 diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 --- /usr/share/empty/fs/aufs/procfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c	2018-08-12 23:43:05.460124736 +0200
++++ linux/fs/aufs/procfs.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,171 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -28663,7 +28743,7 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 --- /usr/share/empty/fs/aufs/rdu.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/rdu.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,382 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -29049,7 +29129,7 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 --- /usr/share/empty/fs/aufs/rwsem.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/rwsem.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,73 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -29126,7 +29206,7 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#endif /* __AUFS_RWSEM_H__ */
 diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 --- /usr/share/empty/fs/aufs/sbinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/sbinfo.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,313 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -29176,13 +29256,13 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +	au_br_free(sbinfo);
 +	au_rw_write_unlock(&sbinfo->si_rwsem);
 +
-+	kfree(sbinfo->si_branch);
++	au_kfree_try_rcu(sbinfo->si_branch);
 +	mutex_destroy(&sbinfo->si_xib_mtx);
 +	AuRwDestroy(&sbinfo->si_rwsem);
 +
 +	au_lcnt_wait_for_fin(&sbinfo->si_ninodes);
 +	/* si_nfiles is waited too */
-+	kfree(sbinfo);
++	au_kfree_rcu(sbinfo);
 +}
 +
 +int au_si_alloc(struct super_block *sb)
@@ -29258,9 +29338,9 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +	return 0; /* success */
 +
 +out_br:
-+	kfree(sbinfo->si_branch);
++	au_kfree_try_rcu(sbinfo->si_branch);
 +out_sbinfo:
-+	kfree(sbinfo);
++	au_kfree_rcu(sbinfo);
 +out:
 +	return err;
 +}
@@ -29443,7 +29523,7 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 --- /usr/share/empty/fs/aufs/super.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/super.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,1048 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -30495,7 +30575,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +};
 diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 --- /usr/share/empty/fs/aufs/super.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/super.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,589 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -31088,7 +31168,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#endif /* __AUFS_SUPER_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 --- /usr/share/empty/fs/aufs/sysaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/sysaufs.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,93 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -31185,7 +31265,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 --- /usr/share/empty/fs/aufs/sysaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/sysaufs.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,102 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -31291,7 +31371,7 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#endif /* __SYSAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 --- /usr/share/empty/fs/aufs/sysfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/sysfs.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,373 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -31505,7 +31585,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +		if (unlikely(err == PAGE_SIZE))
 +			err = -EFBIG;
 +	}
-+	kfree(seq);
++	au_kfree_rcu(seq);
 +out_unlock:
 +	si_read_unlock(sb);
 +out:
@@ -31576,7 +31656,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +		err = -EFAULT;
 +
 +out_seq:
-+	kfree(seq);
++	au_kfree_rcu(seq);
 +out_buf:
 +	free_page((unsigned long)buf);
 +out:
@@ -31668,7 +31748,7 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 --- /usr/share/empty/fs/aufs/sysrq.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/sysrq.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,160 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -31832,7 +31912,7 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 --- /usr/share/empty/fs/aufs/vdir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/vdir.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,895 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -31947,7 +32027,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +	struct hlist_node *node;
 +
 +	hlist_for_each_entry_safe(pos, node, head, wh_hash)
-+		kfree(pos);
++		au_kfree_rcu(pos);
 +}
 +
 +static void au_nhash_de_do_free(struct hlist_head *head)
@@ -31974,7 +32054,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +		nhash_count(head);
 +		free(head++);
 +	}
-+	kfree(nhash->nh_head);
++	au_kfree_try_rcu(nhash->nh_head);
 +}
 +
 +void au_nhash_wh_free(struct au_nhash *whlist)
@@ -32193,8 +32273,8 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +
 +	deblk = vdir->vd_deblk;
 +	while (vdir->vd_nblk--)
-+		kfree(*deblk++);
-+	kfree(vdir->vd_deblk);
++		au_kfree_try_rcu(*deblk++);
++	au_kfree_try_rcu(vdir->vd_deblk);
 +	au_cache_free_vdir(vdir);
 +}
 +
@@ -32229,7 +32309,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +	if (!err)
 +		return vdir; /* success */
 +
-+	kfree(vdir->vd_deblk);
++	au_kfree_try_rcu(vdir->vd_deblk);
 +
 +out_free:
 +	au_cache_free_vdir(vdir);
@@ -32244,7 +32324,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +	union au_vdir_deblk_p p, deblk_end;
 +
 +	while (vdir->vd_nblk > 1) {
-+		kfree(vdir->vd_deblk[vdir->vd_nblk - 1]);
++		au_kfree_try_rcu(vdir->vd_deblk[vdir->vd_nblk - 1]);
 +		/* vdir->vd_deblk[vdir->vd_nblk - 1] = NULL; */
 +		vdir->vd_nblk--;
 +	}
@@ -32731,7 +32811,7 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 --- /usr/share/empty/fs/aufs/vfsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/vfsub.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,902 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -33637,7 +33717,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 --- /usr/share/empty/fs/aufs/vfsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/vfsub.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,355 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -33996,7 +34076,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#endif /* __AUFS_VFSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 --- /usr/share/empty/fs/aufs/wbr_policy.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/wbr_policy.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,830 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -34461,7 +34541,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +
 +	mfs->mfsrr_bytes = bavail;
 +	AuDbg("b%d\n", mfs->mfs_bindex);
-+	kfree(st);
++	au_kfree_rcu(st);
 +}
 +
 +static int au_wbr_create_mfs(struct dentry *dentry, unsigned int flags)
@@ -34830,7 +34910,7 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +};
 diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 --- /usr/share/empty/fs/aufs/whout.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/whout.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,1062 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -34997,7 +35077,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +
 +out_name:
 +	if (name != defname)
-+		kfree(name);
++		au_kfree_try_rcu(name);
 +out:
 +	AuTraceErrPtr(dentry);
 +	return dentry;
@@ -35437,7 +35517,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	au_lcnt_dec(&a->br->br_count);
 +	si_write_unlock(a->sb);
 +	au_nwt_done(&au_sbi(a->sb)->si_nowait);
-+	kfree(arg);
++	au_kfree_rcu(a);
 +	if (unlikely(err))
 +		AuIOErr("err %d\n", err);
 +}
@@ -35465,7 +35545,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +		if (unlikely(wkq_err)) {
 +			atomic_dec(&br->br_wbr->wbr_wh_running);
 +			au_lcnt_dec(&br->br_count);
-+			kfree(arg);
++			au_kfree_rcu(arg);
 +		}
 +		do_dec = 0;
 +	}
@@ -35624,7 +35704,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	wh_dentry = ERR_PTR(err);
 +	if (!err) {
 +		wh_dentry = vfsub_lkup_one(&wh_name, h_parent);
-+		kfree(wh_name.name);
++		au_kfree_try_rcu(wh_name.name);
 +	}
 +	return wh_dentry;
 +}
@@ -35742,7 +35822,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +		rdhash = AUFS_RDHASH_DEF;
 +	err = au_nhash_alloc(&whtmp->whlist, rdhash, gfp);
 +	if (unlikely(err)) {
-+		kfree(whtmp);
++		au_kfree_rcu(whtmp);
 +		whtmp = ERR_PTR(err);
 +	}
 +
@@ -35757,7 +35837,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	dput(whtmp->wh_dentry);
 +	iput(whtmp->dir);
 +	au_nhash_wh_free(&whtmp->whlist);
-+	kfree(whtmp);
++	au_kfree_rcu(whtmp);
 +}
 +
 +/*
@@ -35896,7 +35976,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +}
 diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 --- /usr/share/empty/fs/aufs/whout.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h	2018-08-12 23:43:05.463458173 +0200
++++ linux/fs/aufs/whout.h	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,86 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -35986,7 +36066,7 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +#endif /* __AUFS_WHOUT_H__ */
 diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 --- /usr/share/empty/fs/aufs/wkq.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/wkq.c	2019-01-28 14:36:12.222418047 +0100
 @@ -0,0 +1,392 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -36162,7 +36242,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +
 +static void au_wkq_lockdep_free(struct au_wkinfo *wkinfo)
 +{
-+	kfree(wkinfo->hlock);
++	au_kfree_try_rcu(wkinfo->hlock);
 +}
 +
 +static void au_wkq_lockdep_pre(struct au_wkinfo *wkinfo)
@@ -36214,7 +36294,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +	else {
 +		kobject_put(wkinfo->kobj);
 +		module_put(THIS_MODULE); /* todo: ?? */
-+		kfree(wkinfo);
++		au_kfree_rcu(wkinfo);
 +	}
 +}
 +
@@ -36237,7 +36317,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +
 +static void au_wkq_comp_free(struct completion *comp)
 +{
-+	kfree(comp);
++	au_kfree_rcu(comp);
 +}
 +
 +#else
@@ -36382,7 +36462,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 --- /usr/share/empty/fs/aufs/wkq.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h	2018-10-23 12:33:35.599375796 +0200
++++ linux/fs/aufs/wkq.h	2019-01-28 14:36:12.225751436 +0100
 @@ -0,0 +1,89 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -36475,7 +36555,7 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 +#endif /* __AUFS_WKQ_H__ */
 diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 --- /usr/share/empty/fs/aufs/xattr.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xattr.c	2018-08-12 23:43:05.466791610 +0200
++++ linux/fs/aufs/xattr.c	2019-01-28 14:36:12.225751436 +0100
 @@ -0,0 +1,356 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -36658,10 +36738,10 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 +		AuTraceErr(err);
 +	}
 +
-+	kfree(value);
++	au_kfree_try_rcu(value);
 +
 +out_free:
-+	kfree(o);
++	au_kfree_try_rcu(o);
 +out:
 +	if (!unlocked)
 +		inode_unlock_shared(h_isrc);
@@ -36835,8 +36915,8 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 +}
 diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 --- /usr/share/empty/fs/aufs/xino.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c	2018-10-23 12:33:35.599375796 +0200
-@@ -0,0 +1,1890 @@
++++ linux/fs/aufs/xino.c	2019-01-28 14:36:12.225751436 +0100
+@@ -0,0 +1,1956 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2018 Junjiro R. Okajima
@@ -37311,7 +37391,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +		au_sbi(sb)->si_xino_jiffy = jiffy;
 +
 +out_st:
-+	kfree(st);
++	au_kfree_rcu(st);
 +out:
 +	return err;
 +}
@@ -37348,7 +37428,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	au_lcnt_dec(&br->br_count);
 +	si_write_unlock(sb);
 +	au_nwt_done(&au_sbi(sb)->si_nowait);
-+	kfree(args);
++	au_kfree_rcu(args);
 +}
 +
 +/*
@@ -37420,7 +37500,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +
 +	pr_err("wkq %d\n", wkq_err);
 +	au_lcnt_dec(&br->br_count);
-+	kfree(args);
++	au_kfree_rcu(args);
 +
 +out:
 +	atomic_dec(&br->br_xino->xi_truncating);
@@ -37486,6 +37566,11 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	ino_t ino;
 +};
 +
++struct au_xi_writing {
++	struct hlist_bl_node node;
++	ino_t h_ino, ino;
++};
++
 +static int au_xino_do_write(vfs_writef_t write, struct file *file,
 +			    struct au_xi_calc *calc, ino_t ino);
 +
@@ -37497,6 +37582,9 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	struct au_sbinfo *sbi;
 +	struct inode *root;
 +	struct file *file;
++	struct au_xi_writing *del, *p;
++	struct hlist_bl_head *hbl;
++	struct hlist_bl_node *pos;
 +	int err;
 +
 +	br = a->br;
@@ -37506,20 +37594,39 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	root = d_inode(sb->s_root);
 +	ii_read_lock_child(root);
 +	err = au_xino_do_new_async(sb, br, &a->calc);
-+	if (!err) {
-+		file = au_xino_file(br->br_xino, a->calc.idx);
-+		if (file)
-+			err = au_xino_do_write(sbi->si_xwrite, file, &a->calc,
-+					       a->ino);
-+		if (unlikely(err))
-+			AuIOErr("err %d\n", err);
-+	} else
++	if (unlikely(err)) {
 +		AuIOErr("err %d\n", err);
++		goto out;
++	}
++
++	file = au_xino_file(br->br_xino, a->calc.idx);
++	AuDebugOn(!file);
++	err = au_xino_do_write(sbi->si_xwrite, file, &a->calc, a->ino);
++	if (unlikely(err)) {
++		AuIOErr("err %d\n", err);
++		goto out;
++	}
++
++	del = NULL;
++	hbl = &br->br_xino->xi_writing;
++	hlist_bl_lock(hbl);
++	au_hbl_for_each(pos, hbl) {
++		p = container_of(pos, struct au_xi_writing, node);
++		if (p->ino == a->ino) {
++			del = p;
++			hlist_bl_del(&p->node);
++			break;
++		}
++	}
++	hlist_bl_unlock(hbl);
++	au_kfree_rcu(del);
++
++out:
 +	au_lcnt_dec(&br->br_count);
 +	ii_read_unlock(root);
 +	si_read_unlock(sb);
 +	au_nwt_done(&sbi->si_nowait);
-+	kfree(args);
++	au_kfree_rcu(a);
 +}
 +
 +/*
@@ -37545,7 +37652,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	if (unlikely(err)) {
 +		pr_err("wkq %d\n", err);
 +		au_lcnt_dec(&br->br_count);
-+		kfree(arg);
++		au_kfree_rcu(arg);
 +	}
 +
 +out:
@@ -37564,6 +37671,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	struct au_xi_calc calc;
 +	struct au_sbinfo *sbinfo;
 +	struct file *file;
++	struct au_xino *xi;
++	struct hlist_bl_head *hbl;
++	struct hlist_bl_node *pos;
++	struct au_xi_writing *p;
 +
 +	*ino = 0;
 +	if (!au_opt_test(au_mntflags(sb), XINO))
@@ -37571,10 +37682,24 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +
 +	err = 0;
 +	au_xi_calc(sb, h_ino, &calc);
-+	file = au_xino_file(au_sbr(sb, bindex)->br_xino, calc.idx);
-+	if (!file
-+	    || vfsub_f_size_read(file) < calc.pos + sizeof(*ino))
-+		return 0; /* no ino */
++	xi = au_sbr(sb, bindex)->br_xino;
++	file = au_xino_file(xi, calc.idx);
++	if (!file) {
++		hbl = &xi->xi_writing;
++		hlist_bl_lock(hbl);
++		au_hbl_for_each(pos, hbl) {
++			p = container_of(pos, struct au_xi_writing, node);
++			if (p->h_ino == h_ino) {
++				AuDbg("hi%llu, i%llu, found\n",
++				      (u64)p->h_ino, (u64)p->ino);
++				*ino = p->ino;
++				break;
++			}
++		}
++		hlist_bl_unlock(hbl);
++		return 0;
++	} else if (vfsub_f_size_read(file) < calc.pos + sizeof(*ino))
++		return 0; /* no xino */
 +
 +	sbinfo = au_sbi(sb);
 +	sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &calc.pos);
@@ -37618,6 +37743,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	struct file *file;
 +	struct au_branch *br;
 +	struct au_xino *xi;
++	struct au_xi_writing *p;
 +
 +	SiMustAnyLock(sb);
 +
@@ -37630,6 +37756,12 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	xi = br->br_xino;
 +	file = au_xino_file(xi, calc.idx);
 +	if (!file) {
++		/* store the inum pair into the list */
++		p = kmalloc(sizeof(*p), GFP_NOFS | __GFP_NOFAIL);
++		p->h_ino = h_ino;
++		p->ino = ino;
++		au_hbl_add(&p->node, &xi->xi_writing);
++
 +		/* create and write a new xino file asynchronously */
 +		err = au_xino_new_async(sb, br, &calc, ino);
 +		if (!err)
@@ -38077,16 +38209,15 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	spin_lock_init(&xi->xi_nondir.spin);
 +	init_waitqueue_head(&xi->xi_nondir.wqh);
 +	mutex_init(&xi->xi_mtx);
-+	/* init_waitqueue_head(&xi->xi_wq); */
-+	/* atomic_set(&xi->xi_pending, 0); */
++	INIT_HLIST_BL_HEAD(&xi->xi_writing);
 +	atomic_set(&xi->xi_truncating, 0);
 +	kref_init(&xi->xi_kref);
 +	goto out; /* success */
 +
 +out_file:
-+	kfree(xi->xi_file);
++	au_kfree_try_rcu(xi->xi_file);
 +out_free:
-+	kfree(xi);
++	au_kfree_rcu(xi);
 +	xi = NULL;
 +out:
 +	return xi;
@@ -38118,6 +38249,10 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +{
 +	struct au_xino *xi;
 +	int i;
++	unsigned long ul;
++	struct hlist_bl_head *hbl;
++	struct hlist_bl_node *pos, *n;
++	struct au_xi_writing *p;
 +
 +	xi = container_of(kref, struct au_xino, xi_kref);
 +	for (i = 0; i < xi->xi_nfile; i++)
@@ -38126,9 +38261,20 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	for (i = xi->xi_nondir.total - 1; i >= 0; i--)
 +		AuDebugOn(xi->xi_nondir.array[i]);
 +	mutex_destroy(&xi->xi_mtx);
-+	kfree(xi->xi_file);
-+	kfree(xi->xi_nondir.array);
-+	kfree(xi);
++	hbl = &xi->xi_writing;
++	ul = au_hbl_count(hbl);
++	if (unlikely(ul)) {
++		pr_warn("xi_writing %lu\n", ul);
++		hlist_bl_lock(hbl);
++		hlist_bl_for_each_entry_safe (p, pos, n, hbl, node) {
++			hlist_bl_del(&p->node);
++			au_kfree_rcu(p);
++		}
++		hlist_bl_unlock(hbl);
++	}
++	au_kfree_try_rcu(xi->xi_file);
++	au_kfree_try_rcu(xi->xi_nondir.array);
++	au_kfree_rcu(xi);
 +}
 +
 +int au_xino_put(struct au_branch *br)
@@ -38729,7 +38875,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +}
 diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
 --- /usr/share/empty/include/uapi/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h	2018-10-23 12:33:35.602709228 +0200
++++ linux/include/uapi/linux/aufs_type.h	2019-01-28 14:36:12.225751436 +0100
 @@ -0,0 +1,448 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -38773,7 +38919,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#include <linux/limits.h>
 +
-+#define AUFS_VERSION	"4.x-rcN-20181022"
++#define AUFS_VERSION	"4.19-20181217"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -39180,7 +39326,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#endif /* __AUFS_TYPE_H__ */
 SPDX-License-Identifier: GPL-2.0
-aufs4.x-rcN loopback patch
+aufs4.19 loopback patch
 
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
 index 9e534a3..74cd74e 100644
@@ -39205,15 +39351,15 @@ index 9e534a3..74cd74e 100644
 @@ -690,6 +699,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
  			  unsigned int arg)
  {
- 	struct file	*file, *old_file;
+ 	struct file	*file = NULL, *old_file;
 +	struct file	*f, *virt_file = NULL, *old_virt_file;
  	int		error;
+ 	bool		partscan;
  
- 	error = -ENXIO;
 @@ -705,12 +715,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
  	file = fget(arg);
  	if (!file)
- 		goto out;
+ 		goto out_err;
 +	f = loop_real_file(file);
 +	if (f) {
 +		virt_file = file;
@@ -39223,7 +39369,7 @@ index 9e534a3..74cd74e 100644
  
  	error = loop_validate_file(file, bdev);
  	if (error)
- 		goto out_putf;
+ 		goto out_err;
  
  	old_file = lo->lo_backing_file;
 +	old_virt_file = lo->lo_backing_virt_file;
@@ -39238,23 +39384,25 @@ index 9e534a3..74cd74e 100644
  	lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
  	mapping_set_gfp_mask(file->f_mapping,
  			     lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
-@@ -729,12 +747,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
- 	blk_mq_unfreeze_queue(lo->lo_queue);
- 
+@@ -729,14 +747,18 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+ 	 * dependency.
+ 	 */
  	fput(old_file);
 +	if (old_virt_file)
 +		fput(old_virt_file);
- 	if (lo->lo_flags & LO_FLAGS_PARTSCAN)
+ 	if (partscan)
  		loop_reread_partitions(lo, bdev);
  	return 0;
  
-  out_putf:
- 	fput(file);
+ out_err:
+ 	mutex_unlock(&loop_ctl_mutex);
+ 	if (file)
+ 		fput(file);
 +	if (virt_file)
 +		fput(virt_file);
-  out:
  	return error;
  }
+ 
 @@ -922,7 +944,7 @@ static int loop_prepare_queue(struct loop_device *lo)
  static int loop_set_fd(struct loop_device *lo, fmode_t mode,
  		       struct block_device *bdev, unsigned int arg)
@@ -39286,23 +39434,23 @@ index 9e534a3..74cd74e 100644
  	lo->ioctl = NULL;
  	lo->lo_sizelimit = 0;
 @@ -1001,6 +1030,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
- 
-  out_putf:
+ 	mutex_unlock(&loop_ctl_mutex);
+ out_putf:
  	fput(file);
 +	if (virt_file)
 +		fput(virt_file);
-  out:
+ out:
  	/* This is safe: open() is still holding a reference. */
  	module_put(THIS_MODULE);
 @@ -1047,6 +1078,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
- static int loop_clr_fd(struct loop_device *lo)
+ static int __loop_clr_fd(struct loop_device *lo)
  {
- 	struct file *filp = lo->lo_backing_file;
+ 	struct file *filp = NULL;
 +	struct file *virt_filp = lo->lo_backing_virt_file;
  	gfp_t gfp = lo->old_gfp_mask;
  	struct block_device *bdev = lo->lo_device;
  
-@@ -1078,6 +1110,7 @@ static int loop_clr_fd(struct loop_device *lo)
+@@ -1078,6 +1110,7 @@ static int __loop_clr_fd(struct loop_device *lo)
  	spin_lock_irq(&lo->lo_lock);
  	lo->lo_state = Lo_rundown;
  	lo->lo_backing_file = NULL;
@@ -39310,13 +39458,13 @@ index 9e534a3..74cd74e 100644
  	spin_unlock_irq(&lo->lo_lock);
  
  	loop_release_xfer(lo);
-@@ -1126,6 +1159,8 @@ static int loop_clr_fd(struct loop_device *lo)
- 	 * bd_mutex which is usually taken before lo_ctl_mutex.
+@@ -1126,6 +1159,8 @@ static int __loop_clr_fd(struct loop_device *lo)
  	 */
- 	fput(filp);
+ 	if (filp)
+ 		fput(filp);
 +	if (virt_filp)
 +		fput(virt_filp);
- 	return 0;
+ 	return err;
  }
  
 diff --git a/drivers/block/loop.h b/drivers/block/loop.h
@@ -39346,12 +39494,12 @@ index 5309874..1a334cf 100644
  		if (file->f_mapping != h_file->f_mapping) {
  			file->f_mapping = h_file->f_mapping;
 diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
-index 3d84349..a642de5 100644
+index 3f3577d..3b44158 100644
 --- a/fs/aufs/loop.c
 +++ b/fs/aufs/loop.c
 @@ -133,3 +133,19 @@ void au_loopback_fin(void)
  		symbol_put(loop_backing_file);
- 	kfree(au_warn_loopback_array);
+ 	au_kfree_try_rcu(au_warn_loopback_array);
  }
 +
 +/* ---------------------------------------------------------------------- */
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list