diff --git a/fs-aufs.patch b/fs-aufs.patch index 1ccf801..ab35f94 100644 --- a/fs-aufs.patch +++ b/fs-aufs.patch @@ -98,10 +98,10 @@ index 000000000000..82f9518495ea + will be empty. About XINO files, see the aufs manual. diff --git a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README new file mode 100644 -index 000000000000..6e6774fbf602 +index 000000000000..3e655d357134 --- /dev/null +++ b/Documentation/filesystems/aufs/README -@@ -0,0 +1,399 @@ +@@ -0,0 +1,401 @@ + +Aufs5 -- advanced multi layered unification filesystem version 5.x +http://aufs.sf.net @@ -376,7 +376,8 @@ index 000000000000..6e6774fbf602 + the internal locks for LOCKDEP is necessary. LOCKDEP is a debugging + feature of linux kernel. If you enable CONFIG_LOCKDEP, then you will + need to apply this debug patch to expand several constant values. -+ If don't know what LOCKDEP is, then you don't have apply this patch. ++ If you don't know what LOCKDEP is, then you don't have apply this ++ patch. + + +4. Usage @@ -426,6 +427,7 @@ index 000000000000..6e6774fbf602 + system, instead of the date you downloaded. +- configuration (define/undefine CONFIG_AUFS_xxx) +- kernel configuration or /proc/config.gz (if you have it) ++- LSM (linux security module, if you are using) +- behaviour which you think to be incorrect +- actual operation, reproducible one is better +- mailto: aufs-users at lists.sourceforge.net @@ -503,12 +505,12 @@ index 000000000000..6e6774fbf602 +# End: ; diff --git a/Documentation/filesystems/aufs/design/01intro.txt b/Documentation/filesystems/aufs/design/01intro.txt new file mode 100644 -index 000000000000..609bf0e9b93a +index 000000000000..47e0a01a8af2 --- /dev/null +++ b/Documentation/filesystems/aufs/design/01intro.txt @@ -0,0 +1,171 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -680,12 +682,12 @@ index 000000000000..609bf0e9b93a +about it. But currently I have implemented it in kernel space. diff --git a/Documentation/filesystems/aufs/design/02struct.txt b/Documentation/filesystems/aufs/design/02struct.txt new file mode 100644 -index 000000000000..2467788c7f10 +index 000000000000..0092b3dcfbe0 --- /dev/null +++ b/Documentation/filesystems/aufs/design/02struct.txt @@ -0,0 +1,258 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -944,12 +946,12 @@ index 000000000000..2467788c7f10 +For this purpose, use "aumvdown" command in aufs-util.git. diff --git a/Documentation/filesystems/aufs/design/03atomic_open.txt b/Documentation/filesystems/aufs/design/03atomic_open.txt new file mode 100644 -index 000000000000..9f16ac1e0173 +index 000000000000..fb8cf0bc8c72 --- /dev/null +++ b/Documentation/filesystems/aufs/design/03atomic_open.txt @@ -0,0 +1,85 @@ + -+# Copyright (C) 2015-2019 Junjiro R. Okajima ++# Copyright (C) 2015-2020 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 @@ -1035,12 +1037,12 @@ index 000000000000..9f16ac1e0173 + be implemented in aufs, but not all I am afraid. diff --git a/Documentation/filesystems/aufs/design/03lookup.txt b/Documentation/filesystems/aufs/design/03lookup.txt new file mode 100644 -index 000000000000..08b443d94dfa +index 000000000000..5c3c97f11c57 --- /dev/null +++ b/Documentation/filesystems/aufs/design/03lookup.txt @@ -0,0 +1,113 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1154,12 +1156,12 @@ index 000000000000..08b443d94dfa + by over-mounting something (or another method). diff --git a/Documentation/filesystems/aufs/design/04branch.txt b/Documentation/filesystems/aufs/design/04branch.txt new file mode 100644 -index 000000000000..3ab3682a42b4 +index 000000000000..da5200be41a9 --- /dev/null +++ b/Documentation/filesystems/aufs/design/04branch.txt @@ -0,0 +1,74 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1234,12 +1236,12 @@ index 000000000000..3ab3682a42b4 + same named entry on the upper branch. diff --git a/Documentation/filesystems/aufs/design/05wbr_policy.txt b/Documentation/filesystems/aufs/design/05wbr_policy.txt new file mode 100644 -index 000000000000..1f9b86bc6a3e +index 000000000000..0262084bf634 --- /dev/null +++ b/Documentation/filesystems/aufs/design/05wbr_policy.txt @@ -0,0 +1,64 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1341,12 +1343,12 @@ index 000000000000..2d62bb6dd55f +} diff --git a/Documentation/filesystems/aufs/design/06dirren.txt b/Documentation/filesystems/aufs/design/06dirren.txt new file mode 100644 -index 000000000000..3b80f8659b3e +index 000000000000..38ae77b2c842 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06dirren.txt @@ -0,0 +1,102 @@ + -+# Copyright (C) 2017-2019 Junjiro R. Okajima ++# Copyright (C) 2017-2020 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 @@ -1449,12 +1451,12 @@ index 000000000000..3b80f8659b3e +equivalen to udba=reval case. diff --git a/Documentation/filesystems/aufs/design/06fhsm.txt b/Documentation/filesystems/aufs/design/06fhsm.txt new file mode 100644 -index 000000000000..8b498d0af812 +index 000000000000..df985662befb --- /dev/null +++ b/Documentation/filesystems/aufs/design/06fhsm.txt @@ -0,0 +1,120 @@ + -+# Copyright (C) 2011-2019 Junjiro R. Okajima ++# Copyright (C) 2011-2020 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 @@ -1575,12 +1577,12 @@ index 000000000000..8b498d0af812 +should restore the original file state after an error happens. diff --git a/Documentation/filesystems/aufs/design/06mmap.txt b/Documentation/filesystems/aufs/design/06mmap.txt new file mode 100644 -index 000000000000..cdd84ea777fc +index 000000000000..9184f6710437 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06mmap.txt @@ -0,0 +1,72 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1653,12 +1655,12 @@ index 000000000000..cdd84ea777fc +I have to give up this "looks-smater" approach. diff --git a/Documentation/filesystems/aufs/design/06xattr.txt b/Documentation/filesystems/aufs/design/06xattr.txt new file mode 100644 -index 000000000000..edd7553f3289 +index 000000000000..d0f6aedfe2d0 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06xattr.txt @@ -0,0 +1,96 @@ + -+# Copyright (C) 2014-2019 Junjiro R. Okajima ++# Copyright (C) 2014-2020 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 @@ -1755,12 +1757,12 @@ index 000000000000..edd7553f3289 +now, aufs implements the branch attributes to ignore the error. diff --git a/Documentation/filesystems/aufs/design/07export.txt b/Documentation/filesystems/aufs/design/07export.txt new file mode 100644 -index 000000000000..9b983f3dd78a +index 000000000000..6fcb00d7dbdb --- /dev/null +++ b/Documentation/filesystems/aufs/design/07export.txt @@ -0,0 +1,58 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1819,12 +1821,12 @@ index 000000000000..9b983f3dd78a + lookup_one_len(), vfs_getattr(), encode_fh() and others. diff --git a/Documentation/filesystems/aufs/design/08shwh.txt b/Documentation/filesystems/aufs/design/08shwh.txt new file mode 100644 -index 000000000000..647a86a65db7 +index 000000000000..d7e58319086b --- /dev/null +++ b/Documentation/filesystems/aufs/design/08shwh.txt @@ -0,0 +1,52 @@ + -+# Copyright (C) 2005-2019 Junjiro R. Okajima ++# Copyright (C) 2005-2020 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 @@ -1877,12 +1879,12 @@ index 000000000000..647a86a65db7 +initramfs will use it to replace the old one at the next boot. diff --git a/Documentation/filesystems/aufs/design/10dynop.txt b/Documentation/filesystems/aufs/design/10dynop.txt new file mode 100644 -index 000000000000..13e8583f2b91 +index 000000000000..d55cae285dff --- /dev/null +++ b/Documentation/filesystems/aufs/design/10dynop.txt @@ -0,0 +1,47 @@ + -+# Copyright (C) 2010-2019 Junjiro R. Okajima ++# Copyright (C) 2010-2020 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 @@ -1929,7 +1931,7 @@ index 000000000000..13e8583f2b91 +Currently this approach is applied to address_space_operations for +regular files only. diff --git a/MAINTAINERS b/MAINTAINERS -index 9d3a5c54a41d..f33398b47c42 100644 +index fe6fa5d3a63e..854ce5d3374e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2832,6 +2832,19 @@ F: include/linux/audit.h @@ -1953,10 +1955,10 @@ index 9d3a5c54a41d..f33398b47c42 100644 M: Miguel Ojeda Sandonis S: Maintained diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index f6f77eaa7217..5e094699215e 100644 +index 57ed6b70d295..d0c30cbcacbe 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -738,6 +738,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -749,6 +749,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, return error; } @@ -2261,13 +2263,13 @@ index 000000000000..2c819a64935e +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o diff --git a/fs/aufs/aufs.h b/fs/aufs/aufs.h new file mode 100644 -index 000000000000..a62a85211b88 +index 000000000000..9a573445876f --- /dev/null +++ b/fs/aufs/aufs.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -2329,13 +2331,13 @@ index 000000000000..a62a85211b88 +#endif /* __AUFS_H__ */ diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c new file mode 100644 -index 000000000000..608bf76f8f21 +index 000000000000..1f141fc8ffed --- /dev/null +++ b/fs/aufs/branch.c @@ -0,0 +1,1428 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -3763,13 +3765,13 @@ index 000000000000..608bf76f8f21 +} diff --git a/fs/aufs/branch.h b/fs/aufs/branch.h new file mode 100644 -index 000000000000..012459ad57f3 +index 000000000000..594c8bd674b2 --- /dev/null +++ b/fs/aufs/branch.h @@ -0,0 +1,366 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -4181,13 +4183,13 @@ index 000000000000..12782f8e0f38 +-include ${srctree}/${src}/conf_priv.mk diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c new file mode 100644 -index 000000000000..21134b448967 +index 000000000000..492442339b6c --- /dev/null +++ b/fs/aufs/cpup.c @@ -0,0 +1,1458 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -5645,13 +5647,13 @@ index 000000000000..21134b448967 +} diff --git a/fs/aufs/cpup.h b/fs/aufs/cpup.h new file mode 100644 -index 000000000000..abcbfbc55a5c +index 000000000000..d02f8150fa05 --- /dev/null +++ b/fs/aufs/cpup.h @@ -0,0 +1,100 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -5751,13 +5753,13 @@ index 000000000000..abcbfbc55a5c +#endif /* __AUFS_CPUP_H__ */ diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c new file mode 100644 -index 000000000000..e32d91d1f638 +index 000000000000..80266f4fcf7d --- /dev/null +++ b/fs/aufs/dbgaufs.c @@ -0,0 +1,526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -6283,13 +6285,13 @@ index 000000000000..e32d91d1f638 +} diff --git a/fs/aufs/dbgaufs.h b/fs/aufs/dbgaufs.h new file mode 100644 -index 000000000000..1ea241bf0234 +index 000000000000..7b4ccdebb678 --- /dev/null +++ b/fs/aufs/dbgaufs.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -6342,13 +6344,13 @@ index 000000000000..1ea241bf0234 +#endif /* __DBGAUFS_H__ */ diff --git a/fs/aufs/dcsub.c b/fs/aufs/dcsub.c new file mode 100644 -index 000000000000..0b9122307667 +index 000000000000..0b9b1862b563 --- /dev/null +++ b/fs/aufs/dcsub.c @@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -6573,13 +6575,13 @@ index 000000000000..0b9122307667 +} diff --git a/fs/aufs/dcsub.h b/fs/aufs/dcsub.h new file mode 100644 -index 000000000000..5e578995c256 +index 000000000000..36f7fcdd7f23 --- /dev/null +++ b/fs/aufs/dcsub.h @@ -0,0 +1,137 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -6716,13 +6718,13 @@ index 000000000000..5e578995c256 +#endif /* __AUFS_DCSUB_H__ */ diff --git a/fs/aufs/debug.c b/fs/aufs/debug.c new file mode 100644 -index 000000000000..b93bb4f565bf +index 000000000000..f0c076c61252 --- /dev/null +++ b/fs/aufs/debug.c @@ -0,0 +1,441 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -7163,13 +7165,13 @@ index 000000000000..b93bb4f565bf +} diff --git a/fs/aufs/debug.h b/fs/aufs/debug.h new file mode 100644 -index 000000000000..9c52470a61fb +index 000000000000..7e46953513f2 --- /dev/null +++ b/fs/aufs/debug.h @@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -7395,13 +7397,13 @@ index 000000000000..9c52470a61fb +#endif /* __AUFS_DEBUG_H__ */ diff --git a/fs/aufs/dentry.c b/fs/aufs/dentry.c new file mode 100644 -index 000000000000..faf664508e64 +index 000000000000..50aaaa21d089 --- /dev/null +++ b/fs/aufs/dentry.c @@ -0,0 +1,1154 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -8555,13 +8557,13 @@ index 000000000000..faf664508e64 +}; diff --git a/fs/aufs/dentry.h b/fs/aufs/dentry.h new file mode 100644 -index 000000000000..3b443fc7eef0 +index 000000000000..c9f9c704da0a --- /dev/null +++ b/fs/aufs/dentry.h @@ -0,0 +1,268 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -8829,13 +8831,13 @@ index 000000000000..3b443fc7eef0 +#endif /* __AUFS_DENTRY_H__ */ diff --git a/fs/aufs/dinfo.c b/fs/aufs/dinfo.c new file mode 100644 -index 000000000000..86140548f046 +index 000000000000..be959106d980 --- /dev/null +++ b/fs/aufs/dinfo.c @@ -0,0 +1,554 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -9389,13 +9391,13 @@ index 000000000000..86140548f046 +} diff --git a/fs/aufs/dir.c b/fs/aufs/dir.c new file mode 100644 -index 000000000000..68e87d6f287e +index 000000000000..0bcb39ee7255 --- /dev/null +++ b/fs/aufs/dir.c @@ -0,0 +1,763 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -10158,13 +10160,13 @@ index 000000000000..68e87d6f287e +}; diff --git a/fs/aufs/dir.h b/fs/aufs/dir.h new file mode 100644 -index 000000000000..5c8065d258bf +index 000000000000..e44c2a1a849b --- /dev/null +++ b/fs/aufs/dir.h @@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -10202,7 +10204,7 @@ index 000000000000..5c8065d258bf + +struct au_vdir_destr { + unsigned char len; -+ unsigned char name[0]; ++ unsigned char name[]; +} __packed; + +struct au_vdir_dehstr { @@ -10298,13 +10300,13 @@ index 000000000000..5c8065d258bf +#endif /* __AUFS_DIR_H__ */ diff --git a/fs/aufs/dirren.c b/fs/aufs/dirren.c new file mode 100644 -index 000000000000..0bd412ab68c9 +index 000000000000..ba4bf56cfb87 --- /dev/null +++ b/fs/aufs/dirren.c @@ -0,0 +1,1316 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2017-2019 Junjiro R. Okajima ++ * Copyright (C) 2017-2020 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 @@ -10385,7 +10387,7 @@ index 000000000000..0bd412ab68c9 + found = 0; + idx = au_dr_ihash(ino); + hbl = dr->dr_h_ino + idx; -+#if 0 ++#if 0 /* debug print */ + { + struct hlist_bl_node *tmp; + @@ -10888,7 +10890,7 @@ index 000000000000..0bd412ab68c9 +struct au_drinfo_rev { + unsigned char already; + aufs_bindex_t nelm; -+ struct au_drinfo_rev_elm elm[0]; ++ struct au_drinfo_rev_elm elm[]; +}; + +/* todo: isn't it too large? */ @@ -11519,8 +11521,8 @@ index 000000000000..0bd412ab68c9 + err = 0; + if (!lkup->dirren.drinfo) + goto out; -+ AuDebugOn(lkup->dirren.ninfo < btgt + 1); -+ drinfo = lkup->dirren.drinfo[btgt + 1]; ++ AuDebugOn(lkup->dirren.ninfo <= btgt); ++ drinfo = lkup->dirren.drinfo[btgt]; + if (!drinfo) + goto out; + @@ -11549,8 +11551,8 @@ index 000000000000..0bd412ab68c9 + match = 1; + if (!lkup->dirren.drinfo) + goto out; -+ AuDebugOn(lkup->dirren.ninfo < bindex + 1); -+ drinfo = lkup->dirren.drinfo[bindex + 1]; ++ AuDebugOn(lkup->dirren.ninfo <= bindex); ++ drinfo = lkup->dirren.drinfo[bindex]; + if (!drinfo) + goto out; + @@ -11620,13 +11622,13 @@ index 000000000000..0bd412ab68c9 +} diff --git a/fs/aufs/dirren.h b/fs/aufs/dirren.h new file mode 100644 -index 000000000000..a986736462c3 +index 000000000000..1fbc8fb20def --- /dev/null +++ b/fs/aufs/dirren.h @@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2017-2019 Junjiro R. Okajima ++ * Copyright (C) 2017-2020 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 @@ -11766,13 +11768,13 @@ index 000000000000..a986736462c3 +#endif /* __AUFS_DIRREN_H__ */ diff --git a/fs/aufs/dynop.c b/fs/aufs/dynop.c new file mode 100644 -index 000000000000..ed79f8255a8f +index 000000000000..837f94d49f74 --- /dev/null +++ b/fs/aufs/dynop.c @@ -0,0 +1,367 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2019 Junjiro R. Okajima ++ * Copyright (C) 2010-2020 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 @@ -12139,13 +12141,13 @@ index 000000000000..ed79f8255a8f +} diff --git a/fs/aufs/dynop.h b/fs/aufs/dynop.h new file mode 100644 -index 000000000000..5d0b36559425 +index 000000000000..c0c7a5485ad7 --- /dev/null +++ b/fs/aufs/dynop.h @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2010-2019 Junjiro R. Okajima ++ * Copyright (C) 2010-2020 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 @@ -12222,13 +12224,13 @@ index 000000000000..5d0b36559425 +#endif /* __AUFS_DYNOP_H__ */ diff --git a/fs/aufs/export.c b/fs/aufs/export.c new file mode 100644 -index 000000000000..1da2ca0a969b +index 000000000000..842df6f05517 --- /dev/null +++ b/fs/aufs/export.c @@ -0,0 +1,838 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -13066,13 +13068,13 @@ index 000000000000..1da2ca0a969b +} diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c new file mode 100644 -index 000000000000..5254b5cd3942 +index 000000000000..9894e2124bd5 --- /dev/null +++ b/fs/aufs/f_op.c @@ -0,0 +1,819 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -13402,7 +13404,7 @@ index 000000000000..5254b5cd3942 + if (unlikely(err)) + goto out; + -+ err = -ENOSYS; ++ err = -ENOSYS; /* the branch doesn't have its ->(read|write)_iter() */ + iter = NULL; + if (rw == MAY_READ) + iter = h_file->f_op->read_iter; @@ -13846,7 +13848,7 @@ index 000000000000..5254b5cd3942 +/* ---------------------------------------------------------------------- */ + +/* no one supports this operation, currently */ -+#if 0 ++#if 0 /* reserved for future use */ +static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset, + size_t len, loff_t *pos, int more) +{ @@ -13882,7 +13884,7 @@ index 000000000000..5254b5cd3942 + .setfl = aufs_setfl, + .splice_write = aufs_splice_write, + .splice_read = aufs_splice_read, -+#if 0 ++#if 0 /* reserved for future use */ + .aio_splice_write = aufs_aio_splice_write, + .aio_splice_read = aufs_aio_splice_read, +#endif @@ -13891,13 +13893,13 @@ index 000000000000..5254b5cd3942 +}; diff --git a/fs/aufs/fhsm.c b/fs/aufs/fhsm.c new file mode 100644 -index 000000000000..f86a4c24fb26 +index 000000000000..9cef93b42993 --- /dev/null +++ b/fs/aufs/fhsm.c @@ -0,0 +1,427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2011-2019 Junjiro R. Okajima ++ * Copyright (C) 2011-2020 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 @@ -14324,13 +14326,13 @@ index 000000000000..f86a4c24fb26 +} diff --git a/fs/aufs/file.c b/fs/aufs/file.c new file mode 100644 -index 000000000000..dbb33855d226 +index 000000000000..b0075b57d8bc --- /dev/null +++ b/fs/aufs/file.c @@ -0,0 +1,863 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -15193,13 +15195,13 @@ index 000000000000..dbb33855d226 +}; diff --git a/fs/aufs/file.h b/fs/aufs/file.h new file mode 100644 -index 000000000000..c679a19df528 +index 000000000000..d124d9c8216d --- /dev/null +++ b/fs/aufs/file.h @@ -0,0 +1,342 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -15541,13 +15543,13 @@ index 000000000000..c679a19df528 +#endif /* __AUFS_FILE_H__ */ diff --git a/fs/aufs/finfo.c b/fs/aufs/finfo.c new file mode 100644 -index 000000000000..448c5e9cd85d +index 000000000000..25077670a507 --- /dev/null +++ b/fs/aufs/finfo.c @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -15696,13 +15698,13 @@ index 000000000000..448c5e9cd85d +} diff --git a/fs/aufs/fstype.h b/fs/aufs/fstype.h new file mode 100644 -index 000000000000..510bd87e9404 +index 000000000000..af4bc6c0dd42 --- /dev/null +++ b/fs/aufs/fstype.h @@ -0,0 +1,401 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -16103,13 +16105,13 @@ index 000000000000..510bd87e9404 +#endif /* __AUFS_FSTYPE_H__ */ diff --git a/fs/aufs/hbl.h b/fs/aufs/hbl.h new file mode 100644 -index 000000000000..6db65b16b08a +index 000000000000..4d5016bccc51 --- /dev/null +++ b/fs/aufs/hbl.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2017-2019 Junjiro R. Okajima ++ * Copyright (C) 2017-2020 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 @@ -16174,13 +16176,13 @@ index 000000000000..6db65b16b08a +#endif /* __AUFS_HBL_H__ */ diff --git a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c new file mode 100644 -index 000000000000..7945ae3ca073 +index 000000000000..cb4eeb1e6069 --- /dev/null +++ b/fs/aufs/hfsnotify.c @@ -0,0 +1,288 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -16468,13 +16470,13 @@ index 000000000000..7945ae3ca073 +}; diff --git a/fs/aufs/hfsplus.c b/fs/aufs/hfsplus.c new file mode 100644 -index 000000000000..3bd869a69c8f +index 000000000000..d250f019bedf --- /dev/null +++ b/fs/aufs/hfsplus.c @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2019 Junjiro R. Okajima ++ * Copyright (C) 2010-2020 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 @@ -16534,13 +16536,13 @@ index 000000000000..3bd869a69c8f +} diff --git a/fs/aufs/hnotify.c b/fs/aufs/hnotify.c new file mode 100644 -index 000000000000..2e7c2cdb8202 +index 000000000000..231edd1b4753 --- /dev/null +++ b/fs/aufs/hnotify.c -@@ -0,0 +1,721 @@ +@@ -0,0 +1,715 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -16722,12 +16724,6 @@ index 000000000000..2e7c2cdb8202 + +out_dpages: + au_dpages_free(&dpages); -+ -+#if 0 -+ /* discard children */ -+ dentry_unhash(dentry); -+ dput(dentry); -+#endif +out: + return err; +} @@ -17261,13 +17257,13 @@ index 000000000000..2e7c2cdb8202 +} diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c new file mode 100644 -index 000000000000..ef1e08c7ca10 +index 000000000000..fc565a70cf57 --- /dev/null +++ b/fs/aufs/i_op.c -@@ -0,0 +1,1505 @@ +@@ -0,0 +1,1502 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -17339,19 +17335,6 @@ index 000000000000..ef1e08c7ca10 + if (!err) + err = security_inode_permission(h_inode, mask); + -+#if 0 -+ if (!err) { -+ /* todo: do we need to call ima_path_check()? */ -+ struct path h_path = { -+ .dentry = -+ .mnt = h_mnt -+ }; -+ err = ima_path_check(&h_path, -+ mask & (MAY_READ | MAY_WRITE | MAY_EXEC), -+ IMA_COUNT_LEAVE); -+ } -+#endif -+ +out: + return err; +} @@ -17373,7 +17356,13 @@ index 000000000000..ef1e08c7ca10 + sb = inode->i_sb; + si_read_lock(sb, AuLock_FLUSH); + ii_read_lock_child(inode); -+#if 0 ++#if 0 /* reserved for future use */ ++ /* ++ * This test may be rather 'too much' since the test is essentially done ++ * in the aufs_lookup(). Theoretically it is possible that the inode ++ * generation doesn't match to the superblock's here. But it isn't a ++ * big deal I suppose. ++ */ + err = au_iigen_test(inode, au_sigen(sb)); + if (unlikely(err)) + goto out; @@ -17491,7 +17480,7 @@ index 000000000000..ef1e08c7ca10 + if (inode) + atomic_inc(&inode->i_count); + ret = d_splice_alias(inode, dentry); -+#if 0 ++#if 0 /* reserved for future use */ + if (unlikely(d_need_lookup(dentry))) { + spin_lock(&dentry->d_lock); + dentry->d_flags &= ~DCACHE_NEED_LOOKUP; @@ -18454,15 +18443,14 @@ index 000000000000..ef1e08c7ca10 + * returns zero or negative (an error). + * @dentry will be read-locked in success. + */ -+int au_h_path_getattr(struct dentry *dentry, int force, struct path *h_path, -+ int locked) ++int au_h_path_getattr(struct dentry *dentry, struct inode *inode, int force, ++ struct path *h_path, int locked) +{ + int err; + unsigned int mnt_flags, sigen; + unsigned char udba_none; + aufs_bindex_t bindex; + struct super_block *sb, *h_sb; -+ struct inode *inode; + + h_path->mnt = NULL; + h_path->dentry = NULL; @@ -18503,7 +18491,11 @@ index 000000000000..ef1e08c7ca10 + di_read_lock_child(dentry, AuLock_IR); + +body: -+ inode = d_inode(dentry); ++ if (!inode) { ++ inode = d_inode(dentry); ++ if (unlikely(!inode)) ++ goto out; ++ } + bindex = au_ibtop(inode); + h_path->mnt = au_sbr_mnt(sb, bindex); + h_sb = h_path->mnt->mnt_sb; @@ -18543,7 +18535,8 @@ index 000000000000..ef1e08c7ca10 + err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM); + if (unlikely(err)) + goto out; -+ err = au_h_path_getattr(dentry, /*force*/0, &h_path, /*locked*/0); ++ err = au_h_path_getattr(dentry, /*inode*/NULL, /*force*/0, &h_path, ++ /*locked*/0); + if (unlikely(err)) + goto out_si; + if (unlikely(!h_path.dentry)) @@ -18772,13 +18765,13 @@ index 000000000000..ef1e08c7ca10 +}; diff --git a/fs/aufs/i_op_add.c b/fs/aufs/i_op_add.c new file mode 100644 -index 000000000000..af6893e61066 +index 000000000000..80f2cfeeaaa0 --- /dev/null +++ b/fs/aufs/i_op_add.c @@ -0,0 +1,936 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -19714,13 +19707,13 @@ index 000000000000..af6893e61066 +} diff --git a/fs/aufs/i_op_del.c b/fs/aufs/i_op_del.c new file mode 100644 -index 000000000000..1c459dbea5db +index 000000000000..9beba2ba8db0 --- /dev/null +++ b/fs/aufs/i_op_del.c @@ -0,0 +1,513 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -20233,13 +20226,13 @@ index 000000000000..1c459dbea5db +} diff --git a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c new file mode 100644 -index 000000000000..91aa66594a42 +index 000000000000..435fa50811ff --- /dev/null +++ b/fs/aufs/i_op_ren.c @@ -0,0 +1,1250 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -20654,7 +20647,7 @@ index 000000000000..91aa66594a42 + } + + BUG_ON(d_is_positive(a->dst_h_dentry) && a->src_btop != a->btgt); -+#if 0 ++#if 0 /* debugging */ + BUG_ON(!au_ftest_ren(a->auren_flags, DIRREN) + && d_is_positive(a->dst_h_dentry) + && a->src_btop != a->btgt); @@ -21489,13 +21482,13 @@ index 000000000000..91aa66594a42 +} diff --git a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c new file mode 100644 -index 000000000000..098fd115052a +index 000000000000..016db39451cd --- /dev/null +++ b/fs/aufs/iinfo.c @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -21781,13 +21774,13 @@ index 000000000000..098fd115052a +} diff --git a/fs/aufs/inode.c b/fs/aufs/inode.c new file mode 100644 -index 000000000000..985377d9bf66 +index 000000000000..4de1b7507c5b --- /dev/null +++ b/fs/aufs/inode.c @@ -0,0 +1,529 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -21999,7 +21992,7 @@ index 000000000000..985377d9bf66 + struct dentry *h_dentry; + struct inode *h_inode; + struct au_iinfo *iinfo; -+ struct inode_operations *iop; ++ const struct inode_operations *iop; + + IiMustWriteLock(inode); + @@ -22316,13 +22309,13 @@ index 000000000000..985377d9bf66 +} diff --git a/fs/aufs/inode.h b/fs/aufs/inode.h new file mode 100644 -index 000000000000..e387ef16e999 +index 000000000000..af32a233200e --- /dev/null +++ b/fs/aufs/inode.h @@ -0,0 +1,698 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -22479,7 +22472,7 @@ index 000000000000..e387ef16e999 + AuIop_OTHER, + AuIop_Last +}; -+extern struct inode_operations aufs_iop[AuIop_Last], ++extern struct inode_operations aufs_iop[AuIop_Last], /* not const */ + aufs_iop_nogetattr[AuIop_Last]; + +/* au_wr_dir flags */ @@ -22529,8 +22522,8 @@ index 000000000000..e387ef16e999 +int au_pin_and_icpup(struct dentry *dentry, struct iattr *ia, + struct au_icpup_args *a); + -+int au_h_path_getattr(struct dentry *dentry, int force, struct path *h_path, -+ int locked); ++int au_h_path_getattr(struct dentry *dentry, struct inode *inode, int force, ++ struct path *h_path, int locked); + +/* i_op_add.c */ +int au_may_add(struct dentry *dentry, aufs_bindex_t bindex, @@ -23020,13 +23013,13 @@ index 000000000000..e387ef16e999 +#endif /* __AUFS_INODE_H__ */ diff --git a/fs/aufs/ioctl.c b/fs/aufs/ioctl.c new file mode 100644 -index 000000000000..fb2fb758283e +index 000000000000..ae4f73386b90 --- /dev/null +++ b/fs/aufs/ioctl.c @@ -0,0 +1,220 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -23246,13 +23239,13 @@ index 000000000000..fb2fb758283e +#endif diff --git a/fs/aufs/lcnt.h b/fs/aufs/lcnt.h new file mode 100644 -index 000000000000..d8508f875f28 +index 000000000000..8afcabe55826 --- /dev/null +++ b/fs/aufs/lcnt.h @@ -0,0 +1,186 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2018-2019 Junjiro R. Okajima ++ * Copyright (C) 2018-2020 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 @@ -23438,13 +23431,13 @@ index 000000000000..d8508f875f28 +#endif /* __AUFS_LCNT_H__ */ diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c new file mode 100644 -index 000000000000..bfcb9f994c2d +index 000000000000..63732e938684 --- /dev/null +++ b/fs/aufs/loop.c @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -23592,13 +23585,13 @@ index 000000000000..bfcb9f994c2d +} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h new file mode 100644 -index 000000000000..7fc394e72d75 +index 000000000000..65c38bbb5d56 --- /dev/null +++ b/fs/aufs/loop.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -23690,13 +23683,13 @@ index 000000000000..7bc9eef3ffec +endif diff --git a/fs/aufs/module.c b/fs/aufs/module.c new file mode 100644 -index 000000000000..295736adfc3c +index 000000000000..7245197a6cbf --- /dev/null +++ b/fs/aufs/module.c @@ -0,0 +1,273 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -23969,13 +23962,13 @@ index 000000000000..295736adfc3c +module_exit(aufs_exit); diff --git a/fs/aufs/module.h b/fs/aufs/module.h new file mode 100644 -index 000000000000..3036754b90d0 +index 000000000000..d6a76788d2ff --- /dev/null +++ b/fs/aufs/module.h @@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -24141,13 +24134,13 @@ index 000000000000..3036754b90d0 +#endif /* __AUFS_MODULE_H__ */ diff --git a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c new file mode 100644 -index 000000000000..cbac849ead31 +index 000000000000..c39a39e52ebc --- /dev/null +++ b/fs/aufs/mvdown.c @@ -0,0 +1,706 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2011-2019 Junjiro R. Okajima ++ * Copyright (C) 2011-2020 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 @@ -24853,13 +24846,13 @@ index 000000000000..cbac849ead31 +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 000000000000..77e17d7b3bdf +index 000000000000..16e785facf9b --- /dev/null +++ b/fs/aufs/opts.c @@ -0,0 +1,1880 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -26486,7 +26479,7 @@ index 000000000000..77e17d7b3bdf + if ((br->br_perm & AuBrAttr_ICEX) + && !h_dir->i_op->listxattr) + br->br_perm &= ~AuBrAttr_ICEX; -+#if 0 ++#if 0 /* untested */ + if ((br->br_perm & AuBrAttr_ICEX_SEC) + && (au_br_sb(br)->s_flags & SB_NOSEC)) + br->br_perm &= ~AuBrAttr_ICEX_SEC; @@ -26739,13 +26732,13 @@ index 000000000000..77e17d7b3bdf +} diff --git a/fs/aufs/opts.h b/fs/aufs/opts.h new file mode 100644 -index 000000000000..6326b54340c7 +index 000000000000..79f3ea56f8bb --- /dev/null +++ b/fs/aufs/opts.h @@ -0,0 +1,225 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -26970,13 +26963,13 @@ index 000000000000..6326b54340c7 +#endif /* __AUFS_OPTS_H__ */ diff --git a/fs/aufs/plink.c b/fs/aufs/plink.c new file mode 100644 -index 000000000000..718edb8827a3 +index 000000000000..850829b21888 --- /dev/null +++ b/fs/aufs/plink.c @@ -0,0 +1,516 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -27492,13 +27485,13 @@ index 000000000000..718edb8827a3 +} diff --git a/fs/aufs/poll.c b/fs/aufs/poll.c new file mode 100644 -index 000000000000..c48c6cb6491f +index 000000000000..6975d3ab2d29 --- /dev/null +++ b/fs/aufs/poll.c @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -27549,13 +27542,13 @@ index 000000000000..c48c6cb6491f +} diff --git a/fs/aufs/posix_acl.c b/fs/aufs/posix_acl.c new file mode 100644 -index 000000000000..3c8f9a222ed8 +index 000000000000..0789335650de --- /dev/null +++ b/fs/aufs/posix_acl.c @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2014-2019 Junjiro R. Okajima ++ * Copyright (C) 2014-2020 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 @@ -27660,13 +27653,13 @@ index 000000000000..3c8f9a222ed8 +} diff --git a/fs/aufs/procfs.c b/fs/aufs/procfs.c new file mode 100644 -index 000000000000..582dd486fcd3 +index 000000000000..20bb15d45472 --- /dev/null +++ b/fs/aufs/procfs.c @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2019 Junjiro R. Okajima ++ * Copyright (C) 2010-2020 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 @@ -27837,13 +27830,13 @@ index 000000000000..582dd486fcd3 +} diff --git a/fs/aufs/rdu.c b/fs/aufs/rdu.c new file mode 100644 -index 000000000000..3805e79627eb +index 000000000000..afd77564f3dc --- /dev/null +++ b/fs/aufs/rdu.c @@ -0,0 +1,384 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -28227,13 +28220,13 @@ index 000000000000..3805e79627eb +#endif diff --git a/fs/aufs/rwsem.h b/fs/aufs/rwsem.h new file mode 100644 -index 000000000000..2f8988fa1bda +index 000000000000..370eae159348 --- /dev/null +++ b/fs/aufs/rwsem.h @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -28306,13 +28299,13 @@ index 000000000000..2f8988fa1bda +#endif /* __AUFS_RWSEM_H__ */ diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c new file mode 100644 -index 000000000000..500a920b4ea1 +index 000000000000..3835be61d978 --- /dev/null +++ b/fs/aufs/sbinfo.c @@ -0,0 +1,314 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -28626,13 +28619,13 @@ index 000000000000..500a920b4ea1 +} diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 000000000000..44ee4685b218 +index 000000000000..aa7f210e5493 --- /dev/null +++ b/fs/aufs/super.c @@ -0,0 +1,1047 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -28878,7 +28871,7 @@ index 000000000000..44ee4685b218 + sb = dentry->d_sb; + if (sb->s_flags & SB_POSIXACL) + seq_puts(m, ",acl"); -+#if 0 ++#if 0 /* reserved for future use */ + if (sb->s_flags & SB_I_VERSION) + seq_puts(m, ",i_version"); +#endif @@ -29679,13 +29672,13 @@ index 000000000000..44ee4685b218 +}; diff --git a/fs/aufs/super.h b/fs/aufs/super.h new file mode 100644 -index 000000000000..37f02bb21324 +index 000000000000..c0cb0051242c --- /dev/null +++ b/fs/aufs/super.h @@ -0,0 +1,589 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -29864,7 +29857,7 @@ index 000000000000..37f02bb21324 + struct hlist_bl_head si_files; + + /* with/without getattr, brother of sb->s_d_op */ -+ struct inode_operations *si_iop_array; ++ const struct inode_operations *si_iop_array; + + /* + * sysfs and lifetime management. @@ -30274,13 +30267,13 @@ index 000000000000..37f02bb21324 +#endif /* __AUFS_SUPER_H__ */ diff --git a/fs/aufs/sysaufs.c b/fs/aufs/sysaufs.c new file mode 100644 -index 000000000000..32a0811c54de +index 000000000000..f615471231b5 --- /dev/null +++ b/fs/aufs/sysaufs.c @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -30373,13 +30366,13 @@ index 000000000000..32a0811c54de +} diff --git a/fs/aufs/sysaufs.h b/fs/aufs/sysaufs.h new file mode 100644 -index 000000000000..195fe279b820 +index 000000000000..55c5c9868f3b --- /dev/null +++ b/fs/aufs/sysaufs.h @@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -30481,13 +30474,13 @@ index 000000000000..195fe279b820 +#endif /* __SYSAUFS_H__ */ diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c new file mode 100644 -index 000000000000..eda987628dbb +index 000000000000..46638d88ef21 --- /dev/null +++ b/fs/aufs/sysfs.c @@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -30861,13 +30854,13 @@ index 000000000000..eda987628dbb +} diff --git a/fs/aufs/sysrq.c b/fs/aufs/sysrq.c new file mode 100644 -index 000000000000..db10ec528f5d +index 000000000000..fc8aa4a2839f --- /dev/null +++ b/fs/aufs/sysrq.c -@@ -0,0 +1,160 @@ +@@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -30901,6 +30894,7 @@ index 000000000000..db10ec528f5d + struct hlist_bl_head *files; + struct hlist_bl_node *pos; + struct au_finfo *finfo; ++ struct inode *i; + + plevel = au_plevel; + au_plevel = KERN_WARNING; @@ -30913,14 +30907,7 @@ index 000000000000..db10ec528f5d + pr("superblock\n"); + au_dpri_sb(sb); + -+#if 0 -+ pr("root dentry\n"); -+ au_dpri_dentry(sb->s_root); -+ pr("root inode\n"); -+ au_dpri_inode(d_inode(sb->s_root)); -+#endif -+ -+#if 0 ++#if 0 /* reserved */ + do { + int err, i, j, ndentry; + struct au_dcsub_pages dpages; @@ -30941,21 +30928,16 @@ index 000000000000..db10ec528f5d + } while (0); +#endif + -+#if 1 -+ { -+ struct inode *i; -+ -+ pr("isolated inode\n"); -+ spin_lock(&sb->s_inode_list_lock); -+ list_for_each_entry(i, &sb->s_inodes, i_sb_list) { -+ spin_lock(&i->i_lock); -+ if (1 || hlist_empty(&i->i_dentry)) -+ au_dpri_inode(i); -+ spin_unlock(&i->i_lock); -+ } -+ spin_unlock(&sb->s_inode_list_lock); ++ pr("isolated inode\n"); ++ spin_lock(&sb->s_inode_list_lock); ++ list_for_each_entry(i, &sb->s_inodes, i_sb_list) { ++ spin_lock(&i->i_lock); ++ if (hlist_empty(&i->i_dentry)) ++ au_dpri_inode(i); ++ spin_unlock(&i->i_lock); + } -+#endif ++ spin_unlock(&sb->s_inode_list_lock); ++ + pr("files\n"); + files = &au_sbi(sb)->si_files; + hlist_bl_lock(files); @@ -31027,13 +31009,13 @@ index 000000000000..db10ec528f5d +} diff --git a/fs/aufs/vdir.c b/fs/aufs/vdir.c new file mode 100644 -index 000000000000..dc768f5d90c6 +index 000000000000..5ba006b80724 --- /dev/null +++ b/fs/aufs/vdir.c @@ -0,0 +1,896 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -31128,7 +31110,7 @@ index 000000000000..dc768f5d90c6 + +static void nhash_count(struct hlist_head *head) +{ -+#if 0 ++#if 0 /* debugging */ + unsigned long n; + struct hlist_node *pos; + @@ -31929,13 +31911,13 @@ index 000000000000..dc768f5d90c6 +} diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c new file mode 100644 -index 000000000000..d6945e22593e +index 000000000000..e954cd7d0110 --- /dev/null +++ b/fs/aufs/vfsub.c @@ -0,0 +1,902 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -32837,13 +32819,13 @@ index 000000000000..d6945e22593e +} diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h new file mode 100644 -index 000000000000..51e677c7f6b7 +index 000000000000..705f033ba2c3 --- /dev/null +++ b/fs/aufs/vfsub.h @@ -0,0 +1,354 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -33197,13 +33179,13 @@ index 000000000000..51e677c7f6b7 +#endif /* __AUFS_VFSUB_H__ */ diff --git a/fs/aufs/wbr_policy.c b/fs/aufs/wbr_policy.c new file mode 100644 -index 000000000000..64954145c0ec +index 000000000000..a7cc1109f69d --- /dev/null +++ b/fs/aufs/wbr_policy.c @@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -34033,13 +34015,13 @@ index 000000000000..64954145c0ec +}; diff --git a/fs/aufs/whout.c b/fs/aufs/whout.c new file mode 100644 -index 000000000000..6c9c8501562a +index 000000000000..efe0c16508db --- /dev/null +++ b/fs/aufs/whout.c @@ -0,0 +1,1062 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -34344,7 +34326,7 @@ index 000000000000..6c9c8501562a + + pr_err("%pd (%s) doesn't support link(2), use noplink and rw+nolwh\n", + h_root, au_sbtype(h_root->d_sb)); -+ return -ENOSYS; ++ return -ENOSYS; /* the branch doesn't have its ->link() */ +} + +/* todo: should this mkdir be done in /sbin/mount.aufs helper? */ @@ -35101,13 +35083,13 @@ index 000000000000..6c9c8501562a +} diff --git a/fs/aufs/whout.h b/fs/aufs/whout.h new file mode 100644 -index 000000000000..06f69b24e5c1 +index 000000000000..65459ba0e790 --- /dev/null +++ b/fs/aufs/whout.h @@ -0,0 +1,86 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -35193,13 +35175,13 @@ index 000000000000..06f69b24e5c1 +#endif /* __AUFS_WHOUT_H__ */ diff --git a/fs/aufs/wkq.c b/fs/aufs/wkq.c new file mode 100644 -index 000000000000..b0dd8df4e414 +index 000000000000..9d92e1fd2e4b --- /dev/null +++ b/fs/aufs/wkq.c -@@ -0,0 +1,392 @@ +@@ -0,0 +1,372 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -35352,8 +35334,8 @@ index 000000000000..b0dd8df4e414 + goto out; + + err = 0; -+#if 0 -+ if (0 && au_debug_test()) /* left for debugging */ ++#if 0 /* left for debugging */ ++ if (0 && au_debug_test()) + lockdep_print_held_locks(curr); +#endif + held_locks = curr->held_locks; @@ -35430,7 +35412,6 @@ index 000000000000..b0dd8df4e414 +/* + * Since struct completion is large, try allocating it dynamically. + */ -+#if 1 /* defined(CONFIG_4KSTACKS) || defined(AuTest4KSTACKS) */ +#define AuWkqCompDeclare(name) struct completion *comp = NULL + +static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp) @@ -35449,25 +35430,6 @@ index 000000000000..b0dd8df4e414 + au_kfree_rcu(comp); +} + -+#else -+ -+/* no braces */ -+#define AuWkqCompDeclare(name) \ -+ DECLARE_COMPLETION_ONSTACK(_ ## name); \ -+ struct completion *comp = &_ ## name -+ -+static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp) -+{ -+ wkinfo->comp = *comp; -+ return 0; -+} -+ -+static void au_wkq_comp_free(struct completion *comp __maybe_unused) -+{ -+ /* empty */ -+} -+#endif /* 4KSTACKS */ -+ +static void au_wkq_run(struct au_wkinfo *wkinfo) +{ + if (au_ftest_wkq(wkinfo->flags, NEST)) { @@ -35591,13 +35553,13 @@ index 000000000000..b0dd8df4e414 +} diff --git a/fs/aufs/wkq.h b/fs/aufs/wkq.h new file mode 100644 -index 000000000000..235370d91693 +index 000000000000..5be76b69d8ff --- /dev/null +++ b/fs/aufs/wkq.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -35686,13 +35648,13 @@ index 000000000000..235370d91693 +#endif /* __AUFS_WKQ_H__ */ diff --git a/fs/aufs/xattr.c b/fs/aufs/xattr.c new file mode 100644 -index 000000000000..8e56b15c53b5 +index 000000000000..103c4275e5fc --- /dev/null +++ b/fs/aufs/xattr.c @@ -0,0 +1,356 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2014-2019 Junjiro R. Okajima ++ * Copyright (C) 2014-2020 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 @@ -35886,7 +35848,7 @@ index 000000000000..8e56b15c53b5 + +static int au_smack_reentering(struct super_block *sb) +{ -+#if IS_ENABLED(CONFIG_SECURITY_SMACK) ++#if IS_ENABLED(CONFIG_SECURITY_SMACK) || IS_ENABLED(CONFIG_SECURITY_SELINUX) + /* + * as a part of lookup, smack_d_instantiate() is called, and it calls + * i_op->getxattr(). ouch. @@ -35917,7 +35879,8 @@ index 000000000000..8e56b15c53b5 + } u; +}; + -+static ssize_t au_lgxattr(struct dentry *dentry, struct au_lgxattr *arg) ++static ssize_t au_lgxattr(struct dentry *dentry, struct inode *inode, ++ struct au_lgxattr *arg) +{ + ssize_t err; + int reenter; @@ -35931,7 +35894,7 @@ index 000000000000..8e56b15c53b5 + if (unlikely(err)) + goto out; + } -+ err = au_h_path_getattr(dentry, /*force*/1, &h_path, reenter); ++ err = au_h_path_getattr(dentry, inode, /*force*/1, &h_path, reenter); + if (unlikely(err)) + goto out_si; + if (unlikely(!h_path.dentry)) @@ -35973,11 +35936,10 @@ index 000000000000..8e56b15c53b5 + }, + }; + -+ return au_lgxattr(dentry, &arg); ++ return au_lgxattr(dentry, /*inode*/NULL, &arg); +} + -+static ssize_t au_getxattr(struct dentry *dentry, -+ struct inode *inode __maybe_unused, ++static ssize_t au_getxattr(struct dentry *dentry, struct inode *inode, + const char *name, void *value, size_t size) +{ + struct au_lgxattr arg = { @@ -35989,7 +35951,7 @@ index 000000000000..8e56b15c53b5 + }, + }; + -+ return au_lgxattr(dentry, &arg); ++ return au_lgxattr(dentry, inode, &arg); +} + +static int au_setxattr(struct dentry *dentry, struct inode *inode, @@ -36048,13 +36010,13 @@ index 000000000000..8e56b15c53b5 +} diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c new file mode 100644 -index 000000000000..35ea33469d36 +index 000000000000..b3152c0ce0b5 --- /dev/null +++ b/fs/aufs/xino.c -@@ -0,0 +1,1965 @@ +@@ -0,0 +1,1966 @@ +// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -37409,9 +37371,10 @@ index 000000000000..35ea33469d36 + 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_for_each_entry_safe(p, pos, n, hbl, node) { + hlist_bl_del(&p->node); -+ au_kfree_rcu(p); ++ /* kmemleak reported au_kfree_rcu() doesn't free it */ ++ kfree(p); + } + hlist_bl_unlock(hbl); + } @@ -38047,7 +38010,7 @@ index e88cf0554e65..00d7e6a08026 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index c27231234764..2b5f96e645cd 100644 +index d62cd1d71098..6f5bd2b1a200 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -110,6 +110,7 @@ bool path_noexec(const struct path *path) @@ -38059,7 +38022,7 @@ index c27231234764..2b5f96e645cd 100644 #ifdef CONFIG_USELIB /* diff --git a/fs/fcntl.c b/fs/fcntl.c -index 3d40771e8e7c..d4ad34463848 100644 +index 3d40771e8e7c..0468c845190f 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -32,7 +32,7 @@ @@ -38067,7 +38030,7 @@ index 3d40771e8e7c..d4ad34463848 100644 #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME) -static int setfl(int fd, struct file * filp, unsigned long arg) -+int setfl(int fd, struct file * filp, unsigned long arg) ++int setfl(int fd, struct file *filp, unsigned long arg) { struct inode * inode = file_inode(filp); int error = 0; @@ -38089,7 +38052,7 @@ index 3d40771e8e7c..d4ad34463848 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) diff --git a/fs/file_table.c b/fs/file_table.c -index 30d55c9a1744..714a54f0b10c 100644 +index 30d55c9a1744..34b9bbf4c556 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -162,6 +162,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred) @@ -38100,15 +38063,7 @@ index 30d55c9a1744..714a54f0b10c 100644 /* * Variant of alloc_empty_file() that doesn't check and modify nr_files. -@@ -312,6 +313,7 @@ static void ____fput(struct callback_head *work) - { - __fput(container_of(work, struct file, f_u.fu_rcuhead)); - } -+//EXPORT_SYMBOL_GPL(flush_delayed_fput); - - /* - * If kernel thread really needs to have the final fput() it has done -@@ -375,6 +377,7 @@ void __fput_sync(struct file *file) +@@ -375,6 +376,7 @@ void __fput_sync(struct file *file) } EXPORT_SYMBOL(fput); @@ -38117,10 +38072,10 @@ index 30d55c9a1744..714a54f0b10c 100644 void __init files_init(void) { diff --git a/fs/inode.c b/fs/inode.c -index fef457a42882..7da221710ec8 100644 +index c5267a4db0f5..bff1c4d26e06 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -885,6 +885,8 @@ unsigned int get_next_ino(void) +@@ -893,6 +893,8 @@ unsigned int get_next_ino(void) unsigned int *p = &get_cpu_var(last_ino); unsigned int res = *p; @@ -38129,7 +38084,7 @@ index fef457a42882..7da221710ec8 100644 #ifdef CONFIG_SMP if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) { static atomic_t shared_last_ino; -@@ -897,7 +899,7 @@ unsigned int get_next_ino(void) +@@ -905,7 +907,7 @@ unsigned int get_next_ino(void) res++; /* get_next_ino should not provide a 0 inode number */ if (unlikely(!res)) @@ -38138,7 +38093,7 @@ index fef457a42882..7da221710ec8 100644 *p = res; put_cpu_var(last_ino); return res; -@@ -1673,7 +1675,7 @@ EXPORT_SYMBOL(generic_update_time); +@@ -1681,7 +1683,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ @@ -38147,7 +38102,7 @@ index fef457a42882..7da221710ec8 100644 { int (*update_time)(struct inode *, struct timespec64 *, int); -@@ -1682,6 +1684,7 @@ static int update_time(struct inode *inode, struct timespec64 *time, int flags) +@@ -1690,6 +1692,7 @@ static int update_time(struct inode *inode, struct timespec64 *time, int flags) return update_time(inode, time, flags); } @@ -38202,7 +38157,7 @@ index 133f723aca07..0b9f7f6d8390 100644 /* * Drop a reference to a group. Free it if it's through. diff --git a/fs/open.c b/fs/open.c -index b62f5c0923a8..89af4b9c7319 100644 +index dcbd01611237..bfbba52d86d4 100644 --- a/fs/open.c +++ b/fs/open.c @@ -65,6 +65,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, @@ -38284,7 +38239,7 @@ index 7907e6419e57..d17209cf52bc 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/fs/read_write.c b/fs/read_write.c -index 5bbf587f5bc1..5b2dbddb0efe 100644 +index 7458fccc59e1..9f5ff742f870 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -468,6 +468,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) @@ -38307,7 +38262,7 @@ index 5bbf587f5bc1..5b2dbddb0efe 100644 + return fop->read; + if (fop->read_iter) + return new_sync_read; -+ return ERR_PTR(-ENOSYS); ++ return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */ +} +EXPORT_SYMBOL_GPL(vfs_readf); + @@ -38319,7 +38274,7 @@ index 5bbf587f5bc1..5b2dbddb0efe 100644 + return fop->write; + if (fop->write_iter) + return new_sync_write; -+ return ERR_PTR(-ENOSYS); ++ return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */ +} +EXPORT_SYMBOL_GPL(vfs_writef); + @@ -38335,7 +38290,7 @@ index 5bbf587f5bc1..5b2dbddb0efe 100644 /* file_ppos returns &file->f_pos or NULL if file is stream */ static inline loff_t *file_ppos(struct file *file) diff --git a/fs/splice.c b/fs/splice.c -index 98412721f056..0a1f7498c22b 100644 +index e509239d7e06..d47bcda3ae68 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -834,8 +834,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -38409,18 +38364,18 @@ index 90dd78f0eb27..40b01dd1b14a 100644 ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, diff --git a/include/linux/fs.h b/include/linux/fs.h -index e0d909d35763..3e997d7fc67f 100644 +index 5bd384dbdca5..ae20eb35c7f6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1349,6 +1349,7 @@ extern void fasync_free(struct fasync_struct *); +@@ -1350,6 +1350,7 @@ extern void fasync_free(struct fasync_struct *); /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); -+extern int setfl(int fd, struct file * filp, unsigned long arg); ++extern int setfl(int fd, struct file *filp, unsigned long arg); extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern int f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -1835,6 +1836,7 @@ struct file_operations { +@@ -1843,6 +1844,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -38428,7 +38383,7 @@ index e0d909d35763..3e997d7fc67f 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -1905,6 +1907,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1913,6 +1915,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -38441,7 +38396,7 @@ index e0d909d35763..3e997d7fc67f 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); -@@ -2325,6 +2333,7 @@ extern int current_umask(void); +@@ -2333,6 +2341,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec64 *, int); @@ -38449,7 +38404,7 @@ index e0d909d35763..3e997d7fc67f 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2613,6 +2622,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2621,6 +2630,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -38479,10 +38434,10 @@ index b8a835fd611b..f452521f2e05 100644 #define lockdep_assert_held(l) do { (void)(l); } while (0) diff --git a/include/linux/mm.h b/include/linux/mm.h -index a2adf95b3f9c..70e1dccc1283 100644 +index 3285dae06c03..e2e9873d1e1f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1510,6 +1510,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, +@@ -1522,6 +1522,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, unmap_mapping_range(mapping, holebegin, holelen, 0); } @@ -38567,13 +38522,13 @@ index 74b4911ac16d..19789fbea567 100644 #endif diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h new file mode 100644 -index 000000000000..f1016eb18ed7 +index 000000000000..80d475cda6f4 --- /dev/null +++ b/include/uapi/linux/aufs_type.h @@ -0,0 +1,452 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* -+ * Copyright (C) 2005-2019 Junjiro R. Okajima ++ * Copyright (C) 2005-2020 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 @@ -38606,20 +38561,21 @@ index 000000000000..f1016eb18ed7 +#define pr_fmt(fmt) \ + AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \ + (int)sizeof(current->comm), current->comm, current->pid ++#include +#else +#include +#include ++#include +#endif /* __KERNEL__ */ + -+#include -+ -+#define AUFS_VERSION "5.x-rcN-20191021" ++#define AUFS_VERSION "5.4.3-20200518" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') + +/* ---------------------------------------------------------------------- */ + ++#ifdef __KERNEL__ +#ifdef CONFIG_AUFS_BRANCH_MAX_127 +typedef int8_t aufs_bindex_t; +#define AUFS_BRANCH_MAX 127 @@ -38634,7 +38590,6 @@ index 000000000000..f1016eb18ed7 +#endif +#endif + -+#ifdef __KERNEL__ +#ifndef AUFS_BRANCH_MAX +#error unknown CONFIG_AUFS_BRANCH_MAX value +#endif @@ -38860,7 +38815,7 @@ index 000000000000..f1016eb18ed7 + uint8_t type; + uint8_t nlen; + uint8_t wh; -+ char name[0]; ++ char name[]; +} __aligned(8); + +static inline int au_rdu_len(int nlen) @@ -38911,7 +38866,7 @@ index 000000000000..f1016eb18ed7 + uint8_t oldnamelen; + uint64_t _padding; + }; -+ uint8_t oldname[0]; ++ uint8_t oldname[]; +} __aligned(8); + +struct au_drinfo_fdata { @@ -39005,7 +38960,7 @@ index 000000000000..f1016eb18ed7 + struct { + int16_t id; + int perm; -+ char path[0]; ++ char path[]; + }; +} __aligned(8); + @@ -39024,7 +38979,7 @@ index 000000000000..f1016eb18ed7 + +#endif /* __AUFS_TYPE_H__ */ diff --git a/kernel/fork.c b/kernel/fork.c -index 6cabc124378c..53a5a521aba8 100644 +index 9180f4416dba..43fe7f1db781 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -562,7 +562,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, @@ -39037,7 +38992,7 @@ index 6cabc124378c..53a5a521aba8 100644 atomic_dec(&inode->i_writecount); i_mmap_lock_write(mapping); diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 233459c03b5a..d7f71842f8a2 100644 +index 9ab1a965c3b9..3bdd026fd01d 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -153,7 +153,7 @@ static @@ -39081,10 +39036,10 @@ index d996846697ef..fbadb91df4e4 100644 # Give 'page_alloc' its own module-parameter namespace page-alloc-y := page_alloc.o diff --git a/mm/filemap.c b/mm/filemap.c -index 85b7d087eb45..115275a4a0e2 100644 +index 1f5731768222..a3def534d7c1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2696,7 +2696,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) +@@ -2675,7 +2675,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) vm_fault_t ret = VM_FAULT_LOCKED; sb_start_pagefault(inode->i_sb); @@ -39094,10 +39049,10 @@ index 85b7d087eb45..115275a4a0e2 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index a7d8c84d19b7..9c350dc3f570 100644 +index 514cc19c5916..68aed9b1a7f5 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -182,7 +182,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -176,7 +176,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -39106,7 +39061,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 mpol_put(vma_policy(vma)); vm_area_free(vma); return next; -@@ -940,7 +940,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -932,7 +932,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, if (remove_next) { if (file) { uprobe_munmap(next, next->vm_start, next->vm_end); @@ -39115,7 +39070,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1865,8 +1865,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1855,8 +1855,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -39125,7 +39080,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2695,7 +2695,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2685,7 +2685,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -39134,7 +39089,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2714,7 +2714,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2704,7 +2704,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -39143,7 +39098,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2906,7 +2906,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2896,7 +2896,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -39152,7 +39107,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", current->comm, current->pid); -@@ -2981,10 +2981,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2971,10 +2971,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, } } @@ -39181,7 +39136,7 @@ index a7d8c84d19b7..9c350dc3f570 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3274,7 +3291,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3264,7 +3281,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -39191,10 +39146,10 @@ index a7d8c84d19b7..9c350dc3f570 100644 new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); diff --git a/mm/nommu.c b/mm/nommu.c -index 99b7ec318824..de5b6cd162fe 100644 +index 3b67bd20c2af..55ce55c1b21d 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -552,7 +552,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -556,7 +556,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); if (region->vm_file) @@ -39203,7 +39158,7 @@ index 99b7ec318824..de5b6cd162fe 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -690,7 +690,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -694,7 +694,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -39212,7 +39167,7 @@ index 99b7ec318824..de5b6cd162fe 100644 put_nommu_region(vma->vm_region); vm_area_free(vma); } -@@ -1213,7 +1213,7 @@ unsigned long do_mmap(struct file *file, +@@ -1217,7 +1217,7 @@ unsigned long do_mmap(struct file *file, goto error_just_free; } } @@ -39221,7 +39176,7 @@ index 99b7ec318824..de5b6cd162fe 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1290,10 +1290,10 @@ unsigned long do_mmap(struct file *file, +@@ -1294,10 +1294,10 @@ unsigned long do_mmap(struct file *file, up_write(&nommu_region_sem); error: if (region->vm_file) @@ -39236,7 +39191,7 @@ index 99b7ec318824..de5b6cd162fe 100644 diff --git a/mm/prfile.c b/mm/prfile.c new file mode 100644 -index 000000000000..024cdcfae1b1 +index 000000000000..00d51187c325 --- /dev/null +++ b/mm/prfile.c @@ -0,0 +1,86 @@ @@ -39248,7 +39203,7 @@ index 000000000000..024cdcfae1b1 + * + * See Documentation/filesystems/aufs/design/06mmap.txt + * -+ * Copyright (c) 2014-2019 Junjro R. Okajima ++ * Copyright (c) 2014-2020 Junjro R. Okajima + * Copyright (c) 2014 Ian Campbell + */ +