diff --git a/0001-Apply-AUFS-5.patch b/0001-Apply-AUFS-5.patch index e150e59..190a5ce 100644 --- a/0001-Apply-AUFS-5.patch +++ b/0001-Apply-AUFS-5.patch @@ -1,8 +1,6 @@ -https://github.com/sfjro/aufs5-linux/commit/830620d2616bf10943ba30171702d08fff21e431 - -diff -Naur linux-5.16/Documentation/ABI/testing/debugfs-aufs aufs5-linux-aufs5.16/Documentation/ABI/testing/debugfs-aufs ---- linux-5.16/Documentation/ABI/testing/debugfs-aufs 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/ABI/testing/debugfs-aufs 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs +--- a/Documentation/ABI/testing/debugfs-aufs 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/ABI/testing/debugfs-aufs 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,55 @@ +What: /debug/aufs/si_/ +Date: March 2009 @@ -59,9 +57,9 @@ diff -Naur linux-5.16/Documentation/ABI/testing/debugfs-aufs aufs5-linux-aufs5.1 + be created. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur linux-5.16/Documentation/ABI/testing/sysfs-aufs aufs5-linux-aufs5.16/Documentation/ABI/testing/sysfs-aufs ---- linux-5.16/Documentation/ABI/testing/sysfs-aufs 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/ABI/testing/sysfs-aufs 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/Documentation/ABI/testing/sysfs-aufs b/Documentation/ABI/testing/sysfs-aufs +--- a/Documentation/ABI/testing/sysfs-aufs 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/ABI/testing/sysfs-aufs 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,31 @@ +What: /sys/fs/aufs/si_/ +Date: March 2009 @@ -94,12 +92,25 @@ diff -Naur linux-5.16/Documentation/ABI/testing/sysfs-aufs aufs5-linux-aufs5.16/ + even if it is the default path. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/01intro.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/01intro.txt ---- linux-5.16/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/01intro.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,158 @@ +diff -ruN a/Documentation/filesystems/aufs/design/01intro.txt b/Documentation/filesystems/aufs/design/01intro.txt +--- a/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/01intro.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,171 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Introduction +---------------------------------------- @@ -256,12 +267,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/01intro.txt aufs5-li +Some people may think it is better to pass such work to user space +helper, instead of doing in kernel space. Actually I am still thinking +about it. But currently I have implemented it in kernel space. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/02struct.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/02struct.txt ---- linux-5.16/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/02struct.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,245 @@ +diff -ruN a/Documentation/filesystems/aufs/design/02struct.txt b/Documentation/filesystems/aufs/design/02struct.txt +--- a/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/02struct.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,258 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Basic Aufs Internal Structure + @@ -505,12 +529,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/02struct.txt aufs5-l +- etc. + +For this purpose, use "aumvdown" command in aufs-util.git. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/03atomic_open.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/03atomic_open.txt ---- linux-5.16/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/03atomic_open.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,72 @@ +diff -ruN a/Documentation/filesystems/aufs/design/03atomic_open.txt b/Documentation/filesystems/aufs/design/03atomic_open.txt +--- a/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/03atomic_open.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,85 @@ + +# Copyright (C) 2015-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Support for a branch who has its ->atomic_open() +---------------------------------------------------------------------- @@ -581,12 +618,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/03atomic_open.txt au + ->atomic_open() are lost. in the ordinary case, the checks are + done by VFS:do_last(), lookup_open() and atomic_open(). some can + be implemented in aufs, but not all I am afraid. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/03lookup.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/03lookup.txt ---- linux-5.16/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/03lookup.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,100 @@ +diff -ruN a/Documentation/filesystems/aufs/design/03lookup.txt b/Documentation/filesystems/aufs/design/03lookup.txt +--- a/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/03lookup.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,113 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Lookup in a Branch +---------------------------------------------------------------------- @@ -685,12 +735,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/03lookup.txt aufs5-l + test, and skip the revalidation in step 4. It is useful and improves + aufs performance when system surely hide the aufs branches from user, + by over-mounting something (or another method). -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/04branch.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/04branch.txt ---- linux-5.16/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/04branch.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,61 @@ +diff -ruN a/Documentation/filesystems/aufs/design/04branch.txt b/Documentation/filesystems/aufs/design/04branch.txt +--- a/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/04branch.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,74 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Branch Manipulation + @@ -750,12 +813,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/04branch.txt aufs5-l + - a file on the branch is mmap-ed. + - a regular file on the branch is opened for write and there is no + same named entry on the upper branch. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/05wbr_policy.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/05wbr_policy.txt ---- linux-5.16/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/05wbr_policy.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,51 @@ +diff -ruN a/Documentation/filesystems/aufs/design/05wbr_policy.txt b/Documentation/filesystems/aufs/design/05wbr_policy.txt +--- a/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/05wbr_policy.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,64 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Policies to Select One among Multiple Writable Branches +---------------------------------------------------------------------- @@ -805,9 +881,9 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/05wbr_policy.txt auf + where the source and the target exists and selects the higher + one. If the selected branch is readonly, then aufs follows the + copyup policy. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06dirren.dot aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06dirren.dot ---- linux-5.16/Documentation/filesystems/aufs/design/06dirren.dot 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06dirren.dot 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/Documentation/filesystems/aufs/design/06dirren.dot b/Documentation/filesystems/aufs/design/06dirren.dot +--- a/Documentation/filesystems/aufs/design/06dirren.dot 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/06dirren.dot 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,31 @@ + +// to view this graph, run dot(1) command in GRAPHVIZ. @@ -840,12 +916,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06dirren.dot aufs5-l + +aufs_lookup -> whinfo [label="load/remove"]; +} -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06dirren.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06dirren.txt ---- linux-5.16/Documentation/filesystems/aufs/design/06dirren.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06dirren.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,89 @@ +diff -ruN a/Documentation/filesystems/aufs/design/06dirren.txt b/Documentation/filesystems/aufs/design/06dirren.txt +--- a/Documentation/filesystems/aufs/design/06dirren.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/06dirren.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,102 @@ + +# Copyright (C) 2017-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Special handling for renaming a directory (DIRREN) +---------------------------------------------------------------------- @@ -933,12 +1022,27 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06dirren.txt aufs5-l +contains two names, before- and after-rename, the name comparision in +UDBA handler may not work correctly. In this case, the behaviour will be +equivalen to udba=reval case. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06fhsm.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06fhsm.txt ---- linux-5.16/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06fhsm.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,105 @@ +diff -ruN a/Documentation/filesystems/aufs/design/06fhsm.txt b/Documentation/filesystems/aufs/design/06fhsm.txt +--- a/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/06fhsm.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,120 @@ + +# Copyright (C) 2011-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ + +File-based Hierarchical Storage Management (FHSM) +---------------------------------------------------------------------- @@ -1042,12 +1146,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06fhsm.txt aufs5-lin + +And of course, in every step, an error may happen. So the operation +should restore the original file state after an error happens. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06mmap.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06mmap.txt ---- linux-5.16/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06mmap.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,59 @@ +diff -ruN a/Documentation/filesystems/aufs/design/06mmap.txt b/Documentation/filesystems/aufs/design/06mmap.txt +--- a/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/06mmap.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,72 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +mmap(2) -- File Memory Mapping +---------------------------------------------------------------------- @@ -1105,12 +1222,27 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06mmap.txt aufs5-lin + equivalent to vm_prfile described above. + +I have to give up this "looks-smater" approach. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06xattr.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06xattr.txt ---- linux-5.16/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/06xattr.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,81 @@ +diff -ruN a/Documentation/filesystems/aufs/design/06xattr.txt b/Documentation/filesystems/aufs/design/06xattr.txt +--- a/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/06xattr.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,96 @@ + +# Copyright (C) 2014-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ + +Listing XATTR/EA and getting the value +---------------------------------------------------------------------- @@ -1190,12 +1322,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/06xattr.txt aufs5-li +Some contradiction may happen I am afraid. +Do we need another attribute to stop copying XATTR? I am unsure. For +now, aufs implements the branch attributes to ignore the error. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/07export.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/07export.txt ---- linux-5.16/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/07export.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,45 @@ +diff -ruN a/Documentation/filesystems/aufs/design/07export.txt b/Documentation/filesystems/aufs/design/07export.txt +--- a/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/07export.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,58 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Export Aufs via NFS +---------------------------------------------------------------------- @@ -1239,12 +1384,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/07export.txt aufs5-l + convert it into ESTALE for NFSD. +- readdir(): call lockdep_on/off() because filldir in NFSD calls + lookup_one_len(), vfs_getattr(), encode_fh() and others. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/08shwh.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/08shwh.txt ---- linux-5.16/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/08shwh.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,39 @@ +diff -ruN a/Documentation/filesystems/aufs/design/08shwh.txt b/Documentation/filesystems/aufs/design/08shwh.txt +--- a/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/08shwh.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,52 @@ + +# Copyright (C) 2005-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Show Whiteout Mode (shwh) +---------------------------------------------------------------------- @@ -1282,12 +1440,25 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/08shwh.txt aufs5-lin + +This new squashfs archive can be stored on the boot device and the +initramfs will use it to replace the old one at the next boot. -diff -Naur linux-5.16/Documentation/filesystems/aufs/design/10dynop.txt aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/10dynop.txt ---- linux-5.16/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/design/10dynop.txt 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,34 @@ +diff -ruN a/Documentation/filesystems/aufs/design/10dynop.txt b/Documentation/filesystems/aufs/design/10dynop.txt +--- a/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/design/10dynop.txt 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,47 @@ + +# Copyright (C) 2010-2021 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 ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . + +Dynamically customizable FS operations +---------------------------------------------------------------------- @@ -1320,9 +1491,9 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/design/10dynop.txt aufs5-li +XIP (DAX) mainly. +Currently this approach is applied to address_space_operations for +regular files only. -diff -Naur linux-5.16/Documentation/filesystems/aufs/README aufs5-linux-aufs5.16/Documentation/filesystems/aufs/README ---- linux-5.16/Documentation/filesystems/aufs/README 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/Documentation/filesystems/aufs/README 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README +--- a/Documentation/filesystems/aufs/README 1970-01-01 03:00:00.000000000 +0300 ++++ b/Documentation/filesystems/aufs/README 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,396 @@ + +Aufs5 -- advanced multi layered unification filesystem version 5.x @@ -1720,10 +1891,76 @@ diff -Naur linux-5.16/Documentation/filesystems/aufs/README aufs5-linux-aufs5.16 +# Local variables: ; +# mode: text; +# End: ; -diff -Naur linux-5.16/drivers/block/loop.c aufs5-linux-aufs5.16/drivers/block/loop.c ---- linux-5.16/drivers/block/loop.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/drivers/block/loop.c 2022-03-07 14:27:53.000000000 +0300 -@@ -635,6 +635,24 @@ +diff -ruN a/drivers/block/loop.c b/drivers/block/loop.c +--- a/drivers/block/loop.c 2022-04-23 14:19:55.303931933 +0300 ++++ b/drivers/block/loop.c 2022-04-23 14:24:51.843335453 +0300 +@@ -510,6 +510,15 @@ + lo->use_dio); + } + ++static struct file *loop_real_file(struct file *file) ++{ ++ struct file *f = NULL; ++ ++ if (file->f_path.dentry->d_sb->s_op->real_loop) ++ f = file->f_path.dentry->d_sb->s_op->real_loop(file); ++ return f; ++} ++ + static void loop_reread_partitions(struct loop_device *lo) + { + int rc; +@@ -567,6 +576,7 @@ + { + struct file *file = fget(arg); + struct file *old_file; ++ struct file *f, *virt_file = NULL, *old_virt_file; + int error; + bool partscan; + bool is_loop; +@@ -586,11 +596,19 @@ + if (!(lo->lo_flags & LO_FLAGS_READ_ONLY)) + goto out_err; + ++ f = loop_real_file(file); ++ if (f) { ++ virt_file = file; ++ file = f; ++ get_file(file); ++ } ++ + error = loop_validate_file(file, bdev); + if (error) + goto out_err; + + old_file = lo->lo_backing_file; ++ old_virt_file = lo->lo_backing_virt_file; + + error = -EINVAL; + +@@ -603,6 +621,7 @@ + blk_mq_freeze_queue(lo->lo_queue); + mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask); + lo->lo_backing_file = file; ++ lo->lo_backing_virt_file = virt_file; + 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)); +@@ -625,6 +644,8 @@ + * dependency. + */ + fput(old_file); ++ if (old_virt_file) ++ fput(old_virt_file); + if (partscan) + loop_reread_partitions(lo); + return 0; +@@ -633,9 +654,29 @@ + loop_global_unlock(lo, is_loop); + out_putf: + fput(file); ++ if (virt_file) ++ fput(virt_file); return error; } @@ -1748,13 +1985,102 @@ diff -Naur linux-5.16/drivers/block/loop.c aufs5-linux-aufs5.16/drivers/block/lo /* loop sysfs attributes */ static ssize_t loop_attr_show(struct device *dev, char *page, -diff -Naur linux-5.16/fs/aufs/aufs.h aufs5-linux-aufs5.16/fs/aufs/aufs.h ---- linux-5.16/fs/aufs/aufs.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/aufs.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,49 @@ +@@ -953,6 +994,7 @@ + const struct loop_config *config) + { + struct file *file = fget(config->fd); ++ struct file *f, *virt_file = NULL; + struct inode *inode; + struct address_space *mapping; + int error; +@@ -968,6 +1010,13 @@ + /* This is safe, since we have a reference from open(). */ + __module_get(THIS_MODULE); + ++ f = loop_real_file(file); ++ if (f) { ++ virt_file = file; ++ file = f; ++ get_file(file); ++ } ++ + /* + * If we don't hold exclusive handle for the device, upgrade to it + * here to avoid changing device under exclusive owner. +@@ -1033,6 +1082,7 @@ + lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO; + lo->lo_device = bdev; + lo->lo_backing_file = file; ++ lo->lo_backing_virt_file = virt_file; + lo->old_gfp_mask = mapping_gfp_mask(mapping); + mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); + +@@ -1083,6 +1133,8 @@ + bd_abort_claiming(bdev, loop_configure); + out_putf: + fput(file); ++ if (virt_file) ++ fput(virt_file); + /* This is safe: open() is still holding a reference. */ + module_put(THIS_MODULE); + return error; +@@ -1091,6 +1143,7 @@ + static int __loop_clr_fd(struct loop_device *lo, bool release) + { + struct file *filp = NULL; ++ struct file *virt_filp = lo->lo_backing_virt_file; + gfp_t gfp = lo->old_gfp_mask; + int err = 0; + bool partscan = false; +@@ -1141,6 +1194,7 @@ + + spin_lock_irq(&lo->lo_lock); + lo->lo_backing_file = NULL; ++ lo->lo_backing_virt_file = NULL; + spin_unlock_irq(&lo->lo_lock); + + lo->lo_device = NULL; +@@ -1208,6 +1262,8 @@ + */ + if (filp) + fput(filp); ++ if (virt_filp) ++ fput(virt_filp); + return err; + } + +diff -ruN a/drivers/block/loop.h b/drivers/block/loop.h +--- a/drivers/block/loop.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/drivers/block/loop.h 2022-04-23 14:24:51.843335453 +0300 +@@ -34,7 +34,7 @@ + int lo_flags; + char lo_file_name[LO_NAME_SIZE]; + +- struct file * lo_backing_file; ++ struct file *lo_backing_file, *lo_backing_virt_file; + struct block_device *lo_device; + + gfp_t old_gfp_mask; +diff -ruN a/fs/aufs/aufs.h b/fs/aufs/aufs.h +--- a/fs/aufs/aufs.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/aufs.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -1801,13 +2127,26 @@ diff -Naur linux-5.16/fs/aufs/aufs.h aufs5-linux-aufs5.16/fs/aufs/aufs.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_H__ */ -diff -Naur linux-5.16/fs/aufs/branch.c aufs5-linux-aufs5.16/fs/aufs/branch.c ---- linux-5.16/fs/aufs/branch.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/branch.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1414 @@ +diff -ruN a/fs/aufs/branch.c b/fs/aufs/branch.c +--- a/fs/aufs/branch.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/branch.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -3219,13 +3558,26 @@ diff -Naur linux-5.16/fs/aufs/branch.c aufs5-linux-aufs5.16/fs/aufs/branch.c + + return err; +} -diff -Naur linux-5.16/fs/aufs/branch.h aufs5-linux-aufs5.16/fs/aufs/branch.h ---- linux-5.16/fs/aufs/branch.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/branch.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,362 @@ +diff -ruN a/fs/aufs/branch.h b/fs/aufs/branch.h +--- a/fs/aufs/branch.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/branch.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,375 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -3585,13 +3937,70 @@ diff -Naur linux-5.16/fs/aufs/branch.h aufs5-linux-aufs5.16/fs/aufs/branch.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_BRANCH_H__ */ -diff -Naur linux-5.16/fs/aufs/cpup.c aufs5-linux-aufs5.16/fs/aufs/cpup.c ---- linux-5.16/fs/aufs/cpup.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/cpup.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1446 @@ +diff -ruN a/fs/aufs/conf.mk b/fs/aufs/conf.mk +--- a/fs/aufs/conf.mk 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/conf.mk 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,40 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ ++AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS} ++ ++define AuConf ++ifdef ${1} ++AuConfStr += ${1}=${${1}} ++endif ++endef ++ ++AuConfAll = BRANCH_MAX_127 BRANCH_MAX_511 BRANCH_MAX_1023 BRANCH_MAX_32767 \ ++ SBILIST \ ++ HNOTIFY HFSNOTIFY \ ++ EXPORT INO_T_64 \ ++ XATTR \ ++ FHSM \ ++ RDU \ ++ DIRREN \ ++ SHWH \ ++ BR_RAMFS \ ++ BR_FUSE POLL \ ++ BR_HFSPLUS \ ++ BDEV_LOOP \ ++ DEBUG MAGIC_SYSRQ ++$(foreach i, ${AuConfAll}, \ ++ $(eval $(call AuConf,CONFIG_AUFS_${i}))) ++ ++AuConfName = ${obj}/conf.str ++${AuConfName}.tmp: FORCE ++ @echo ${AuConfStr} | tr ' ' '\n' | sed -e 's/^/"/' -e 's/$$/\\n"/' > $@ ++${AuConfName}: ${AuConfName}.tmp ++ @diff -q $< $@ > /dev/null 2>&1 || { \ ++ echo ' GEN ' $@; \ ++ cp -p $< $@; \ ++ } ++FORCE: ++clean-files += ${AuConfName} ${AuConfName}.tmp ++${obj}/sysfs.o: ${AuConfName} ++ ++-include ${srctree}/${src}/conf_priv.mk +diff -ruN a/fs/aufs/cpup.c b/fs/aufs/cpup.c +--- a/fs/aufs/cpup.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/cpup.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1459 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -5035,13 +5444,26 @@ diff -Naur linux-5.16/fs/aufs/cpup.c aufs5-linux-aufs5.16/fs/aufs/cpup.c + dput(parent); + return err; +} -diff -Naur linux-5.16/fs/aufs/cpup.h aufs5-linux-aufs5.16/fs/aufs/cpup.h ---- linux-5.16/fs/aufs/cpup.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/cpup.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,87 @@ +diff -ruN a/fs/aufs/cpup.h b/fs/aufs/cpup.h +--- a/fs/aufs/cpup.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/cpup.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,100 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -5126,13 +5548,26 @@ diff -Naur linux-5.16/fs/aufs/cpup.h aufs5-linux-aufs5.16/fs/aufs/cpup.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_CPUP_H__ */ -diff -Naur linux-5.16/fs/aufs/dbgaufs.c aufs5-linux-aufs5.16/fs/aufs/dbgaufs.c ---- linux-5.16/fs/aufs/dbgaufs.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dbgaufs.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,513 @@ +diff -ruN a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c +--- a/fs/aufs/dbgaufs.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dbgaufs.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,526 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -5643,13 +6078,26 @@ diff -Naur linux-5.16/fs/aufs/dbgaufs.c aufs5-linux-aufs5.16/fs/aufs/dbgaufs.c + err = 0; + return err; +} -diff -Naur linux-5.16/fs/aufs/dbgaufs.h aufs5-linux-aufs5.16/fs/aufs/dbgaufs.h ---- linux-5.16/fs/aufs/dbgaufs.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dbgaufs.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,40 @@ +diff -ruN a/fs/aufs/dbgaufs.h b/fs/aufs/dbgaufs.h +--- a/fs/aufs/dbgaufs.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dbgaufs.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -5687,13 +6135,26 @@ diff -Naur linux-5.16/fs/aufs/dbgaufs.h aufs5-linux-aufs5.16/fs/aufs/dbgaufs.h + +#endif /* __KERNEL__ */ +#endif /* __DBGAUFS_H__ */ -diff -Naur linux-5.16/fs/aufs/dcsub.c aufs5-linux-aufs5.16/fs/aufs/dcsub.c ---- linux-5.16/fs/aufs/dcsub.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dcsub.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,212 @@ +diff -ruN a/fs/aufs/dcsub.c b/fs/aufs/dcsub.c +--- a/fs/aufs/dcsub.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dcsub.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,225 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -5903,13 +6364,26 @@ diff -Naur linux-5.16/fs/aufs/dcsub.c aufs5-linux-aufs5.16/fs/aufs/dcsub.c + + return path_is_under(path + 0, path + 1); +} -diff -Naur linux-5.16/fs/aufs/dcsub.h aufs5-linux-aufs5.16/fs/aufs/dcsub.h ---- linux-5.16/fs/aufs/dcsub.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dcsub.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,124 @@ +diff -ruN a/fs/aufs/dcsub.h b/fs/aufs/dcsub.h +--- a/fs/aufs/dcsub.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dcsub.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,137 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -6031,13 +6505,26 @@ diff -Naur linux-5.16/fs/aufs/dcsub.h aufs5-linux-aufs5.16/fs/aufs/dcsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DCSUB_H__ */ -diff -Naur linux-5.16/fs/aufs/debug.c aufs5-linux-aufs5.16/fs/aufs/debug.c ---- linux-5.16/fs/aufs/debug.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/debug.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,431 @@ +diff -ruN a/fs/aufs/debug.c b/fs/aufs/debug.c +--- a/fs/aufs/debug.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/debug.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,444 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -6466,13 +6953,26 @@ diff -Naur linux-5.16/fs/aufs/debug.c aufs5-linux-aufs5.16/fs/aufs/debug.c + + return 0; +} -diff -Naur linux-5.16/fs/aufs/debug.h aufs5-linux-aufs5.16/fs/aufs/debug.h ---- linux-5.16/fs/aufs/debug.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/debug.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,213 @@ +diff -ruN a/fs/aufs/debug.h b/fs/aufs/debug.h +--- a/fs/aufs/debug.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/debug.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,226 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -6683,13 +7183,26 @@ diff -Naur linux-5.16/fs/aufs/debug.h aufs5-linux-aufs5.16/fs/aufs/debug.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ -diff -Naur linux-5.16/fs/aufs/dentry.c aufs5-linux-aufs5.16/fs/aufs/dentry.c ---- linux-5.16/fs/aufs/dentry.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dentry.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1155 @@ +diff -ruN a/fs/aufs/dentry.c b/fs/aufs/dentry.c +--- a/fs/aufs/dentry.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dentry.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1168 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -7842,13 +8355,26 @@ diff -Naur linux-5.16/fs/aufs/dentry.c aufs5-linux-aufs5.16/fs/aufs/dentry.c +const struct dentry_operations aufs_dop_noreval = { + .d_release = aufs_d_release +}; -diff -Naur linux-5.16/fs/aufs/dentry.h aufs5-linux-aufs5.16/fs/aufs/dentry.h ---- linux-5.16/fs/aufs/dentry.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dentry.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,256 @@ +diff -ruN a/fs/aufs/dentry.h b/fs/aufs/dentry.h +--- a/fs/aufs/dentry.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dentry.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,269 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -8102,13 +8628,26 @@ diff -Naur linux-5.16/fs/aufs/dentry.h aufs5-linux-aufs5.16/fs/aufs/dentry.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DENTRY_H__ */ -diff -Naur linux-5.16/fs/aufs/dinfo.c aufs5-linux-aufs5.16/fs/aufs/dinfo.c ---- linux-5.16/fs/aufs/dinfo.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dinfo.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,541 @@ +diff -ruN a/fs/aufs/dinfo.c b/fs/aufs/dinfo.c +--- a/fs/aufs/dinfo.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dinfo.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,554 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -8647,13 +9186,26 @@ diff -Naur linux-5.16/fs/aufs/dinfo.c aufs5-linux-aufs5.16/fs/aufs/dinfo.c + return bindex; + return -1; +} -diff -Naur linux-5.16/fs/aufs/dir.c aufs5-linux-aufs5.16/fs/aufs/dir.c ---- linux-5.16/fs/aufs/dir.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dir.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,752 @@ +diff -ruN a/fs/aufs/dir.c b/fs/aufs/dir.c +--- a/fs/aufs/dir.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dir.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,765 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -9403,13 +9955,26 @@ diff -Naur linux-5.16/fs/aufs/dir.c aufs5-linux-aufs5.16/fs/aufs/dir.c + .flush = aufs_flush_dir, + .fsync = aufs_fsync_dir +}; -diff -Naur linux-5.16/fs/aufs/dir.h aufs5-linux-aufs5.16/fs/aufs/dir.h ---- linux-5.16/fs/aufs/dir.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dir.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,121 @@ +diff -ruN a/fs/aufs/dir.h b/fs/aufs/dir.h +--- a/fs/aufs/dir.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dir.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,134 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -9528,13 +10093,26 @@ diff -Naur linux-5.16/fs/aufs/dir.h aufs5-linux-aufs5.16/fs/aufs/dir.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIR_H__ */ -diff -Naur linux-5.16/fs/aufs/dirren.c aufs5-linux-aufs5.16/fs/aufs/dirren.c ---- linux-5.16/fs/aufs/dirren.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dirren.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1302 @@ +diff -ruN a/fs/aufs/dirren.c b/fs/aufs/dirren.c +--- a/fs/aufs/dirren.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dirren.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1315 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -10834,13 +11412,26 @@ diff -Naur linux-5.16/fs/aufs/dirren.c aufs5-linux-aufs5.16/fs/aufs/dirren.c +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/dirren.h aufs5-linux-aufs5.16/fs/aufs/dirren.h ---- linux-5.16/fs/aufs/dirren.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dirren.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,127 @@ +diff -ruN a/fs/aufs/dirren.h b/fs/aufs/dirren.h +--- a/fs/aufs/dirren.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dirren.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,140 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2017-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -10965,13 +11556,26 @@ diff -Naur linux-5.16/fs/aufs/dirren.h aufs5-linux-aufs5.16/fs/aufs/dirren.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIRREN_H__ */ -diff -Naur linux-5.16/fs/aufs/dynop.c aufs5-linux-aufs5.16/fs/aufs/dynop.c ---- linux-5.16/fs/aufs/dynop.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dynop.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,355 @@ +diff -ruN a/fs/aufs/dynop.c b/fs/aufs/dynop.c +--- a/fs/aufs/dynop.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dynop.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,368 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -11324,13 +11928,26 @@ diff -Naur linux-5.16/fs/aufs/dynop.c aufs5-linux-aufs5.16/fs/aufs/dynop.c + for (i = 0; i < AuDyLast; i++) + WARN_ON(!hlist_bl_empty(dynop + i)); +} -diff -Naur linux-5.16/fs/aufs/dynop.h aufs5-linux-aufs5.16/fs/aufs/dynop.h ---- linux-5.16/fs/aufs/dynop.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/dynop.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,64 @@ +diff -ruN a/fs/aufs/dynop.h b/fs/aufs/dynop.h +--- a/fs/aufs/dynop.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/dynop.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2010-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -11392,13 +12009,26 @@ diff -Naur linux-5.16/fs/aufs/dynop.h aufs5-linux-aufs5.16/fs/aufs/dynop.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DYNOP_H__ */ -diff -Naur linux-5.16/fs/aufs/export.c aufs5-linux-aufs5.16/fs/aufs/export.c ---- linux-5.16/fs/aufs/export.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/export.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,817 @@ +diff -ruN a/fs/aufs/export.c b/fs/aufs/export.c +--- a/fs/aufs/export.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/export.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -12213,13 +12843,27 @@ diff -Naur linux-5.16/fs/aufs/export.c aufs5-linux-aufs5.16/fs/aufs/export.c + BUILD_BUG_ON(sizeof(u) != sizeof(int)); + atomic_set(&sbinfo->si_xigen_next, u); +} -diff -Naur linux-5.16/fs/aufs/fhsm.c aufs5-linux-aufs5.16/fs/aufs/fhsm.c ---- linux-5.16/fs/aufs/fhsm.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/fhsm.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,413 @@ +diff -ruN a/fs/aufs/fhsm.c b/fs/aufs/fhsm.c +--- a/fs/aufs/fhsm.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/fhsm.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,427 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2011-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* @@ -12630,13 +13274,26 @@ diff -Naur linux-5.16/fs/aufs/fhsm.c aufs5-linux-aufs5.16/fs/aufs/fhsm.c + if (u != AUFS_FHSM_CACHE_DEF_SEC) + seq_printf(seq, ",fhsm_sec=%u", u); +} -diff -Naur linux-5.16/fs/aufs/file.c aufs5-linux-aufs5.16/fs/aufs/file.c ---- linux-5.16/fs/aufs/file.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/file.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,850 @@ +diff -ruN a/fs/aufs/file.c b/fs/aufs/file.c +--- a/fs/aufs/file.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/file.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,863 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -13484,13 +14141,26 @@ diff -Naur linux-5.16/fs/aufs/file.c aufs5-linux-aufs5.16/fs/aufs/file.c + .swap_deactivate = aufs_swap_deactivate +#endif /* CONFIG_AUFS_DEBUG */ +}; -diff -Naur linux-5.16/fs/aufs/file.h aufs5-linux-aufs5.16/fs/aufs/file.h ---- linux-5.16/fs/aufs/file.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/file.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,329 @@ +diff -ruN a/fs/aufs/file.h b/fs/aufs/file.h +--- a/fs/aufs/file.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/file.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,342 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -13817,13 +14487,26 @@ diff -Naur linux-5.16/fs/aufs/file.h aufs5-linux-aufs5.16/fs/aufs/file.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_FILE_H__ */ -diff -Naur linux-5.16/fs/aufs/finfo.c aufs5-linux-aufs5.16/fs/aufs/finfo.c ---- linux-5.16/fs/aufs/finfo.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/finfo.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,136 @@ +diff -ruN a/fs/aufs/finfo.c b/fs/aufs/finfo.c +--- a/fs/aufs/finfo.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/finfo.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -13957,13 +14640,26 @@ diff -Naur linux-5.16/fs/aufs/finfo.c aufs5-linux-aufs5.16/fs/aufs/finfo.c +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/f_op.c aufs5-linux-aufs5.16/fs/aufs/f_op.c ---- linux-5.16/fs/aufs/f_op.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/f_op.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,758 @@ +diff -ruN a/fs/aufs/f_op.c b/fs/aufs/f_op.c +--- a/fs/aufs/f_op.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/f_op.c 2022-04-23 14:24:51.843335453 +0300 +@@ -0,0 +1,771 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -14264,7 +14960,7 @@ diff -Naur linux-5.16/fs/aufs/f_op.c aufs5-linux-aufs5.16/fs/aufs/f_op.c + if (IS_ERR(h_file)) + goto out; + -+ if (au_test_loopback_kthread()) { ++ if (0 && au_test_loopback_kthread()) { + au_warn_loopback(h_file->f_path.dentry->d_sb); + if (file->f_mapping != h_file->f_mapping) { + file->f_mapping = h_file->f_mapping; @@ -14719,13 +15415,26 @@ diff -Naur linux-5.16/fs/aufs/f_op.c aufs5-linux-aufs5.16/fs/aufs/f_op.c + .fallocate = aufs_fallocate, + .copy_file_range = aufs_copy_file_range +}; -diff -Naur linux-5.16/fs/aufs/fsctx.c aufs5-linux-aufs5.16/fs/aufs/fsctx.c ---- linux-5.16/fs/aufs/fsctx.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/fsctx.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1229 @@ +diff -ruN a/fs/aufs/fsctx.c b/fs/aufs/fsctx.c +--- a/fs/aufs/fsctx.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/fsctx.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1242 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -15952,13 +16661,26 @@ diff -Naur linux-5.16/fs/aufs/fsctx.c aufs5-linux-aufs5.16/fs/aufs/fsctx.c + AuTraceErr(err); + return err; +} -diff -Naur linux-5.16/fs/aufs/fstype.h aufs5-linux-aufs5.16/fs/aufs/fstype.h ---- linux-5.16/fs/aufs/fstype.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/fstype.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,388 @@ +diff -ruN a/fs/aufs/fstype.h b/fs/aufs/fstype.h +--- a/fs/aufs/fstype.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/fstype.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,401 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -16344,13 +17066,26 @@ diff -Naur linux-5.16/fs/aufs/fstype.h aufs5-linux-aufs5.16/fs/aufs/fstype.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_FSTYPE_H__ */ -diff -Naur linux-5.16/fs/aufs/hbl.h aufs5-linux-aufs5.16/fs/aufs/hbl.h ---- linux-5.16/fs/aufs/hbl.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/hbl.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,52 @@ +diff -ruN a/fs/aufs/hbl.h b/fs/aufs/hbl.h +--- a/fs/aufs/hbl.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/hbl.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2017-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -16400,13 +17135,26 @@ diff -Naur linux-5.16/fs/aufs/hbl.h aufs5-linux-aufs5.16/fs/aufs/hbl.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_HBL_H__ */ -diff -Naur linux-5.16/fs/aufs/hfsnotify.c aufs5-linux-aufs5.16/fs/aufs/hfsnotify.c ---- linux-5.16/fs/aufs/hfsnotify.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/hfsnotify.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,276 @@ +diff -ruN a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c +--- a/fs/aufs/hfsnotify.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/hfsnotify.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,289 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -16680,13 +17428,26 @@ diff -Naur linux-5.16/fs/aufs/hfsnotify.c aufs5-linux-aufs5.16/fs/aufs/hfsnotify + .fin_br = au_hfsn_fin_br, + .init_br = au_hfsn_init_br +}; -diff -Naur linux-5.16/fs/aufs/hfsplus.c aufs5-linux-aufs5.16/fs/aufs/hfsplus.c ---- linux-5.16/fs/aufs/hfsplus.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/hfsplus.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,47 @@ +diff -ruN a/fs/aufs/hfsplus.c b/fs/aufs/hfsplus.c +--- a/fs/aufs/hfsplus.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/hfsplus.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -16731,13 +17492,26 @@ diff -Naur linux-5.16/fs/aufs/hfsplus.c aufs5-linux-aufs5.16/fs/aufs/hfsplus.c + au_lcnt_dec(&br->br_nfiles); + } +} -diff -Naur linux-5.16/fs/aufs/hnotify.c aufs5-linux-aufs5.16/fs/aufs/hnotify.c ---- linux-5.16/fs/aufs/hnotify.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/hnotify.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,702 @@ +diff -ruN a/fs/aufs/hnotify.c b/fs/aufs/hnotify.c +--- a/fs/aufs/hnotify.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/hnotify.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,715 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -17437,13 +18211,26 @@ diff -Naur linux-5.16/fs/aufs/hnotify.c aufs5-linux-aufs5.16/fs/aufs/hnotify.c + if (au_cache[AuCache_HNOTIFY]) + au_hn_destroy_cache(); +} -diff -Naur linux-5.16/fs/aufs/iinfo.c aufs5-linux-aufs5.16/fs/aufs/iinfo.c ---- linux-5.16/fs/aufs/iinfo.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/iinfo.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,273 @@ +diff -ruN a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c +--- a/fs/aufs/iinfo.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/iinfo.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -17714,13 +18501,26 @@ diff -Naur linux-5.16/fs/aufs/iinfo.c aufs5-linux-aufs5.16/fs/aufs/iinfo.c + au_kfree_rcu(iinfo->ii_hinode); + AuRwDestroy(&iinfo->ii_rwsem); +} -diff -Naur linux-5.16/fs/aufs/inode.c aufs5-linux-aufs5.16/fs/aufs/inode.c ---- linux-5.16/fs/aufs/inode.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/inode.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,518 @@ +diff -ruN a/fs/aufs/inode.c b/fs/aufs/inode.c +--- a/fs/aufs/inode.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/inode.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,531 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -18236,13 +19036,26 @@ diff -Naur linux-5.16/fs/aufs/inode.c aufs5-linux-aufs5.16/fs/aufs/inode.c + mask |= MAY_READ; /* force permission check */ + return au_test_h_perm(h_userns, h_inode, mask); +} -diff -Naur linux-5.16/fs/aufs/inode.h aufs5-linux-aufs5.16/fs/aufs/inode.h ---- linux-5.16/fs/aufs/inode.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/inode.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,692 @@ +diff -ruN a/fs/aufs/inode.h b/fs/aufs/inode.h +--- a/fs/aufs/inode.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/inode.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,705 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -18932,13 +19745,26 @@ diff -Naur linux-5.16/fs/aufs/inode.h aufs5-linux-aufs5.16/fs/aufs/inode.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_INODE_H__ */ -diff -Naur linux-5.16/fs/aufs/ioctl.c aufs5-linux-aufs5.16/fs/aufs/ioctl.c ---- linux-5.16/fs/aufs/ioctl.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/ioctl.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,207 @@ +diff -ruN a/fs/aufs/ioctl.c b/fs/aufs/ioctl.c +--- a/fs/aufs/ioctl.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/ioctl.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,220 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -19143,13 +19969,26 @@ diff -Naur linux-5.16/fs/aufs/ioctl.c aufs5-linux-aufs5.16/fs/aufs/ioctl.c + return aufs_ioctl_nondir(file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif -diff -Naur linux-5.16/fs/aufs/i_op_add.c aufs5-linux-aufs5.16/fs/aufs/i_op_add.c ---- linux-5.16/fs/aufs/i_op_add.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/i_op_add.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,928 @@ +diff -ruN a/fs/aufs/i_op_add.c b/fs/aufs/i_op_add.c +--- a/fs/aufs/i_op_add.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/i_op_add.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,941 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -20075,13 +20914,26 @@ diff -Naur linux-5.16/fs/aufs/i_op_add.c aufs5-linux-aufs5.16/fs/aufs/i_op_add.c +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/i_op.c aufs5-linux-aufs5.16/fs/aufs/i_op.c ---- linux-5.16/fs/aufs/i_op.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/i_op.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1499 @@ +diff -ruN a/fs/aufs/i_op.c b/fs/aufs/i_op.c +--- a/fs/aufs/i_op.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/i_op.c 2022-04-23 14:25:12.850370756 +0300 +@@ -0,0 +1,1516 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -20704,7 +21556,11 @@ diff -Naur linux-5.16/fs/aufs/i_op.c aufs5-linux-aufs5.16/fs/aufs/i_op.c + +static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task) +{ ++#ifdef CONFIG_PREEMPT_RT ++ p->hdir->hi_inode->i_rwsem.rwbase.rtmutex.owner = task; ++#else + atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task); ++#endif +} + +void au_pin_hdir_acquire_nest(struct au_pin *p) @@ -21578,13 +22434,26 @@ diff -Naur linux-5.16/fs/aufs/i_op.c aufs5-linux-aufs5.16/fs/aufs/i_op.c + .update_time = aufs_update_time + } +}; -diff -Naur linux-5.16/fs/aufs/i_op_del.c aufs5-linux-aufs5.16/fs/aufs/i_op_del.c ---- linux-5.16/fs/aufs/i_op_del.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/i_op_del.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,509 @@ +diff -ruN a/fs/aufs/i_op_del.c b/fs/aufs/i_op_del.c +--- a/fs/aufs/i_op_del.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/i_op_del.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,522 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -22091,13 +22960,26 @@ diff -Naur linux-5.16/fs/aufs/i_op_del.c aufs5-linux-aufs5.16/fs/aufs/i_op_del.c + AuTraceErr(err); + return err; +} -diff -Naur linux-5.16/fs/aufs/i_op_ren.c aufs5-linux-aufs5.16/fs/aufs/i_op_ren.c ---- linux-5.16/fs/aufs/i_op_ren.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/i_op_ren.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1244 @@ +diff -ruN a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c +--- a/fs/aufs/i_op_ren.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/i_op_ren.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1257 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -23339,13 +24221,13 @@ diff -Naur linux-5.16/fs/aufs/i_op_ren.c aufs5-linux-aufs5.16/fs/aufs/i_op_ren.c + AuTraceErr(err); + return err; +} -diff -Naur linux-5.16/fs/aufs/Kconfig aufs5-linux-aufs5.16/fs/aufs/Kconfig ---- linux-5.16/fs/aufs/Kconfig 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/Kconfig 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/aufs/Kconfig b/fs/aufs/Kconfig +--- a/fs/aufs/Kconfig 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/Kconfig 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: GPL-2.0 +config AUFS_FS -+ bool "Aufs (Advanced multi layered unification filesystem) support" ++ tristate "Aufs (Advanced multi layered unification filesystem) support" + help + Aufs is a stackable unification filesystem such as Unionfs, + which unifies several directories and provides a merged single @@ -23417,7 +24299,7 @@ diff -Naur linux-5.16/fs/aufs/Kconfig aufs5-linux-aufs5.16/fs/aufs/Kconfig + +config AUFS_EXPORT + bool "NFS-exportable aufs" -+ depends on EXPORTFS = y ++ depends on EXPORTFS + help + If you want to export your mounted aufs via NFS, then enable this + option. There are several requirements for this configuration. @@ -23542,13 +24424,26 @@ diff -Naur linux-5.16/fs/aufs/Kconfig aufs5-linux-aufs5.16/fs/aufs/Kconfig + Automatic configuration for internal use. + When aufs supports Magic SysRq, enabled automatically. +endif -diff -Naur linux-5.16/fs/aufs/lcnt.h aufs5-linux-aufs5.16/fs/aufs/lcnt.h ---- linux-5.16/fs/aufs/lcnt.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/lcnt.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,173 @@ +diff -ruN a/fs/aufs/lcnt.h b/fs/aufs/lcnt.h +--- a/fs/aufs/lcnt.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/lcnt.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,186 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -23719,13 +24614,26 @@ diff -Naur linux-5.16/fs/aufs/lcnt.h aufs5-linux-aufs5.16/fs/aufs/lcnt.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_LCNT_H__ */ -diff -Naur linux-5.16/fs/aufs/loop.c aufs5-linux-aufs5.16/fs/aufs/loop.c ---- linux-5.16/fs/aufs/loop.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/loop.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,135 @@ +diff -ruN a/fs/aufs/loop.c b/fs/aufs/loop.c +--- a/fs/aufs/loop.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/loop.c 2022-04-23 14:24:51.843335453 +0300 +@@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -23858,13 +24766,42 @@ diff -Naur linux-5.16/fs/aufs/loop.c aufs5-linux-aufs5.16/fs/aufs/loop.c + symbol_put(loop_backing_file); + au_kfree_try_rcu(au_warn_loopback_array); +} -diff -Naur linux-5.16/fs/aufs/loop.h aufs5-linux-aufs5.16/fs/aufs/loop.h ---- linux-5.16/fs/aufs/loop.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/loop.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,42 @@ ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* support the loopback block device insude aufs */ ++ ++struct file *aufs_real_loop(struct file *file) ++{ ++ struct file *f; ++ ++ BUG_ON(!au_test_aufs(file->f_path.dentry->d_sb)); ++ fi_read_lock(file); ++ f = au_hf_top(file); ++ fi_read_unlock(file); ++ AuDebugOn(!f); ++ return f; ++} +diff -ruN a/fs/aufs/loop.h b/fs/aufs/loop.h +--- a/fs/aufs/loop.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/loop.h 2022-04-23 14:24:51.843335453 +0300 +@@ -0,0 +1,59 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -23890,6 +24827,8 @@ diff -Naur linux-5.16/fs/aufs/loop.h aufs5-linux-aufs5.16/fs/aufs/loop.h + +int au_loopback_init(void); +void au_loopback_fin(void); ++ ++struct file *aufs_real_loop(struct file *file); +#else +AuStub(struct file *, loop_backing_file, return NULL, struct super_block *sb) + @@ -23900,13 +24839,15 @@ diff -Naur linux-5.16/fs/aufs/loop.h aufs5-linux-aufs5.16/fs/aufs/loop.h + +AuStubInt0(au_loopback_init, void) +AuStubVoid(au_loopback_fin, void) ++ ++AuStub(struct file *, aufs_real_loop, return NULL, struct file *file) +#endif /* BLK_DEV_LOOP */ + +#endif /* __KERNEL__ */ +#endif /* __AUFS_LOOP_H__ */ -diff -Naur linux-5.16/fs/aufs/magic.mk aufs5-linux-aufs5.16/fs/aufs/magic.mk ---- linux-5.16/fs/aufs/magic.mk 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/magic.mk 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/aufs/magic.mk b/fs/aufs/magic.mk +--- a/fs/aufs/magic.mk 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/magic.mk 2022-04-02 02:40:00.000000000 +0300 @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -23939,20 +24880,27 @@ diff -Naur linux-5.16/fs/aufs/magic.mk aufs5-linux-aufs5.16/fs/aufs/magic.mk +ifdef CONFIG_HFSPLUS_FS +ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b +endif -diff -Naur linux-5.16/fs/aufs/Makefile aufs5-linux-aufs5.16/fs/aufs/Makefile ---- linux-5.16/fs/aufs/Makefile 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/Makefile 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,39 @@ +diff -ruN a/fs/aufs/Makefile b/fs/aufs/Makefile +--- a/fs/aufs/Makefile 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/Makefile 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 + -+include ${srctree}/${src}/magic.mk -+-include ${srctree}/${src}/priv_def.mk ++include ${src}/magic.mk ++ifeq (${CONFIG_AUFS_FS},m) ++include ${src}/conf.mk ++endif ++-include ${src}/priv_def.mk + +# cf. include/linux/kernel.h +# enable pr_debug +ccflags-y += -DDEBUG +# sparse requires the full pathname ++ifdef M ++ccflags-y += -include ${M}/../../include/uapi/linux/aufs_type.h ++else +ccflags-y += -include ${srctree}/include/uapi/linux/aufs_type.h ++endif + +obj-$(CONFIG_AUFS_FS) += aufs.o +aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o fsctx.o \ @@ -23982,13 +24930,26 @@ diff -Naur linux-5.16/fs/aufs/Makefile aufs5-linux-aufs5.16/fs/aufs/Makefile +aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o +aufs-$(CONFIG_AUFS_DEBUG) += debug.o +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o -diff -Naur linux-5.16/fs/aufs/module.c aufs5-linux-aufs5.16/fs/aufs/module.c ---- linux-5.16/fs/aufs/module.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/module.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,259 @@ +diff -ruN a/fs/aufs/module.c b/fs/aufs/module.c +--- a/fs/aufs/module.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/module.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,273 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -24120,6 +25081,7 @@ diff -Naur linux-5.16/fs/aufs/module.c aufs5-linux-aufs5.16/fs/aufs/module.c +MODULE_DESCRIPTION(AUFS_NAME + " -- Advanced multi layered unification filesystem"); +MODULE_VERSION(AUFS_VERSION); ++MODULE_ALIAS_FS(AUFS_NAME); + +/* this module parameter has no meaning when SYSFS is disabled */ +int sysaufs_brs = 1; @@ -24245,13 +25207,26 @@ diff -Naur linux-5.16/fs/aufs/module.c aufs5-linux-aufs5.16/fs/aufs/module.c + +module_init(aufs_init); +module_exit(aufs_exit); -diff -Naur linux-5.16/fs/aufs/module.h aufs5-linux-aufs5.16/fs/aufs/module.h ---- linux-5.16/fs/aufs/module.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/module.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,153 @@ +diff -ruN a/fs/aufs/module.h b/fs/aufs/module.h +--- a/fs/aufs/module.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/module.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,166 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -24402,13 +25377,26 @@ diff -Naur linux-5.16/fs/aufs/module.h aufs5-linux-aufs5.16/fs/aufs/module.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ -diff -Naur linux-5.16/fs/aufs/mvdown.c aufs5-linux-aufs5.16/fs/aufs/mvdown.c ---- linux-5.16/fs/aufs/mvdown.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/mvdown.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,693 @@ +diff -ruN a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c +--- a/fs/aufs/mvdown.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/mvdown.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,706 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2011-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -25099,13 +26087,26 @@ diff -Naur linux-5.16/fs/aufs/mvdown.c aufs5-linux-aufs5.16/fs/aufs/mvdown.c + AuTraceErr(err); + return err; +} -diff -Naur linux-5.16/fs/aufs/opts.c aufs5-linux-aufs5.16/fs/aufs/opts.c ---- linux-5.16/fs/aufs/opts.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/opts.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1019 @@ +diff -ruN a/fs/aufs/opts.c b/fs/aufs/opts.c +--- a/fs/aufs/opts.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/opts.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1032 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -26122,13 +27123,26 @@ diff -Naur linux-5.16/fs/aufs/opts.c aufs5-linux-aufs5.16/fs/aufs/opts.c +{ + return au_mntflags(sb) & AuOptMask_UDBA; +} -diff -Naur linux-5.16/fs/aufs/opts.h aufs5-linux-aufs5.16/fs/aufs/opts.h ---- linux-5.16/fs/aufs/opts.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/opts.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,250 @@ +diff -ruN a/fs/aufs/opts.h b/fs/aufs/opts.h +--- a/fs/aufs/opts.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/opts.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,263 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -26376,13 +27390,26 @@ diff -Naur linux-5.16/fs/aufs/opts.h aufs5-linux-aufs5.16/fs/aufs/opts.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ -diff -Naur linux-5.16/fs/aufs/plink.c aufs5-linux-aufs5.16/fs/aufs/plink.c ---- linux-5.16/fs/aufs/plink.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/plink.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,503 @@ +diff -ruN a/fs/aufs/plink.c b/fs/aufs/plink.c +--- a/fs/aufs/plink.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/plink.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,516 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -26883,13 +27910,26 @@ diff -Naur linux-5.16/fs/aufs/plink.c aufs5-linux-aufs5.16/fs/aufs/plink.c + } + } +} -diff -Naur linux-5.16/fs/aufs/poll.c aufs5-linux-aufs5.16/fs/aufs/poll.c ---- linux-5.16/fs/aufs/poll.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/poll.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,38 @@ +diff -ruN a/fs/aufs/poll.c b/fs/aufs/poll.c +--- a/fs/aufs/poll.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/poll.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -26925,13 +27965,26 @@ diff -Naur linux-5.16/fs/aufs/poll.c aufs5-linux-aufs5.16/fs/aufs/poll.c + AuDbg("mask 0x%x\n", mask); + return mask; +} -diff -Naur linux-5.16/fs/aufs/posix_acl.c aufs5-linux-aufs5.16/fs/aufs/posix_acl.c ---- linux-5.16/fs/aufs/posix_acl.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/posix_acl.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,98 @@ +diff -ruN a/fs/aufs/posix_acl.c b/fs/aufs/posix_acl.c +--- a/fs/aufs/posix_acl.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/posix_acl.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,111 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2014-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -27027,13 +28080,26 @@ diff -Naur linux-5.16/fs/aufs/posix_acl.c aufs5-linux-aufs5.16/fs/aufs/posix_acl +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/procfs.c aufs5-linux-aufs5.16/fs/aufs/procfs.c ---- linux-5.16/fs/aufs/procfs.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/procfs.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,157 @@ +diff -ruN a/fs/aufs/procfs.c b/fs/aufs/procfs.c +--- a/fs/aufs/procfs.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/procfs.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -27188,13 +28254,26 @@ diff -Naur linux-5.16/fs/aufs/procfs.c aufs5-linux-aufs5.16/fs/aufs/procfs.c +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/rdu.c aufs5-linux-aufs5.16/fs/aufs/rdu.c ---- linux-5.16/fs/aufs/rdu.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/rdu.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,371 @@ +diff -ruN a/fs/aufs/rdu.c b/fs/aufs/rdu.c +--- a/fs/aufs/rdu.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/rdu.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,384 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -27563,13 +28642,26 @@ diff -Naur linux-5.16/fs/aufs/rdu.c aufs5-linux-aufs5.16/fs/aufs/rdu.c + return err; +} +#endif -diff -Naur linux-5.16/fs/aufs/rwsem.h aufs5-linux-aufs5.16/fs/aufs/rwsem.h ---- linux-5.16/fs/aufs/rwsem.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/rwsem.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,72 @@ +diff -ruN a/fs/aufs/rwsem.h b/fs/aufs/rwsem.h +--- a/fs/aufs/rwsem.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/rwsem.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,85 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -27639,13 +28731,26 @@ diff -Naur linux-5.16/fs/aufs/rwsem.h aufs5-linux-aufs5.16/fs/aufs/rwsem.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_RWSEM_H__ */ -diff -Naur linux-5.16/fs/aufs/sbinfo.c aufs5-linux-aufs5.16/fs/aufs/sbinfo.c ---- linux-5.16/fs/aufs/sbinfo.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/sbinfo.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,303 @@ +diff -ruN a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c +--- a/fs/aufs/sbinfo.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/sbinfo.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,316 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -27946,13 +29051,26 @@ diff -Naur linux-5.16/fs/aufs/sbinfo.c aufs5-linux-aufs5.16/fs/aufs/sbinfo.c + di_write_unlock2(d1, d2); + si_read_unlock(d1->d_sb); +} -diff -Naur linux-5.16/fs/aufs/super.c aufs5-linux-aufs5.16/fs/aufs/super.c ---- linux-5.16/fs/aufs/super.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/super.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,858 @@ +diff -ruN a/fs/aufs/super.c b/fs/aufs/super.c +--- a/fs/aufs/super.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/super.c 2022-04-23 14:24:51.844335454 +0300 +@@ -0,0 +1,874 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -28710,7 +29828,10 @@ diff -Naur linux-5.16/fs/aufs/super.c aufs5-linux-aufs5.16/fs/aufs/super.c + .show_options = aufs_show_options, + .statfs = aufs_statfs, + .put_super = aufs_put_super, -+ .sync_fs = aufs_sync_fs ++ .sync_fs = aufs_sync_fs, ++#ifdef CONFIG_AUFS_BDEV_LOOP ++ .real_loop = aufs_real_loop ++#endif +}; + +/* ---------------------------------------------------------------------- */ @@ -28808,13 +29929,26 @@ diff -Naur linux-5.16/fs/aufs/super.c aufs5-linux-aufs5.16/fs/aufs/super.c + /* no need to __module_get() and module_put(). */ + .owner = THIS_MODULE, +}; -diff -Naur linux-5.16/fs/aufs/super.h aufs5-linux-aufs5.16/fs/aufs/super.h ---- linux-5.16/fs/aufs/super.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/super.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,579 @@ +diff -ruN a/fs/aufs/super.h b/fs/aufs/super.h +--- a/fs/aufs/super.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/super.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,592 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -29391,13 +30525,26 @@ diff -Naur linux-5.16/fs/aufs/super.h aufs5-linux-aufs5.16/fs/aufs/super.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ -diff -Naur linux-5.16/fs/aufs/sysaufs.c aufs5-linux-aufs5.16/fs/aufs/sysaufs.c ---- linux-5.16/fs/aufs/sysaufs.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/sysaufs.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,80 @@ +diff -ruN a/fs/aufs/sysaufs.c b/fs/aufs/sysaufs.c +--- a/fs/aufs/sysaufs.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/sysaufs.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -29475,13 +30622,26 @@ diff -Naur linux-5.16/fs/aufs/sysaufs.c aufs5-linux-aufs5.16/fs/aufs/sysaufs.c +out: + return err; +} -diff -Naur linux-5.16/fs/aufs/sysaufs.h aufs5-linux-aufs5.16/fs/aufs/sysaufs.h ---- linux-5.16/fs/aufs/sysaufs.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/sysaufs.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,89 @@ +diff -ruN a/fs/aufs/sysaufs.h b/fs/aufs/sysaufs.h +--- a/fs/aufs/sysaufs.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/sysaufs.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,102 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -29568,13 +30728,26 @@ diff -Naur linux-5.16/fs/aufs/sysaufs.h aufs5-linux-aufs5.16/fs/aufs/sysaufs.h + +#endif /* __KERNEL__ */ +#endif /* __SYSAUFS_H__ */ -diff -Naur linux-5.16/fs/aufs/sysfs.c aufs5-linux-aufs5.16/fs/aufs/sysfs.c ---- linux-5.16/fs/aufs/sysfs.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/sysfs.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,338 @@ +diff -ruN a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c +--- a/fs/aufs/sysfs.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/sysfs.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,374 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -29585,7 +30758,30 @@ diff -Naur linux-5.16/fs/aufs/sysfs.c aufs5-linux-aufs5.16/fs/aufs/sysfs.c +#include +#include "aufs.h" + ++#ifdef CONFIG_AUFS_FS_MODULE ++/* this entry violates the "one line per file" policy of sysfs */ ++static ssize_t config_show(struct kobject *kobj, struct kobj_attribute *attr, ++ char *buf) ++{ ++ ssize_t err; ++ static char *conf = ++/* this file is generated at compiling */ ++#include "conf.str" ++ ; ++ ++ err = snprintf(buf, PAGE_SIZE, conf); ++ if (unlikely(err >= PAGE_SIZE)) ++ err = -EFBIG; ++ return err; ++} ++ ++static struct kobj_attribute au_config_attr = __ATTR_RO(config); ++#endif ++ +static struct attribute *au_attr[] = { ++#ifdef CONFIG_AUFS_FS_MODULE ++ &au_config_attr.attr, ++#endif + NULL, /* need to NULL terminate the list of attributes */ +}; + @@ -29910,13 +31106,26 @@ diff -Naur linux-5.16/fs/aufs/sysfs.c aufs5-linux-aufs5.16/fs/aufs/sysfs.c + } + } +} -diff -Naur linux-5.16/fs/aufs/sysrq.c aufs5-linux-aufs5.16/fs/aufs/sysrq.c ---- linux-5.16/fs/aufs/sysrq.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/sysrq.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,136 @@ +diff -ruN a/fs/aufs/sysrq.c b/fs/aufs/sysrq.c +--- a/fs/aufs/sysrq.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/sysrq.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,149 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -30050,13 +31259,26 @@ diff -Naur linux-5.16/fs/aufs/sysrq.c aufs5-linux-aufs5.16/fs/aufs/sysrq.c + if (unlikely(err)) + pr_err("err %d (ignored)\n", err); +} -diff -Naur linux-5.16/fs/aufs/vdir.c aufs5-linux-aufs5.16/fs/aufs/vdir.c ---- linux-5.16/fs/aufs/vdir.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/vdir.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,883 @@ +diff -ruN a/fs/aufs/vdir.c b/fs/aufs/vdir.c +--- a/fs/aufs/vdir.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/vdir.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,896 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -30937,13 +32159,26 @@ diff -Naur linux-5.16/fs/aufs/vdir.c aufs5-linux-aufs5.16/fs/aufs/vdir.c + /* smp_mb(); */ + return 0; +} -diff -Naur linux-5.16/fs/aufs/vfsub.c aufs5-linux-aufs5.16/fs/aufs/vfsub.c ---- linux-5.16/fs/aufs/vfsub.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/vfsub.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,905 @@ +diff -ruN a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c +--- a/fs/aufs/vfsub.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/vfsub.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,918 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -31846,13 +33081,26 @@ diff -Naur linux-5.16/fs/aufs/vfsub.c aufs5-linux-aufs5.16/fs/aufs/vfsub.c + + return err; +} -diff -Naur linux-5.16/fs/aufs/vfsub.h aufs5-linux-aufs5.16/fs/aufs/vfsub.h ---- linux-5.16/fs/aufs/vfsub.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/vfsub.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,345 @@ +diff -ruN a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h +--- a/fs/aufs/vfsub.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/vfsub.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,358 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -32195,13 +33443,26 @@ diff -Naur linux-5.16/fs/aufs/vfsub.h aufs5-linux-aufs5.16/fs/aufs/vfsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_VFSUB_H__ */ -diff -Naur linux-5.16/fs/aufs/wbr_policy.c aufs5-linux-aufs5.16/fs/aufs/wbr_policy.c ---- linux-5.16/fs/aufs/wbr_policy.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/wbr_policy.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,817 @@ +diff -ruN a/fs/aufs/wbr_policy.c b/fs/aufs/wbr_policy.c +--- a/fs/aufs/wbr_policy.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/wbr_policy.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,830 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -33016,13 +34277,26 @@ diff -Naur linux-5.16/fs/aufs/wbr_policy.c aufs5-linux-aufs5.16/fs/aufs/wbr_poli + .fin = au_wbr_create_fin_mfs + } +}; -diff -Naur linux-5.16/fs/aufs/whout.c aufs5-linux-aufs5.16/fs/aufs/whout.c ---- linux-5.16/fs/aufs/whout.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/whout.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1059 @@ +diff -ruN a/fs/aufs/whout.c b/fs/aufs/whout.c +--- a/fs/aufs/whout.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/whout.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1072 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -34079,13 +35353,26 @@ diff -Naur linux-5.16/fs/aufs/whout.c aufs5-linux-aufs5.16/fs/aufs/whout.c + au_whtmp_rmdir_free(args); + } +} -diff -Naur linux-5.16/fs/aufs/whout.h aufs5-linux-aufs5.16/fs/aufs/whout.h ---- linux-5.16/fs/aufs/whout.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/whout.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,74 @@ +diff -ruN a/fs/aufs/whout.h b/fs/aufs/whout.h +--- a/fs/aufs/whout.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/whout.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -34157,13 +35444,26 @@ diff -Naur linux-5.16/fs/aufs/whout.h aufs5-linux-aufs5.16/fs/aufs/whout.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WHOUT_H__ */ -diff -Naur linux-5.16/fs/aufs/wkq.c aufs5-linux-aufs5.16/fs/aufs/wkq.c ---- linux-5.16/fs/aufs/wkq.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/wkq.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,359 @@ +diff -ruN a/fs/aufs/wkq.c b/fs/aufs/wkq.c +--- a/fs/aufs/wkq.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/wkq.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,372 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -34520,13 +35820,26 @@ diff -Naur linux-5.16/fs/aufs/wkq.c aufs5-linux-aufs5.16/fs/aufs/wkq.c + + return err; +} -diff -Naur linux-5.16/fs/aufs/wkq.h aufs5-linux-aufs5.16/fs/aufs/wkq.h ---- linux-5.16/fs/aufs/wkq.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/wkq.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,76 @@ +diff -ruN a/fs/aufs/wkq.h b/fs/aufs/wkq.h +--- a/fs/aufs/wkq.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/wkq.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -34600,13 +35913,26 @@ diff -Naur linux-5.16/fs/aufs/wkq.h aufs5-linux-aufs5.16/fs/aufs/wkq.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ -diff -Naur linux-5.16/fs/aufs/xattr.c aufs5-linux-aufs5.16/fs/aufs/xattr.c ---- linux-5.16/fs/aufs/xattr.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/xattr.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,355 @@ +diff -ruN a/fs/aufs/xattr.c b/fs/aufs/xattr.c +--- a/fs/aufs/xattr.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/xattr.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,368 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2014-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -34959,13 +36285,26 @@ diff -Naur linux-5.16/fs/aufs/xattr.c aufs5-linux-aufs5.16/fs/aufs/xattr.c +{ + sb->s_xattr = au_xattr_handlers; +} -diff -Naur linux-5.16/fs/aufs/xino.c aufs5-linux-aufs5.16/fs/aufs/xino.c ---- linux-5.16/fs/aufs/xino.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/aufs/xino.c 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,1913 @@ +diff -ruN a/fs/aufs/xino.c b/fs/aufs/xino.c +--- a/fs/aufs/xino.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/fs/aufs/xino.c 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,1926 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +/* @@ -36876,9 +38215,9 @@ diff -Naur linux-5.16/fs/aufs/xino.c aufs5-linux-aufs5.16/fs/aufs/xino.c +out: + return err; +} -diff -Naur linux-5.16/fs/dcache.c aufs5-linux-aufs5.16/fs/dcache.c ---- linux-5.16/fs/dcache.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/dcache.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/dcache.c b/fs/dcache.c +--- a/fs/dcache.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/dcache.c 2022-04-23 14:21:32.578041815 +0300 @@ -1320,7 +1320,7 @@ * * The @enter() callbacks are called with d_lock held. @@ -36888,9 +38227,36 @@ diff -Naur linux-5.16/fs/dcache.c aufs5-linux-aufs5.16/fs/dcache.c enum d_walk_ret (*enter)(void *, struct dentry *)) { struct dentry *this_parent; -diff -Naur linux-5.16/fs/fcntl.c aufs5-linux-aufs5.16/fs/fcntl.c ---- linux-5.16/fs/fcntl.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/fcntl.c 2022-03-07 14:27:53.000000000 +0300 +@@ -1425,6 +1425,7 @@ + seq = 1; + goto again; + } ++EXPORT_SYMBOL_GPL(d_walk); + + struct check_mount { + struct vfsmount *mnt; +@@ -2970,6 +2971,7 @@ + + write_sequnlock(&rename_lock); + } ++EXPORT_SYMBOL_GPL(d_exchange); + + /** + * d_ancestor - search for an ancestor +diff -ruN a/fs/exec.c b/fs/exec.c +--- a/fs/exec.c 2022-04-23 14:19:55.808932436 +0300 ++++ b/fs/exec.c 2022-04-23 14:21:32.578041815 +0300 +@@ -111,6 +111,7 @@ + return (path->mnt->mnt_flags & MNT_NOEXEC) || + (path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC); + } ++EXPORT_SYMBOL_GPL(path_noexec); + + #ifdef CONFIG_USELIB + /* +diff -ruN a/fs/fcntl.c b/fs/fcntl.c +--- a/fs/fcntl.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/fcntl.c 2022-04-23 14:21:32.578041815 +0300 @@ -33,7 +33,7 @@ #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME) @@ -36909,9 +38275,57 @@ diff -Naur linux-5.16/fs/fcntl.c aufs5-linux-aufs5.16/fs/fcntl.c if (error) return error; -diff -Naur linux-5.16/fs/Kconfig aufs5-linux-aufs5.16/fs/Kconfig ---- linux-5.16/fs/Kconfig 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/Kconfig 2022-03-07 14:27:53.000000000 +0300 +@@ -84,6 +86,7 @@ + out: + return error; + } ++EXPORT_SYMBOL_GPL(setfl); + + static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, + int force) +diff -ruN a/fs/file_table.c b/fs/file_table.c +--- a/fs/file_table.c 2022-04-23 14:19:55.822932450 +0300 ++++ b/fs/file_table.c 2022-04-23 14:23:23.332195135 +0300 +@@ -161,6 +161,7 @@ + } + return ERR_PTR(-ENFILE); + } ++EXPORT_SYMBOL_GPL(alloc_empty_file); + + /* + * Variant of alloc_empty_file() that doesn't check and modify nr_files. +@@ -376,6 +377,7 @@ + + EXPORT_SYMBOL(fput); + EXPORT_SYMBOL(__fput_sync); ++EXPORT_SYMBOL_GPL(__fput_sync); + + void __init files_init(void) + { +diff -ruN a/fs/inode.c b/fs/inode.c +--- a/fs/inode.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/inode.c 2022-04-23 14:25:32.138403801 +0300 +@@ -910,6 +910,8 @@ + unsigned int *p = &get_cpu_var(last_ino); + unsigned int res = *p; + ++start: ++ + #ifdef CONFIG_SMP + if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) { + static atomic_t shared_last_ino; +@@ -922,7 +924,7 @@ + res++; + /* get_next_ino should not provide a 0 inode number */ + if (unlikely(!res)) +- res++; ++ goto start; + *p = res; + put_cpu_var(last_ino); + return res; +diff -ruN a/fs/Kconfig b/fs/Kconfig +--- a/fs/Kconfig 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/Kconfig 2022-04-23 14:24:47.564328352 +0300 @@ -312,6 +312,7 @@ source "fs/ufs/Kconfig" source "fs/erofs/Kconfig" @@ -36920,18 +38334,26 @@ diff -Naur linux-5.16/fs/Kconfig aufs5-linux-aufs5.16/fs/Kconfig endif # MISC_FILESYSTEMS -diff -Naur linux-5.16/fs/Makefile aufs5-linux-aufs5.16/fs/Makefile ---- linux-5.16/fs/Makefile 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/Makefile 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/Makefile b/fs/Makefile +--- a/fs/Makefile 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/Makefile 2022-04-23 14:24:47.565328353 +0300 @@ -138,3 +138,4 @@ obj-$(CONFIG_EROFS_FS) += erofs/ obj-$(CONFIG_VBOXSF_FS) += vboxsf/ obj-$(CONFIG_ZONEFS_FS) += zonefs/ +obj-$(CONFIG_AUFS_FS) += aufs/ -diff -Naur linux-5.16/fs/namespace.c aufs5-linux-aufs5.16/fs/namespace.c ---- linux-5.16/fs/namespace.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/namespace.c 2022-03-07 14:27:53.000000000 +0300 -@@ -808,6 +808,12 @@ +diff -ruN a/fs/namespace.c b/fs/namespace.c +--- a/fs/namespace.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/namespace.c 2022-04-23 14:21:32.579041816 +0300 +@@ -439,6 +439,7 @@ + mnt_dec_writers(real_mount(mnt)); + preempt_enable(); + } ++EXPORT_SYMBOL_GPL(__mnt_drop_write); + + /** + * mnt_drop_write - give up write access to a mount +@@ -808,6 +809,13 @@ return mnt->mnt_ns == current->nsproxy->mnt_ns; } @@ -36940,13 +38362,44 @@ diff -Naur linux-5.16/fs/namespace.c aufs5-linux-aufs5.16/fs/namespace.c +{ + return check_mnt(real_mount(mnt)); +} ++EXPORT_SYMBOL_GPL(is_current_mnt_ns); + /* * vfsmount lock must be held for write */ -diff -Naur linux-5.16/fs/proc/base.c aufs5-linux-aufs5.16/fs/proc/base.c ---- linux-5.16/fs/proc/base.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/proc/base.c 2022-03-07 14:27:53.000000000 +0300 +@@ -2005,6 +2013,7 @@ + } + return 0; + } ++EXPORT_SYMBOL_GPL(iterate_mounts); + + static void lock_mnt_tree(struct mount *mnt) + { +diff -ruN a/fs/notify/group.c b/fs/notify/group.c +--- a/fs/notify/group.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/notify/group.c 2022-04-23 14:21:32.579041816 +0300 +@@ -100,6 +100,7 @@ + { + refcount_inc(&group->refcnt); + } ++EXPORT_SYMBOL_GPL(fsnotify_get_group); + + /* + * Drop a reference to a group. Free it if it's through. +diff -ruN a/fs/open.c b/fs/open.c +--- a/fs/open.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/open.c 2022-04-23 14:21:32.580041818 +0300 +@@ -65,6 +65,7 @@ + inode_unlock(dentry->d_inode); + return ret; + } ++EXPORT_SYMBOL_GPL(do_truncate); + + long vfs_truncate(const struct path *path, loff_t length) + { +diff -ruN a/fs/proc/base.c b/fs/proc/base.c +--- a/fs/proc/base.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/proc/base.c 2022-04-23 14:25:01.626351804 +0300 @@ -2191,7 +2191,7 @@ rc = -ENOENT; vma = find_exact_vma(mm, vm_start, vm_end); @@ -36956,9 +38409,9 @@ diff -Naur linux-5.16/fs/proc/base.c aufs5-linux-aufs5.16/fs/proc/base.c path_get(path); rc = 0; } -diff -Naur linux-5.16/fs/proc/nommu.c aufs5-linux-aufs5.16/fs/proc/nommu.c ---- linux-5.16/fs/proc/nommu.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/proc/nommu.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/proc/nommu.c b/fs/proc/nommu.c +--- a/fs/proc/nommu.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/proc/nommu.c 2022-04-23 14:25:01.627351806 +0300 @@ -40,7 +40,10 @@ file = region->vm_file; @@ -36971,9 +38424,9 @@ diff -Naur linux-5.16/fs/proc/nommu.c aufs5-linux-aufs5.16/fs/proc/nommu.c dev = inode->i_sb->s_dev; ino = inode->i_ino; } -diff -Naur linux-5.16/fs/proc/task_mmu.c aufs5-linux-aufs5.16/fs/proc/task_mmu.c ---- linux-5.16/fs/proc/task_mmu.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/proc/task_mmu.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c +--- a/fs/proc/task_mmu.c 2022-04-23 14:19:55.848932475 +0300 ++++ b/fs/proc/task_mmu.c 2022-04-23 14:25:01.628351808 +0300 @@ -280,7 +280,10 @@ const char *name = NULL; @@ -36986,7 +38439,7 @@ diff -Naur linux-5.16/fs/proc/task_mmu.c aufs5-linux-aufs5.16/fs/proc/task_mmu.c dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1869,7 +1872,7 @@ +@@ -1892,7 +1895,7 @@ struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -36995,9 +38448,9 @@ diff -Naur linux-5.16/fs/proc/task_mmu.c aufs5-linux-aufs5.16/fs/proc/task_mmu.c struct mm_struct *mm = vma->vm_mm; struct mempolicy *pol; char buffer[64]; -diff -Naur linux-5.16/fs/proc/task_nommu.c aufs5-linux-aufs5.16/fs/proc/task_nommu.c ---- linux-5.16/fs/proc/task_nommu.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/proc/task_nommu.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c +--- a/fs/proc/task_nommu.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/proc/task_nommu.c 2022-04-23 14:25:01.629351809 +0300 @@ -155,7 +155,10 @@ file = vma->vm_file; @@ -37010,10 +38463,29 @@ diff -Naur linux-5.16/fs/proc/task_nommu.c aufs5-linux-aufs5.16/fs/proc/task_nom dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; -diff -Naur linux-5.16/fs/splice.c aufs5-linux-aufs5.16/fs/splice.c ---- linux-5.16/fs/splice.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/fs/splice.c 2022-03-07 14:27:53.000000000 +0300 -@@ -759,8 +759,8 @@ +diff -ruN a/fs/read_write.c b/fs/read_write.c +--- a/fs/read_write.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/read_write.c 2022-04-23 14:21:32.580041818 +0300 +@@ -488,6 +488,7 @@ + inc_syscr(current); + return ret; + } ++EXPORT_SYMBOL_GPL(vfs_read); + + static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) + { +@@ -598,6 +599,7 @@ + file_end_write(file); + return ret; + } ++EXPORT_SYMBOL_GPL(vfs_write); + + /* file_ppos returns &file->f_pos or NULL if file is stream */ + static inline loff_t *file_ppos(struct file *file) +diff -ruN a/fs/splice.c b/fs/splice.c +--- a/fs/splice.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/splice.c 2022-04-23 14:21:32.580041818 +0300 +@@ -759,20 +759,21 @@ /* * Attempt to initiate a splice from pipe to file. */ @@ -37024,7 +38496,10 @@ diff -Naur linux-5.16/fs/splice.c aufs5-linux-aufs5.16/fs/splice.c { if (unlikely(!out->f_op->splice_write)) return warn_unsupported(out, "write"); -@@ -770,9 +770,9 @@ + return out->f_op->splice_write(pipe, out, ppos, len, flags); + } ++EXPORT_SYMBOL_GPL(do_splice_from); + /* * Attempt to initiate a splice from a file to a pipe. */ @@ -37037,9 +38512,28 @@ diff -Naur linux-5.16/fs/splice.c aufs5-linux-aufs5.16/fs/splice.c { unsigned int p_space; int ret; -diff -Naur linux-5.16/include/linux/fs.h aufs5-linux-aufs5.16/include/linux/fs.h ---- linux-5.16/include/linux/fs.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/fs.h 2022-03-07 14:27:53.000000000 +0300 +@@ -795,6 +796,7 @@ + return warn_unsupported(in, "read"); + return in->f_op->splice_read(in, ppos, pipe, len, flags); + } ++EXPORT_SYMBOL_GPL(do_splice_to); + + /** + * splice_direct_to_actor - splices data directly between two non-pipes +diff -ruN a/fs/xattr.c b/fs/xattr.c +--- a/fs/xattr.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/fs/xattr.c 2022-04-23 14:21:32.581041819 +0300 +@@ -384,6 +384,7 @@ + *xattr_value = value; + return error; + } ++EXPORT_SYMBOL_GPL(vfs_getxattr_alloc); + + ssize_t + __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, +diff -ruN a/include/linux/fs.h b/include/linux/fs.h +--- a/include/linux/fs.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/fs.h 2022-04-23 14:24:51.844335454 +0300 @@ -1378,6 +1378,7 @@ /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -37056,7 +38550,18 @@ diff -Naur linux-5.16/include/linux/fs.h aufs5-linux-aufs5.16/include/linux/fs.h 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); -@@ -2613,6 +2615,7 @@ +@@ -2223,6 +2225,10 @@ + struct shrink_control *); + long (*free_cached_objects)(struct super_block *, + struct shrink_control *); ++#if IS_ENABLED(CONFIG_BLK_DEV_LOOP) || IS_ENABLED(CONFIG_BLK_DEV_LOOP_MODULE) ++ /* and aufs */ ++ struct file *(*real_loop)(struct file *); ++#endif + }; + + /* +@@ -2613,6 +2619,7 @@ extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec64 *, int); @@ -37064,7 +38569,7 @@ diff -Naur linux-5.16/include/linux/fs.h aufs5-linux-aufs5.16/include/linux/fs.h /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2776,6 +2779,7 @@ +@@ -2776,6 +2783,7 @@ } void emergency_thaw_all(void); @@ -37072,9 +38577,9 @@ diff -Naur linux-5.16/include/linux/fs.h aufs5-linux-aufs5.16/include/linux/fs.h extern int sync_filesystem(struct super_block *); extern const struct file_operations def_blk_fops; extern const struct file_operations def_chr_fops; -diff -Naur linux-5.16/include/linux/lockdep.h aufs5-linux-aufs5.16/include/linux/lockdep.h ---- linux-5.16/include/linux/lockdep.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/lockdep.h 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/include/linux/lockdep.h b/include/linux/lockdep.h +--- a/include/linux/lockdep.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/lockdep.h 2022-04-23 14:21:23.865030954 +0300 @@ -248,6 +248,8 @@ return lock->key == key; } @@ -37084,13 +38589,14 @@ diff -Naur linux-5.16/include/linux/lockdep.h aufs5-linux-aufs5.16/include/linux /* * Acquire a lock. * -diff -Naur linux-5.16/include/linux/mm.h aufs5-linux-aufs5.16/include/linux/mm.h ---- linux-5.16/include/linux/mm.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/mm.h 2022-03-07 14:27:53.000000000 +0300 -@@ -1926,6 +1926,28 @@ +diff -ruN a/include/linux/mm.h b/include/linux/mm.h +--- a/include/linux/mm.h 2022-04-23 14:19:55.861932488 +0300 ++++ b/include/linux/mm.h 2022-04-23 14:25:01.631351812 +0300 +@@ -1919,6 +1919,43 @@ unmap_mapping_range(mapping, holebegin, holelen, 0); } ++#if IS_ENABLED(CONFIG_AUFS_FS) +extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int); +extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[], + int); @@ -37112,32 +38618,50 @@ diff -Naur linux-5.16/include/linux/mm.h aufs5-linux-aufs5.16/include/linux/mm.h + __LINE__) +#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__) +#endif /* !CONFIG_MMU */ ++ ++#else ++ ++#define vma_file_update_time(vma) file_update_time((vma)->vm_file) ++#define vma_pr_or_file(vma) (vma)->vm_file ++#define vma_get_file(vma) get_file((vma)->vm_file) ++#define vma_fput(vma) fput((vma)->vm_file) ++ ++#ifndef CONFIG_MMU ++#define vmr_pr_or_file(region) (region)->vm_file ++#define vmr_fput(region) fput((region)->vm_file) ++#endif /* !CONFIG_MMU */ ++ ++#endif /* CONFIG_AUFS_FS */ + extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, unsigned int gup_flags); extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, -diff -Naur linux-5.16/include/linux/mm_types.h aufs5-linux-aufs5.16/include/linux/mm_types.h ---- linux-5.16/include/linux/mm_types.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/mm_types.h 2022-03-07 14:27:53.000000000 +0300 -@@ -370,6 +370,7 @@ +diff -ruN a/include/linux/mm_types.h b/include/linux/mm_types.h +--- a/include/linux/mm_types.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/mm_types.h 2022-04-23 14:25:01.632351814 +0300 +@@ -370,6 +370,9 @@ unsigned long vm_top; /* region allocated to here */ unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ struct file *vm_file; /* the backing file or NULL */ ++#if IS_ENABLED(CONFIG_AUFS_FS) + struct file *vm_prfile; /* the virtual backing file or NULL */ ++#endif int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -449,6 +450,7 @@ +@@ -449,6 +452,9 @@ unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE units */ struct file * vm_file; /* File we map to (can be NULL). */ ++#if IS_ENABLED(CONFIG_AUFS_FS) + struct file *vm_prfile; /* shadow of vm_file */ ++#endif void * vm_private_data; /* was vm_pte (shared mem) */ #ifdef CONFIG_SWAP -diff -Naur linux-5.16/include/linux/mnt_namespace.h aufs5-linux-aufs5.16/include/linux/mnt_namespace.h ---- linux-5.16/include/linux/mnt_namespace.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/mnt_namespace.h 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h +--- a/include/linux/mnt_namespace.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/mnt_namespace.h 2022-04-23 14:21:23.865030954 +0300 @@ -7,12 +7,15 @@ struct fs_struct; struct user_namespace; @@ -37154,9 +38678,28 @@ diff -Naur linux-5.16/include/linux/mnt_namespace.h aufs5-linux-aufs5.16/include extern const struct file_operations proc_mounts_operations; extern const struct file_operations proc_mountinfo_operations; extern const struct file_operations proc_mountstats_operations; -diff -Naur linux-5.16/include/linux/splice.h aufs5-linux-aufs5.16/include/linux/splice.h ---- linux-5.16/include/linux/splice.h 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/linux/splice.h 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h +--- a/include/linux/shmem_fs.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/shmem_fs.h 2022-04-23 14:25:26.275393693 +0300 +@@ -28,10 +28,13 @@ + }; + + struct shmem_sb_info { ++ struct mutex idr_lock; ++ bool idr_nouse; ++ struct idr idr; /* manages inode-number */ + unsigned long max_blocks; /* How many blocks are allowed */ + struct percpu_counter used_blocks; /* How many are allocated */ +- unsigned long max_inodes; /* How many inodes are allowed */ +- unsigned long free_inodes; /* How many are left for allocation */ ++ int max_inodes; /* How many inodes are allowed */ ++ int free_inodes; /* How many are left for allocation */ + raw_spinlock_t stat_lock; /* Serialize shmem_sb_info changes */ + umode_t mode; /* Mount mode for root directory */ + unsigned char huge; /* Whether to try for hugepages */ +diff -ruN a/include/linux/splice.h b/include/linux/splice.h +--- a/include/linux/splice.h 2022-01-10 01:55:34.000000000 +0300 ++++ b/include/linux/splice.h 2022-04-23 14:21:23.865030954 +0300 @@ -93,4 +93,10 @@ extern const struct pipe_buf_operations page_cache_pipe_buf_ops; @@ -37168,13 +38711,26 @@ diff -Naur linux-5.16/include/linux/splice.h aufs5-linux-aufs5.16/include/linux/ + struct pipe_inode_info *pipe, size_t len, + unsigned int flags); #endif -diff -Naur linux-5.16/include/uapi/linux/aufs_type.h aufs5-linux-aufs5.16/include/uapi/linux/aufs_type.h ---- linux-5.16/include/uapi/linux/aufs_type.h 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/include/uapi/linux/aufs_type.h 2022-03-07 14:27:53.000000000 +0300 -@@ -0,0 +1,439 @@ +diff -ruN a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h +--- a/include/uapi/linux/aufs_type.h 1970-01-01 03:00:00.000000000 +0300 ++++ b/include/uapi/linux/aufs_type.h 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1,452 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (C) 2005-2021 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . + */ + +#ifndef __AUFS_TYPE_H__ @@ -37201,7 +38757,7 @@ diff -Naur linux-5.16/include/uapi/linux/aufs_type.h aufs5-linux-aufs5.16/includ +#include +#endif /* __KERNEL__ */ + -+#define AUFS_VERSION "5.16" ++#define AUFS_VERSION "5.16-20220404" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -37611,9 +39167,14 @@ diff -Naur linux-5.16/include/uapi/linux/aufs_type.h aufs5-linux-aufs5.16/includ +#define AUFS_CTL_FHSM_FD _IOW(AuCtlType, AuCtl_FHSM_FD, int) + +#endif /* __AUFS_TYPE_H__ */ -diff -Naur linux-5.16/kernel/fork.c aufs5-linux-aufs5.16/kernel/fork.c ---- linux-5.16/kernel/fork.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/kernel/fork.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild +--- a/include/uapi/linux/Kbuild 1970-01-01 03:00:00.000000000 +0300 ++++ b/include/uapi/linux/Kbuild 2022-04-02 02:40:00.000000000 +0300 +@@ -0,0 +1 @@ ++header-y = aufs_type.h +diff -ruN a/kernel/fork.c b/kernel/fork.c +--- a/kernel/fork.c 2022-04-23 14:19:55.892932519 +0300 ++++ b/kernel/fork.c 2022-04-23 14:25:01.634351817 +0300 @@ -572,7 +572,7 @@ if (file) { struct address_space *mapping = file->f_mapping; @@ -37623,29 +39184,38 @@ diff -Naur linux-5.16/kernel/fork.c aufs5-linux-aufs5.16/kernel/fork.c i_mmap_lock_write(mapping); if (tmp->vm_flags & VM_SHARED) mapping_allow_writable(mapping); -diff -Naur linux-5.16/kernel/locking/lockdep.c aufs5-linux-aufs5.16/kernel/locking/lockdep.c ---- linux-5.16/kernel/locking/lockdep.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/kernel/locking/lockdep.c 2022-03-07 14:27:53.000000000 +0300 -@@ -189,7 +189,7 @@ +diff -ruN a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c +--- a/kernel/locking/lockdep.c 2022-04-23 14:19:55.893932520 +0300 ++++ b/kernel/locking/lockdep.c 2022-04-23 14:21:32.582041820 +0300 +@@ -187,7 +187,7 @@ struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; - static DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS); + DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS); -static inline struct lock_class *hlock_class(struct held_lock *hlock) +inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock) { unsigned int class_idx = hlock->class_idx; -@@ -210,6 +210,7 @@ +@@ -208,6 +208,8 @@ */ return lock_classes + class_idx; } ++EXPORT_SYMBOL_GPL(lockdep_hlock_class); +#define hlock_class(hlock) lockdep_hlock_class(hlock) #ifdef CONFIG_LOCK_STAT static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats); -diff -Naur linux-5.16/MAINTAINERS aufs5-linux-aufs5.16/MAINTAINERS ---- linux-5.16/MAINTAINERS 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/MAINTAINERS 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/kernel/task_work.c b/kernel/task_work.c +--- a/kernel/task_work.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/kernel/task_work.c 2022-04-23 14:21:32.582041820 +0300 +@@ -167,3 +167,4 @@ + } while (work); + } + } ++EXPORT_SYMBOL_GPL(task_work_run); +diff -ruN a/MAINTAINERS b/MAINTAINERS +--- a/MAINTAINERS 2022-04-23 14:19:55.158931790 +0300 ++++ b/MAINTAINERS 2022-04-23 14:21:23.862030950 +0300 @@ -3179,6 +3179,19 @@ F: kernel/audit* F: lib/*audit.c @@ -37666,10 +39236,10 @@ diff -Naur linux-5.16/MAINTAINERS aufs5-linux-aufs5.16/MAINTAINERS AUXILIARY DISPLAY DRIVERS M: Miguel Ojeda S: Maintained -diff -Naur linux-5.16/mm/filemap.c aufs5-linux-aufs5.16/mm/filemap.c ---- linux-5.16/mm/filemap.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/mm/filemap.c 2022-03-07 14:27:53.000000000 +0300 -@@ -3356,7 +3356,7 @@ +diff -ruN a/mm/filemap.c b/mm/filemap.c +--- a/mm/filemap.c 2022-04-23 14:19:55.921932548 +0300 ++++ b/mm/filemap.c 2022-04-23 14:25:01.637351822 +0300 +@@ -3360,7 +3360,7 @@ vm_fault_t ret = VM_FAULT_LOCKED; sb_start_pagefault(mapping->host->i_sb); @@ -37678,21 +39248,17 @@ diff -Naur linux-5.16/mm/filemap.c aufs5-linux-aufs5.16/mm/filemap.c lock_page(page); if (page->mapping != mapping) { unlock_page(page); -diff -Naur linux-5.16/mm/Makefile aufs5-linux-aufs5.16/mm/Makefile ---- linux-5.16/mm/Makefile 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/mm/Makefile 2022-03-07 14:27:53.000000000 +0300 -@@ -52,7 +52,7 @@ - mm_init.o percpu.o slab_common.o \ - compaction.o vmacache.o \ - interval_tree.o list_lru.o workingset.o \ -- debug.o gup.o mmap_lock.o $(mmu-y) -+ prfile.o debug.o gup.o mmap_lock.o $(mmu-y) - - # Give 'page_alloc' its own module-parameter namespace - page-alloc-y := page_alloc.o -diff -Naur linux-5.16/mm/mmap.c aufs5-linux-aufs5.16/mm/mmap.c ---- linux-5.16/mm/mmap.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/mm/mmap.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/mm/Makefile b/mm/Makefile +--- a/mm/Makefile 2022-01-10 01:55:34.000000000 +0300 ++++ b/mm/Makefile 2022-04-23 14:25:01.634351817 +0300 +@@ -130,3 +130,4 @@ + obj-$(CONFIG_IO_MAPPING) += io-mapping.o + obj-$(CONFIG_HAVE_BOOTMEM_INFO_NODE) += bootmem_info.o + obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o ++obj-$(CONFIG_AUFS_FS:m=y) += prfile.o +diff -ruN a/mm/mmap.c b/mm/mmap.c +--- a/mm/mmap.c 2022-04-23 14:19:55.927932554 +0300 ++++ b/mm/mmap.c 2022-04-23 14:25:01.640351828 +0300 @@ -183,7 +183,7 @@ if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); @@ -37738,25 +39304,26 @@ diff -Naur linux-5.16/mm/mmap.c aufs5-linux-aufs5.16/mm/mmap.c unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2944,7 +2944,7 @@ - struct vm_area_struct *vma; +@@ -2945,6 +2945,9 @@ unsigned long populate = 0; unsigned long ret = -EINVAL; -- struct file *file; -+ struct file *file, *prfile; + struct file *file; ++#if IS_ENABLED(CONFIG_AUFS_FS) ++ struct file *prfile; ++#endif pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", current->comm, current->pid); -@@ -3000,10 +3000,27 @@ +@@ -3000,10 +3003,34 @@ if (vma->vm_flags & VM_LOCKED) flags |= MAP_LOCKED; -- file = get_file(vma->vm_file); ++#if IS_ENABLED(CONFIG_AUFS_FS) + vma_get_file(vma); + file = vma->vm_file; + prfile = vma->vm_prfile; - ret = do_mmap(vma->vm_file, start, size, - prot, flags, pgoff, &populate, NULL); ++ ret = do_mmap(vma->vm_file, start, size, ++ prot, flags, pgoff, &populate, NULL); + if (!IS_ERR_VALUE(ret) && file && prfile) { + struct vm_area_struct *new_vma; + @@ -37770,13 +39337,19 @@ diff -Naur linux-5.16/mm/mmap.c aufs5-linux-aufs5.16/mm/mmap.c + * two fput()s instead of vma_fput(vma), + * coz vma may not be available anymore. + */ - fput(file); ++ fput(file); + if (prfile) + fput(prfile); ++#else + file = get_file(vma->vm_file); + ret = do_mmap(vma->vm_file, start, size, + prot, flags, pgoff, &populate, NULL); + fput(file); ++#endif /* CONFIG_AUFS_FS */ out: mmap_write_unlock(mm); if (populate) -@@ -3284,7 +3301,7 @@ +@@ -3284,7 +3311,7 @@ if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -37785,9 +39358,9 @@ diff -Naur linux-5.16/mm/mmap.c aufs5-linux-aufs5.16/mm/mmap.c if (new_vma->vm_ops && new_vma->vm_ops->open) new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); -diff -Naur linux-5.16/mm/nommu.c aufs5-linux-aufs5.16/mm/nommu.c ---- linux-5.16/mm/nommu.c 2022-01-10 01:55:34.000000000 +0300 -+++ aufs5-linux-aufs5.16/mm/nommu.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/mm/nommu.c b/mm/nommu.c +--- a/mm/nommu.c 2022-01-10 01:55:34.000000000 +0300 ++++ b/mm/nommu.c 2022-04-23 14:25:01.641351829 +0300 @@ -522,7 +522,7 @@ up_write(&nommu_region_sem); @@ -37828,9 +39401,9 @@ diff -Naur linux-5.16/mm/nommu.c aufs5-linux-aufs5.16/mm/nommu.c vm_area_free(vma); return ret; -diff -Naur linux-5.16/mm/prfile.c aufs5-linux-aufs5.16/mm/prfile.c ---- linux-5.16/mm/prfile.c 1970-01-01 03:00:00.000000000 +0300 -+++ aufs5-linux-aufs5.16/mm/prfile.c 2022-03-07 14:27:53.000000000 +0300 +diff -ruN a/mm/prfile.c b/mm/prfile.c +--- a/mm/prfile.c 1970-01-01 03:00:00.000000000 +0300 ++++ b/mm/prfile.c 2022-04-23 14:25:01.642351831 +0300 @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0 +/* @@ -37918,3 +39491,268 @@ diff -Naur linux-5.16/mm/prfile.c aufs5-linux-aufs5.16/mm/prfile.c + fput(pr); +} +#endif /* !CONFIG_MMU */ +diff -ruN a/mm/shmem.c b/mm/shmem.c +--- a/mm/shmem.c 2022-04-23 14:19:55.930932557 +0300 ++++ b/mm/shmem.c 2022-04-23 14:25:26.276393695 +0300 +@@ -107,7 +107,7 @@ + + struct shmem_options { + unsigned long long blocks; +- unsigned long long inodes; ++ int inodes; + struct mempolicy *mpol; + kuid_t uid; + kgid_t gid; +@@ -127,11 +127,14 @@ + return totalram_pages() / 2; + } + +-static unsigned long shmem_default_max_inodes(void) ++static int shmem_default_max_inodes(void) + { + unsigned long nr_pages = totalram_pages(); ++ unsigned long ul; + +- return min(nr_pages - totalhigh_pages(), nr_pages / 2); ++ ul = INT_MAX; ++ ul = min3(ul, nr_pages - totalhigh_pages(), nr_pages / 2); ++ return ul; + } + #endif + +@@ -1163,6 +1166,11 @@ + + simple_xattrs_free(&info->xattrs); + WARN_ON(inode->i_blocks); ++ if (!sbinfo->idr_nouse && inode->i_ino) { ++ mutex_lock(&sbinfo->idr_lock); ++ idr_remove(&sbinfo->idr, inode->i_ino); ++ mutex_unlock(&sbinfo->idr_lock); ++ } + shmem_free_inode(inode->i_sb); + clear_inode(inode); + } +@@ -2338,6 +2346,25 @@ + break; + } + ++ if (!sbinfo->idr_nouse) { ++ /* inum 0 and 1 are unused */ ++ mutex_lock(&sbinfo->idr_lock); ++ ino = idr_alloc(&sbinfo->idr, inode, 2, INT_MAX, ++ GFP_NOFS); ++ if (ino > 0) { ++ inode->i_ino = ino; ++ mutex_unlock(&sbinfo->idr_lock); ++ __insert_inode_hash(inode, inode->i_ino); ++ } else { ++ inode->i_ino = 0; ++ mutex_unlock(&sbinfo->idr_lock); ++ iput(inode); ++ /* shmem_free_inode() will be called */ ++ inode = NULL; ++ } ++ } else ++ inode->i_ino = ino; ++ + lockdep_annotate_inode_mutex_key(inode); + } else + shmem_free_inode(sb); +@@ -3229,8 +3256,7 @@ + static int shmem_match(struct inode *ino, void *vfh) + { + __u32 *fh = vfh; +- __u64 inum = fh[2]; +- inum = (inum << 32) | fh[1]; ++ __u64 inum = fh[1]; + return ino->i_ino == inum && fh[0] == ino->i_generation; + } + +@@ -3250,14 +3276,11 @@ + struct dentry *dentry = NULL; + u64 inum; + +- if (fh_len < 3) ++ if (fh_len < 2) + return NULL; + +- inum = fid->raw[2]; +- inum = (inum << 32) | fid->raw[1]; +- +- inode = ilookup5(sb, (unsigned long)(inum + fid->raw[0]), +- shmem_match, fid->raw); ++ inum = fid->raw[1]; ++ inode = ilookup5(sb, inum, shmem_match, fid->raw); + if (inode) { + dentry = shmem_find_alias(inode); + iput(inode); +@@ -3269,30 +3292,15 @@ + static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len, + struct inode *parent) + { +- if (*len < 3) { +- *len = 3; ++ if (*len < 2) { ++ *len = 2; + return FILEID_INVALID; + } + +- if (inode_unhashed(inode)) { +- /* Unfortunately insert_inode_hash is not idempotent, +- * so as we hash inodes here rather than at creation +- * time, we need a lock to ensure we only try +- * to do it once +- */ +- static DEFINE_SPINLOCK(lock); +- spin_lock(&lock); +- if (inode_unhashed(inode)) +- __insert_inode_hash(inode, +- inode->i_ino + inode->i_generation); +- spin_unlock(&lock); +- } +- + fh[0] = inode->i_generation; + fh[1] = inode->i_ino; +- fh[2] = ((__u64)inode->i_ino) >> 32; + +- *len = 3; ++ *len = 2; + return 1; + } + +@@ -3371,7 +3379,7 @@ + break; + case Opt_nr_inodes: + ctx->inodes = memparse(param->string, &rest); +- if (*rest) ++ if (*rest || ctx->inodes < 2) + goto bad_value; + ctx->seen |= SHMEM_SEEN_INODES; + break; +@@ -3481,7 +3489,7 @@ + { + struct shmem_options *ctx = fc->fs_private; + struct shmem_sb_info *sbinfo = SHMEM_SB(fc->root->d_sb); +- unsigned long inodes; ++ int inodes; + struct mempolicy *mpol = NULL; + const char *err; + +@@ -3550,7 +3558,7 @@ + seq_printf(seq, ",size=%luk", + sbinfo->max_blocks << (PAGE_SHIFT - 10)); + if (sbinfo->max_inodes != shmem_default_max_inodes()) +- seq_printf(seq, ",nr_inodes=%lu", sbinfo->max_inodes); ++ seq_printf(seq, ",nr_inodes=%d", sbinfo->max_inodes); + if (sbinfo->mode != (0777 | S_ISVTX)) + seq_printf(seq, ",mode=%03ho", sbinfo->mode); + if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID)) +@@ -3597,6 +3605,8 @@ + { + struct shmem_sb_info *sbinfo = SHMEM_SB(sb); + ++ if (!sbinfo->idr_nouse) ++ idr_destroy(&sbinfo->idr); + free_percpu(sbinfo->ino_batch); + percpu_counter_destroy(&sbinfo->used_blocks); + mpol_put(sbinfo->mpol); +@@ -3639,6 +3649,8 @@ + #else + sb->s_flags |= SB_NOUSER; + #endif ++ mutex_init(&sbinfo->idr_lock); ++ idr_init(&sbinfo->idr); + sbinfo->max_blocks = ctx->blocks; + sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes; + if (sb->s_flags & SB_KERNMOUNT) { +@@ -3756,6 +3768,15 @@ + kmem_cache_destroy(shmem_inode_cachep); + } + ++static __init void shmem_no_idr(struct super_block *sb) ++{ ++ struct shmem_sb_info *sbinfo; ++ ++ sbinfo = SHMEM_SB(sb); ++ sbinfo->idr_nouse = true; ++ idr_destroy(&sbinfo->idr); ++} ++ + const struct address_space_operations shmem_aops = { + .writepage = shmem_writepage, + .set_page_dirty = __set_page_dirty_no_writeback, +@@ -3897,6 +3918,7 @@ + pr_err("Could not kern_mount tmpfs\n"); + goto out1; + } ++ shmem_no_idr(shm_mnt->mnt_sb); + + #ifdef CONFIG_TRANSPARENT_HUGEPAGE + if (has_transparent_hugepage() && shmem_huge > SHMEM_HUGE_DENY) +diff -ruN a/security/security.c b/security/security.c +--- a/security/security.c 2022-04-23 14:19:56.005932631 +0300 ++++ b/security/security.c 2022-04-23 14:21:32.583041822 +0300 +@@ -1172,6 +1172,7 @@ + return 0; + return call_int_hook(path_rmdir, 0, dir, dentry); + } ++EXPORT_SYMBOL_GPL(security_path_rmdir); + + int security_path_unlink(const struct path *dir, struct dentry *dentry) + { +@@ -1188,6 +1189,7 @@ + return 0; + return call_int_hook(path_symlink, 0, dir, dentry, old_name); + } ++EXPORT_SYMBOL_GPL(security_path_symlink); + + int security_path_link(struct dentry *old_dentry, const struct path *new_dir, + struct dentry *new_dentry) +@@ -1196,6 +1198,7 @@ + return 0; + return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); + } ++EXPORT_SYMBOL_GPL(security_path_link); + + int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, + const struct path *new_dir, struct dentry *new_dentry, +@@ -1223,6 +1226,7 @@ + return 0; + return call_int_hook(path_truncate, 0, path); + } ++EXPORT_SYMBOL_GPL(security_path_truncate); + + int security_path_chmod(const struct path *path, umode_t mode) + { +@@ -1230,6 +1234,7 @@ + return 0; + return call_int_hook(path_chmod, 0, path, mode); + } ++EXPORT_SYMBOL_GPL(security_path_chmod); + + int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) + { +@@ -1237,6 +1242,7 @@ + return 0; + return call_int_hook(path_chown, 0, path, uid, gid); + } ++EXPORT_SYMBOL_GPL(security_path_chown); + + int security_path_chroot(const struct path *path) + { +@@ -1337,6 +1343,7 @@ + return 0; + return call_int_hook(inode_permission, 0, inode, mask); + } ++EXPORT_SYMBOL_GPL(security_inode_permission); + + int security_inode_setattr(struct dentry *dentry, struct iattr *attr) + { +@@ -1534,6 +1541,7 @@ + + return fsnotify_perm(file, mask); + } ++EXPORT_SYMBOL_GPL(security_file_permission); + + int security_file_alloc(struct file *file) + { diff --git a/kernel-5.16-mt7921.patch b/kernel-5.16-mt7921.patch deleted file mode 100644 index 034c13d..0000000 --- a/kernel-5.16-mt7921.patch +++ /dev/null @@ -1,336 +0,0 @@ -# from https://patchwork.kernel.org/project/linux-wireless/patch/70e27cbc652cbdb78277b9c691a3a5ba02653afb.1641540175.git.objelf@gmail.com/ - -diff -ruN a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c ---- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c 2022-01-10 07:55:34.000000000 +0900 -+++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c 2022-04-07 15:30:48.732117575 +0900 -@@ -78,110 +78,6 @@ - mt76_wr(dev, MT_WFDMA0_TX_RING17_EXT_CTRL, PREFETCH(0x380, 0x4)); - } - --static u32 __mt7921_reg_addr(struct mt7921_dev *dev, u32 addr) --{ -- static const struct { -- u32 phys; -- u32 mapped; -- u32 size; -- } fixed_map[] = { -- { 0x820d0000, 0x30000, 0x10000 }, /* WF_LMAC_TOP (WF_WTBLON) */ -- { 0x820ed000, 0x24800, 0x0800 }, /* WF_LMAC_TOP BN0 (WF_MIB) */ -- { 0x820e4000, 0x21000, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_TMAC) */ -- { 0x820e7000, 0x21e00, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_DMA) */ -- { 0x820eb000, 0x24200, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_LPON) */ -- { 0x820e2000, 0x20800, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_AGG) */ -- { 0x820e3000, 0x20c00, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_ARB) */ -- { 0x820e5000, 0x21400, 0x0800 }, /* WF_LMAC_TOP BN0 (WF_RMAC) */ -- { 0x00400000, 0x80000, 0x10000 }, /* WF_MCU_SYSRAM */ -- { 0x00410000, 0x90000, 0x10000 }, /* WF_MCU_SYSRAM (configure register) */ -- { 0x40000000, 0x70000, 0x10000 }, /* WF_UMAC_SYSRAM */ -- { 0x54000000, 0x02000, 0x1000 }, /* WFDMA PCIE0 MCU DMA0 */ -- { 0x55000000, 0x03000, 0x1000 }, /* WFDMA PCIE0 MCU DMA1 */ -- { 0x58000000, 0x06000, 0x1000 }, /* WFDMA PCIE1 MCU DMA0 (MEM_DMA) */ -- { 0x59000000, 0x07000, 0x1000 }, /* WFDMA PCIE1 MCU DMA1 */ -- { 0x7c000000, 0xf0000, 0x10000 }, /* CONN_INFRA */ -- { 0x7c020000, 0xd0000, 0x10000 }, /* CONN_INFRA, WFDMA */ -- { 0x7c060000, 0xe0000, 0x10000 }, /* CONN_INFRA, conn_host_csr_top */ -- { 0x80020000, 0xb0000, 0x10000 }, /* WF_TOP_MISC_OFF */ -- { 0x81020000, 0xc0000, 0x10000 }, /* WF_TOP_MISC_ON */ -- { 0x820c0000, 0x08000, 0x4000 }, /* WF_UMAC_TOP (PLE) */ -- { 0x820c8000, 0x0c000, 0x2000 }, /* WF_UMAC_TOP (PSE) */ -- { 0x820cc000, 0x0e000, 0x1000 }, /* WF_UMAC_TOP (PP) */ -- { 0x820cd000, 0x0f000, 0x1000 }, /* WF_MDP_TOP */ -- { 0x820ce000, 0x21c00, 0x0200 }, /* WF_LMAC_TOP (WF_SEC) */ -- { 0x820cf000, 0x22000, 0x1000 }, /* WF_LMAC_TOP (WF_PF) */ -- { 0x820e0000, 0x20000, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_CFG) */ -- { 0x820e1000, 0x20400, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_TRB) */ -- { 0x820e9000, 0x23400, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_WTBLOFF) */ -- { 0x820ea000, 0x24000, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_ETBF) */ -- { 0x820ec000, 0x24600, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_INT) */ -- { 0x820f0000, 0xa0000, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_CFG) */ -- { 0x820f1000, 0xa0600, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_TRB) */ -- { 0x820f2000, 0xa0800, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_AGG) */ -- { 0x820f3000, 0xa0c00, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_ARB) */ -- { 0x820f4000, 0xa1000, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_TMAC) */ -- { 0x820f5000, 0xa1400, 0x0800 }, /* WF_LMAC_TOP BN1 (WF_RMAC) */ -- { 0x820f7000, 0xa1e00, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_DMA) */ -- { 0x820f9000, 0xa3400, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_WTBLOFF) */ -- { 0x820fa000, 0xa4000, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_ETBF) */ -- { 0x820fb000, 0xa4200, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_LPON) */ -- { 0x820fc000, 0xa4600, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_INT) */ -- { 0x820fd000, 0xa4800, 0x0800 }, /* WF_LMAC_TOP BN1 (WF_MIB) */ -- }; -- int i; -- -- if (addr < 0x100000) -- return addr; -- -- for (i = 0; i < ARRAY_SIZE(fixed_map); i++) { -- u32 ofs; -- -- if (addr < fixed_map[i].phys) -- continue; -- -- ofs = addr - fixed_map[i].phys; -- if (ofs > fixed_map[i].size) -- continue; -- -- return fixed_map[i].mapped + ofs; -- } -- -- if ((addr >= 0x18000000 && addr < 0x18c00000) || -- (addr >= 0x70000000 && addr < 0x78000000) || -- (addr >= 0x7c000000 && addr < 0x7c400000)) -- return mt7921_reg_map_l1(dev, addr); -- -- dev_err(dev->mt76.dev, "Access currently unsupported address %08x\n", -- addr); -- -- return 0; --} -- --static u32 mt7921_rr(struct mt76_dev *mdev, u32 offset) --{ -- struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -- u32 addr = __mt7921_reg_addr(dev, offset); -- -- return dev->bus_ops->rr(mdev, addr); --} -- --static void mt7921_wr(struct mt76_dev *mdev, u32 offset, u32 val) --{ -- struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -- u32 addr = __mt7921_reg_addr(dev, offset); -- -- dev->bus_ops->wr(mdev, addr, val); --} -- --static u32 mt7921_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val) --{ -- struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -- u32 addr = __mt7921_reg_addr(dev, offset); -- -- return dev->bus_ops->rmw(mdev, addr, mask, val); --} -- - static int mt7921_dma_disable(struct mt7921_dev *dev, bool force) - { - if (force) { -@@ -341,23 +237,8 @@ - - int mt7921_dma_init(struct mt7921_dev *dev) - { -- struct mt76_bus_ops *bus_ops; - int ret; - -- dev->phy.dev = dev; -- dev->phy.mt76 = &dev->mt76.phy; -- dev->mt76.phy.priv = &dev->phy; -- dev->bus_ops = dev->mt76.bus; -- bus_ops = devm_kmemdup(dev->mt76.dev, dev->bus_ops, sizeof(*bus_ops), -- GFP_KERNEL); -- if (!bus_ops) -- return -ENOMEM; -- -- bus_ops->rr = mt7921_rr; -- bus_ops->wr = mt7921_wr; -- bus_ops->rmw = mt7921_rmw; -- dev->mt76.bus = bus_ops; -- - mt76_dma_attach(&dev->mt76); - - ret = mt7921_dma_disable(dev, true); -diff -ruN a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h ---- a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h 2022-04-07 14:57:32.438280351 +0900 -+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h 2022-04-07 15:31:08.405115971 +0900 -@@ -452,6 +452,7 @@ - int mt7921s_wfsys_reset(struct mt7921_dev *dev); - int mt7921s_mac_reset(struct mt7921_dev *dev); - int mt7921s_init_reset(struct mt7921_dev *dev); -+int __mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev); - int mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev); - int mt7921e_mcu_fw_pmctrl(struct mt7921_dev *dev); - -diff -ruN a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c ---- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c 2022-04-07 14:57:32.438280351 +0900 -+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c 2022-04-07 15:34:12.630100949 +0900 -@@ -119,6 +119,110 @@ - mt76_free_device(&dev->mt76); - } - -+static u32 __mt7921_reg_addr(struct mt7921_dev *dev, u32 addr) -+{ -+ static const struct { -+ u32 phys; -+ u32 mapped; -+ u32 size; -+ } fixed_map[] = { -+ { 0x820d0000, 0x30000, 0x10000 }, /* WF_LMAC_TOP (WF_WTBLON) */ -+ { 0x820ed000, 0x24800, 0x0800 }, /* WF_LMAC_TOP BN0 (WF_MIB) */ -+ { 0x820e4000, 0x21000, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_TMAC) */ -+ { 0x820e7000, 0x21e00, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_DMA) */ -+ { 0x820eb000, 0x24200, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_LPON) */ -+ { 0x820e2000, 0x20800, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_AGG) */ -+ { 0x820e3000, 0x20c00, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_ARB) */ -+ { 0x820e5000, 0x21400, 0x0800 }, /* WF_LMAC_TOP BN0 (WF_RMAC) */ -+ { 0x00400000, 0x80000, 0x10000 }, /* WF_MCU_SYSRAM */ -+ { 0x00410000, 0x90000, 0x10000 }, /* WF_MCU_SYSRAM (configure register) */ -+ { 0x40000000, 0x70000, 0x10000 }, /* WF_UMAC_SYSRAM */ -+ { 0x54000000, 0x02000, 0x1000 }, /* WFDMA PCIE0 MCU DMA0 */ -+ { 0x55000000, 0x03000, 0x1000 }, /* WFDMA PCIE0 MCU DMA1 */ -+ { 0x58000000, 0x06000, 0x1000 }, /* WFDMA PCIE1 MCU DMA0 (MEM_DMA) */ -+ { 0x59000000, 0x07000, 0x1000 }, /* WFDMA PCIE1 MCU DMA1 */ -+ { 0x7c000000, 0xf0000, 0x10000 }, /* CONN_INFRA */ -+ { 0x7c020000, 0xd0000, 0x10000 }, /* CONN_INFRA, WFDMA */ -+ { 0x7c060000, 0xe0000, 0x10000 }, /* CONN_INFRA, conn_host_csr_top */ -+ { 0x80020000, 0xb0000, 0x10000 }, /* WF_TOP_MISC_OFF */ -+ { 0x81020000, 0xc0000, 0x10000 }, /* WF_TOP_MISC_ON */ -+ { 0x820c0000, 0x08000, 0x4000 }, /* WF_UMAC_TOP (PLE) */ -+ { 0x820c8000, 0x0c000, 0x2000 }, /* WF_UMAC_TOP (PSE) */ -+ { 0x820cc000, 0x0e000, 0x1000 }, /* WF_UMAC_TOP (PP) */ -+ { 0x820cd000, 0x0f000, 0x1000 }, /* WF_MDP_TOP */ -+ { 0x820ce000, 0x21c00, 0x0200 }, /* WF_LMAC_TOP (WF_SEC) */ -+ { 0x820cf000, 0x22000, 0x1000 }, /* WF_LMAC_TOP (WF_PF) */ -+ { 0x820e0000, 0x20000, 0x0400 }, /* WF_LMAC_TOP BN0 (WF_CFG) */ -+ { 0x820e1000, 0x20400, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_TRB) */ -+ { 0x820e9000, 0x23400, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_WTBLOFF) */ -+ { 0x820ea000, 0x24000, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_ETBF) */ -+ { 0x820ec000, 0x24600, 0x0200 }, /* WF_LMAC_TOP BN0 (WF_INT) */ -+ { 0x820f0000, 0xa0000, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_CFG) */ -+ { 0x820f1000, 0xa0600, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_TRB) */ -+ { 0x820f2000, 0xa0800, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_AGG) */ -+ { 0x820f3000, 0xa0c00, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_ARB) */ -+ { 0x820f4000, 0xa1000, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_TMAC) */ -+ { 0x820f5000, 0xa1400, 0x0800 }, /* WF_LMAC_TOP BN1 (WF_RMAC) */ -+ { 0x820f7000, 0xa1e00, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_DMA) */ -+ { 0x820f9000, 0xa3400, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_WTBLOFF) */ -+ { 0x820fa000, 0xa4000, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_ETBF) */ -+ { 0x820fb000, 0xa4200, 0x0400 }, /* WF_LMAC_TOP BN1 (WF_LPON) */ -+ { 0x820fc000, 0xa4600, 0x0200 }, /* WF_LMAC_TOP BN1 (WF_INT) */ -+ { 0x820fd000, 0xa4800, 0x0800 }, /* WF_LMAC_TOP BN1 (WF_MIB) */ -+ }; -+ int i; -+ -+ if (addr < 0x100000) -+ return addr; -+ -+ for (i = 0; i < ARRAY_SIZE(fixed_map); i++) { -+ u32 ofs; -+ -+ if (addr < fixed_map[i].phys) -+ continue; -+ -+ ofs = addr - fixed_map[i].phys; -+ if (ofs > fixed_map[i].size) -+ continue; -+ -+ return fixed_map[i].mapped + ofs; -+ } -+ -+ if ((addr >= 0x18000000 && addr < 0x18c00000) || -+ (addr >= 0x70000000 && addr < 0x78000000) || -+ (addr >= 0x7c000000 && addr < 0x7c400000)) -+ return mt7921_reg_map_l1(dev, addr); -+ -+ dev_err(dev->mt76.dev, "Access currently unsupported address %08x\n", -+ addr); -+ -+ return 0; -+} -+ -+static u32 mt7921_rr(struct mt76_dev *mdev, u32 offset) -+{ -+ struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -+ u32 addr = __mt7921_reg_addr(dev, offset); -+ -+ return dev->bus_ops->rr(mdev, addr); -+} -+ -+static void mt7921_wr(struct mt76_dev *mdev, u32 offset, u32 val) -+{ -+ struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -+ u32 addr = __mt7921_reg_addr(dev, offset); -+ -+ dev->bus_ops->wr(mdev, addr, val); -+} -+ -+static u32 mt7921_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val) -+{ -+ struct mt7921_dev *dev = container_of(mdev, struct mt7921_dev, mt76); -+ u32 addr = __mt7921_reg_addr(dev, offset); -+ -+ return dev->bus_ops->rmw(mdev, addr, mask, val); -+} -+ - static int mt7921_pci_probe(struct pci_dev *pdev, - const struct pci_device_id *id) - { -@@ -148,7 +252,7 @@ - .drv_own = mt7921e_mcu_drv_pmctrl, - .fw_own = mt7921e_mcu_fw_pmctrl, - }; -- -+ struct mt76_bus_ops *bus_ops; - struct mt7921_dev *dev; - struct mt76_dev *mdev; - int ret; -@@ -186,6 +290,25 @@ - - mt76_mmio_init(&dev->mt76, pcim_iomap_table(pdev)[0]); - tasklet_init(&dev->irq_tasklet, mt7921_irq_tasklet, (unsigned long)dev); -+ -+ dev->phy.dev = dev; -+ dev->phy.mt76 = &dev->mt76.phy; -+ dev->mt76.phy.priv = &dev->phy; -+ dev->bus_ops = dev->mt76.bus; -+ bus_ops = devm_kmemdup(dev->mt76.dev, dev->bus_ops, sizeof(*bus_ops), -+ GFP_KERNEL); -+ if (!bus_ops) -+ return -ENOMEM; -+ -+ bus_ops->rr = mt7921_rr; -+ bus_ops->wr = mt7921_wr; -+ bus_ops->rmw = mt7921_rmw; -+ dev->mt76.bus = bus_ops; -+ -+ ret = __mt7921e_mcu_drv_pmctrl(dev); -+ if (ret) -+ return ret; -+ - mdev->rev = (mt7921_l1_rr(dev, MT_HW_CHIPID) << 16) | - (mt7921_l1_rr(dev, MT_HW_REV) & 0xff); - dev_err(mdev->dev, "ASIC revision: %04x\n", mdev->rev); -diff -ruN a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c ---- a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c 2022-04-07 14:57:32.438280351 +0900 -+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c 2022-04-07 16:06:51.397941233 +0900 -@@ -59,10 +59,8 @@ - return err; - } - --int mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev) -+int __mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev) - { -- struct mt76_phy *mphy = &dev->mt76.phy; -- struct mt76_connac_pm *pm = &dev->pm; - int i, err = 0; - - for (i = 0; i < MT7921_DRV_OWN_RETRY_COUNT; i++) { -@@ -75,8 +73,19 @@ - if (i == MT7921_DRV_OWN_RETRY_COUNT) { - dev_err(dev->mt76.dev, "driver own failed\n"); - err = -EIO; -- goto out; - } -+ return err; -+} -+ -+int mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev) -+{ -+ struct mt76_phy *mphy = &dev->mt76.phy; -+ struct mt76_connac_pm *pm = &dev->pm; -+ int err; -+ -+ err = __mt7921e_mcu_drv_pmctrl(dev); -+ if (err < 0) -+ goto out; - - mt7921_wpdma_reinit_cond(dev); - clear_bit(MT76_STATE_PM, &mphy->state); diff --git a/kernel-arm64.config b/kernel-arm64.config index 46daeb3..8a5ce2a 100644 --- a/kernel-arm64.config +++ b/kernel-arm64.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 5.16.18 Kernel Configuration +# Linux/arm64 5.16.20 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0 20210728 (ROSA)" CONFIG_CC_IS_GCC=y @@ -3226,6 +3226,7 @@ CONFIG_NET_DSA_XRS700X=m CONFIG_NET_DSA_XRS700X_I2C=m CONFIG_NET_DSA_XRS700X_MDIO=m CONFIG_NET_DSA_QCA8K=m +CONFIG_NET_DSA_REALTEK=m CONFIG_NET_DSA_REALTEK_SMI=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m diff --git a/kernel-i686.config b/kernel-i686.config index d809439..4035be3 100644 --- a/kernel-i686.config +++ b/kernel-i686.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.16.18 Kernel Configuration +# Linux/x86 5.16.20 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0 20210728 (ROSA)" CONFIG_CC_IS_GCC=y @@ -3153,6 +3153,7 @@ CONFIG_NET_DSA_XRS700X=m CONFIG_NET_DSA_XRS700X_I2C=m CONFIG_NET_DSA_XRS700X_MDIO=m CONFIG_NET_DSA_QCA8K=m +CONFIG_NET_DSA_REALTEK=m CONFIG_NET_DSA_REALTEK_SMI=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m @@ -10769,7 +10770,6 @@ CONFIG_FRAME_WARN=2048 # CONFIG_HEADERS_INSTALL is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y -# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set CONFIG_FRAME_POINTER=y # CONFIG_VMLINUX_MAP is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 013c051..da8ea20 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.16.18 Kernel Configuration +# Linux/x86 5.16.20 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0 20210728 (ROSA)" CONFIG_CC_IS_GCC=y @@ -3131,6 +3131,7 @@ CONFIG_NET_DSA_XRS700X=m CONFIG_NET_DSA_XRS700X_I2C=m CONFIG_NET_DSA_XRS700X_MDIO=m CONFIG_NET_DSA_QCA8K=m +CONFIG_NET_DSA_REALTEK=m CONFIG_NET_DSA_REALTEK_SMI=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m diff --git a/kernel.spec b/kernel.spec index 9ebeb5a..2900560 100644 --- a/kernel.spec +++ b/kernel.spec @@ -361,7 +361,6 @@ Patch0609: 0609-Baikal-M-video-unit-driver.patch Patch0616: 0616-Baikal-M-PCIe-driver-from-SDK-M-4.3.patch Patch0617: 0617-Baikal-M-PCIe-driver-from-SDK-M-4.4.patch Patch0619: 0619-panfrost-compatibility-with-Baikal-M-firmware-from-S.patch -Patch0620: kernel-5.16-mt7921.patch # Disable AutoReq AutoReq: 0