[packages/kernel/LINUX_6_12] Up to 6.12.12

arekm arekm at pld-linux.org
Tue Feb 4 15:13:10 CET 2025


commit 020b7f548a286112c2ab594a7755c4af2dcfefec
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Feb 4 14:30:20 2025 +0100

    Up to 6.12.12

 kernel-aufs.patch | 766 ++++++++++++++++++++++++++++++++----------------------
 kernel.spec       |   4 +-
 update-source.sh  |   4 +-
 3 files changed, 459 insertions(+), 315 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index cc74896f..63d2f336 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -53,7 +53,7 @@
 
 %define		rel		1
 %define		basever		6.12
-%define		postver		.11
+%define		postver		.12
 
 # define this to '-%{basever}' for longterm branch
 %define		versuffix	-%{basever}
@@ -107,7 +107,7 @@ Source0:	https://www.kernel.org/pub/linux/kernel/v6.x/linux-%{basever}.tar.xz
 # Source0-md5:	844fae6a58c7f43af44d8cea8484b4a1
 %if "%{postver}" != ".0"
 Patch0:		https://www.kernel.org/pub/linux/kernel/v6.x/patch-%{version}.xz
-# Patch0-md5:	4323ba493b039d2303e1c497bb4055b7
+# Patch0-md5:	7d97f10e9720c2df78eda9fb818819dc
 %endif
 Source1:	kernel.sysconfig
 
diff --git a/kernel-aufs.patch b/kernel-aufs.patch
index 905cd70a..3f2a7e7d 100644
--- a/kernel-aufs.patch
+++ b/kernel-aufs.patch
@@ -1,5 +1,5 @@
 SPDX-License-Identifier: GPL-2.0
-aufs6.x-rcN kbuild patch
+aufs6.12 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
 index aae170fc2795..d5bb584649f5 100644
@@ -23,10 +23,10 @@ index 61679fd587b7..b2539712b80d 100644
  obj-$(CONFIG_BPF_LSM)		+= bpf_fs_kfuncs.o
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 SPDX-License-Identifier: GPL-2.0
-aufs6.x-rcN base patch
+aufs6.12 base patch
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 21fdaa19229a..e60ed502f8ef 100644
+index b878ddc99f94..8489754030b9 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -3666,6 +3666,19 @@ F:	kernel/audit*
@@ -243,7 +243,7 @@ index 536bd471557f..34b378cf7a95 100644
  #ifdef CONFIG_LOCK_STAT
  static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);
 SPDX-License-Identifier: GPL-2.0
-aufs6.x-rcN mmap patch
+aufs6.12 mmap patch
 
 diff --git a/fs/proc/base.c b/fs/proc/base.c
 index b31283d81c52..644bd3d84cf7 100644
@@ -275,7 +275,7 @@ index c6e7ebc63756..d7ccfd909764 100644
  		ino = inode->i_ino;
  	}
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index e52bd96137a6..9494d69abaad 100644
+index 7eb010de39fe..0c576103f7f1 100644
 --- a/fs/proc/task_mmu.c
 +++ b/fs/proc/task_mmu.c
 @@ -264,7 +264,8 @@ static void get_vma_name(struct vm_area_struct *vma,
@@ -298,7 +298,7 @@ index e52bd96137a6..9494d69abaad 100644
  
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
-@@ -3006,7 +3008,7 @@ static int show_numa_map(struct seq_file *m, void *v)
+@@ -3008,7 +3010,7 @@ static int show_numa_map(struct seq_file *m, void *v)
  	struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
  	struct vm_area_struct *vma = v;
  	struct numa_maps *md = &numa_priv->md;
@@ -431,7 +431,7 @@ index 56fa431c52af..d55fe4e7bcfd 100644
  	if (folio->mapping != mapping) {
  		folio_unlock(folio);
 diff --git a/mm/mmap.c b/mm/mmap.c
-index 79d541f1502b..50430bfa4d82 100644
+index 79d541f1502b..2dc64f6dc018 100644
 --- a/mm/mmap.c
 +++ b/mm/mmap.c
 @@ -1484,7 +1484,7 @@ static unsigned long __mmap_region(struct file *file, unsigned long addr,
@@ -447,18 +447,20 @@ index 79d541f1502b..50430bfa4d82 100644
  	unsigned long ret = -EINVAL;
  	struct file *file;
  	vm_flags_t vm_flags;
-+	struct file *prfile;
++	struct file *prfile = NULL; /* aufs */
  
  	pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/mm/remap_file_pages.rst.\n",
  		     current->comm, current->pid);
-@@ -1696,14 +1697,16 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -1696,14 +1697,18 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
  
  	/* Save vm_flags used to calculate prot and flags, and recheck later. */
  	vm_flags = vma->vm_flags;
 -	file = get_file(vma->vm_file);
 +	vma_get_file(vma);
 +	file = vma->vm_file;
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +	prfile = vma->vm_prfile;
++#endif
  
  	mmap_read_unlock(mm);
  
@@ -470,7 +472,7 @@ index 79d541f1502b..50430bfa4d82 100644
  		return ret;
  	}
  
-@@ -1711,7 +1714,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -1711,7 +1716,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
  
  	/* OK security check passed, take write lock + let it rip. */
  	if (mmap_write_lock_killable(mm)) {
@@ -479,10 +481,11 @@ index 79d541f1502b..50430bfa4d82 100644
  		return -EINTR;
  	}
  
-@@ -1753,9 +1756,25 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -1753,9 +1758,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
  
  	ret = do_mmap(vma->vm_file, start, size,
  			prot, flags, 0, pgoff, &populate, NULL);
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +	if (!IS_ERR_VALUE(ret) && file && prfile) {
 +		struct vm_area_struct *new_vma;
 +
@@ -492,6 +495,7 @@ index 79d541f1502b..50430bfa4d82 100644
 +		if (prfile)
 +			get_file(prfile);
 +	}
++#endif
 +
  out:
  	mmap_write_unlock(mm);
@@ -506,7 +510,7 @@ index 79d541f1502b..50430bfa4d82 100644
  		mm_populate(ret, populate);
  	if (!IS_ERR_VALUE(ret))
 diff --git a/mm/nommu.c b/mm/nommu.c
-index e9b5f527ab5b..0f069bf29964 100644
+index 9cb6e99215e2..5add36afa978 100644
 --- a/mm/nommu.c
 +++ b/mm/nommu.c
 @@ -512,7 +512,7 @@ static void __put_nommu_region(struct vm_region *region)
@@ -551,7 +555,7 @@ index e9b5f527ab5b..0f069bf29964 100644
  
 diff --git a/mm/prfile.c b/mm/prfile.c
 new file mode 100644
-index 000000000000..8f820a235364
+index 000000000000..b034d160a18f
 --- /dev/null
 +++ b/mm/prfile.c
 @@ -0,0 +1,86 @@
@@ -563,7 +567,7 @@ index 000000000000..8f820a235364
 + *
 + * See Documentation/filesystems/aufs/design/06mmap.txt
 + *
-+ * Copyright (c) 2014-2022 Junjro R. Okajima
++ * Copyright (c) 2014-2025 Junjro R. Okajima
 + * Copyright (c) 2014 Ian Campbell
 + */
 +
@@ -691,7 +695,7 @@ index 7621384d64cf..3bb41fe6ac48 100644
  	unlink_anon_vmas(new_vma);
  out_free_mempol:
 SPDX-License-Identifier: GPL-2.0
-aufs6.x-rcN standalone patch
+aufs6.12 standalone patch
 
 diff --git a/fs/dcache.c b/fs/dcache.c
 index 1ab11cad60e8..3a01c42c6639 100644
@@ -1038,10 +1042,10 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +		will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt	2022-11-05 23:02:18.955889283 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,171 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -1213,10 +1217,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt	2022-11-05 23:02:18.955889283 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,258 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -1475,10 +1479,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +For this purpose, use "aumvdown" command in aufs-util.git.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2022-11-05 23:02:18.955889283 +0100
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,85 @@
 +
-+# Copyright (C) 2015-2022 Junjiro R. Okajima
++# Copyright (C) 2015-2025 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
@@ -1564,10 +1568,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.t
 +       be implemented in aufs, but not all I am afraid.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,113 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -1681,10 +1685,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +   by over-mounting something (or another method).
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,74 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -1759,10 +1763,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +    same named entry on the upper branch.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,64 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -1875,10 +1879,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot li
 +}
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,102 @@
 +
-+# Copyright (C) 2017-2022 Junjiro R. Okajima
++# Copyright (C) 2017-2025 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
@@ -1981,10 +1985,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li
 +equivalen to udba=reval case.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,118 @@
 +
-+# Copyright (C) 2011-2022 Junjiro R. Okajima
++# Copyright (C) 2011-2025 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
@@ -2103,10 +2107,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linu
 +should restore the original file state after an error happens.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,72 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -2179,10 +2183,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +I have to give up this "looks-smater" approach.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,94 @@
 +
-+# Copyright (C) 2014-2022 Junjiro R. Okajima
++# Copyright (C) 2014-2025 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
@@ -2277,10 +2281,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt lin
 +now, aufs implements the branch attributes to ignore the error.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,58 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -2339,10 +2343,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +  lookup_one_len(), vfs_getattr(), encode_fh() and others.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,52 @@
 +
-+# Copyright (C) 2005-2022 Junjiro R. Okajima
++# Copyright (C) 2005-2025 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
@@ -2395,10 +2399,10 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +initramfs will use it to replace the old one at the next boot.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2022-11-05 23:02:18.959222617 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,47 @@
 +
-+# Copyright (C) 2010-2022 Junjiro R. Okajima
++# Copyright (C) 2010-2025 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
@@ -2859,11 +2863,11 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +# End: ;
 diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 --- /usr/share/empty/fs/aufs/aufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h	2022-11-05 23:02:18.959222617 +0100
++++ linux/fs/aufs/aufs.h	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,62 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -2925,11 +2929,11 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c	2024-11-10 01:09:28.603051194 +0100
++++ linux/fs/aufs/branch.c	2025-02-04 12:14:49.456605780 +0100
 @@ -0,0 +1,1427 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -3172,7 +3176,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +
 +	inode = d_inode(add->path.dentry);
 +	err = -ENOENT;
-+	if (unlikely(!inode->i_nlink)) {
++	if (unlikely(!vfsub_inode_nlink(inode, AU_I_UNKNOWN))) {
 +		pr_err("no existence %s\n", add->pathname);
 +		goto out;
 +	}
@@ -3422,14 +3426,14 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	bbot = au_sbbot(sb);
 +	amount = bbot + 1 - bindex;
 +	h_dentry = au_br_dentry(br);
-+	au_sbilist_lock();
++	au_sbilist_write_lock();
 +	au_br_do_add_brp(au_sbi(sb), bindex, br, bbot, amount);
 +	au_br_do_add_hdp(au_di(root), bindex, bbot, amount);
 +	au_br_do_add_hip(au_ii(root_inode), bindex, bbot, amount);
 +	au_set_h_dptr(root, bindex, dget(h_dentry));
 +	h_inode = d_inode(h_dentry);
 +	au_set_h_iptr(root_inode, bindex, au_igrab(h_inode), /*flags*/0);
-+	au_sbilist_unlock();
++	au_sbilist_write_unlock();
 +}
 +
 +int au_br_add(struct super_block *sb, struct au_opt_add *add, int remount)
@@ -3907,11 +3911,11 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +	h_inode = au_igrab(hinode->hi_inode);
 +	au_hiput(hinode);
 +
-+	au_sbilist_lock();
++	au_sbilist_write_lock();
 +	au_br_do_del_brp(sbinfo, bindex, bbot);
 +	au_br_do_del_hdp(au_di(root), bindex, bbot);
 +	au_br_do_del_hip(au_ii(inode), bindex, bbot);
-+	au_sbilist_unlock();
++	au_sbilist_write_unlock();
 +
 +	/* ignore an error */
 +	au_dr_br_fin(sb, br); /* always, regardless the mount option */
@@ -4356,11 +4360,11 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +}
 diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 --- /usr/share/empty/fs/aufs/branch.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h	2023-10-31 09:31:04.196547417 +0100
++++ linux/fs/aufs/branch.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,375 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -4779,11 +4783,11 @@ diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 +-include ${srctree}/${src}/conf_priv.mk
 diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 --- /usr/share/empty/fs/aufs/cpup.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c	2024-11-18 12:46:45.633029891 +0100
++++ linux/fs/aufs/cpup.c	2025-02-04 12:51:12.459939006 +0100
 @@ -0,0 +1,1458 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -4852,7 +4856,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	 * todo: O_TMPFILE+linkat(AT_SYMLINK_FOLLOW) bypassing aufs may cause
 +	 *	 the incorrect link count.
 +	 */
-+	au_set_nlink(inode, h_inode->i_nlink);
++	vfsub_set_nlink(inode, vfsub_inode_nlink(h_inode, AU_I_BRANCH));
 +
 +	/*
 +	 * fewer nlink makes find(1) noisy, but larger nlink doesn't.
@@ -5499,7 +5503,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	if (!au_opt_test(mnt_flags, UDBA_NONE)
 +	    && !isdir
 +	    && au_opt_test(mnt_flags, XINO)
-+	    && (h_inode->i_nlink == 1
++	    && (vfsub_inode_nlink(h_inode, AU_I_BRANCH) == 1
 +		|| (h_inode->i_state & I_LINKABLE))
 +	    /* todo: unnecessary? */
 +	    /* && d_inode(cpg->dentry)->i_nlink == 1 */
@@ -5626,7 +5630,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +			goto out_parent;
 +		}
 +
-+		if (dst_inode->i_nlink) {
++		if (vfsub_inode_nlink(dst_inode, AU_I_BRANCH)) {
 +			const int do_dt = au_ftest_cpup(cpg->flags, DTIME);
 +
 +			h_src = au_plink_lkup(inode, cpg->bdst);
@@ -5711,7 +5715,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +
 +	src_inode = d_inode(h_src);
 +	if (!isdir
-+	    && (src_inode->i_nlink > 1
++	    && (vfsub_inode_nlink(src_inode, AU_I_BRANCH) > 1
 +		|| src_inode->i_state & I_LINKABLE)
 +	    && plink)
 +		au_plink_append(inode, cpg->bdst, h_dst);
@@ -6077,7 +6081,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +	h_dir = au_igrab(au_h_iptr(dir, bdst));
 +	h_tmpdir = h_dir;
 +	pin_orig = NULL;
-+	if (!h_dir->i_nlink) {
++	if (!vfsub_inode_nlink(h_dir, AU_I_BRANCH)) {
 +		wbr = au_sbr(dentry->d_sb, bdst)->br_wbr;
 +		h_orph = wbr->wbr_orph;
 +
@@ -6241,11 +6245,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/cpup.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,101 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -6346,11 +6350,11 @@ diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 +#endif /* __AUFS_CPUP_H__ */
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 --- /usr/share/empty/fs/aufs/dbgaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c	2023-10-10 22:51:18.033248030 +0200
++++ linux/fs/aufs/dbgaufs.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,526 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -6876,11 +6880,11 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 --- /usr/share/empty/fs/aufs/dbgaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/dbgaufs.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,53 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -6933,11 +6937,11 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/dcsub.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,225 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -7162,11 +7166,11 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 --- /usr/share/empty/fs/aufs/dcsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h	2022-11-05 23:02:18.962555950 +0100
-@@ -0,0 +1,137 @@
++++ linux/fs/aufs/dcsub.h	2025-02-04 12:14:49.459939113 +0100
+@@ -0,0 +1,139 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -7193,6 +7197,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +
 +#include <linux/dcache.h>
 +#include <linux/fs.h>
++#include "vfsub.h"
 +
 +struct au_dpage {
 +	int ndentry;
@@ -7233,7 +7238,8 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +	err = 0;
 +	if (unlikely(d_unhashed(d)
 +		     || d_is_negative(d)
-+		     || !inode->i_nlink))
++		     /* to support both aufs and branches */
++		     || !vfsub_inode_nlink(inode, AU_I_UNKNOWN)))
 +		err = -ENOENT;
 +	return err;
 +}
@@ -7263,7 +7269,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +		inode = d_inode(d);
 +		if (unlikely(d_unlinked(d)
 +			     || d_is_negative(d)
-+			     || !inode->i_nlink))
++			     || !vfsub_inode_nlink(inode, AU_I_UNKNOWN)))
 +			err = -ENOENT;
 +	}
 +	return err;
@@ -7303,11 +7309,11 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#endif /* __AUFS_DCSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 --- /usr/share/empty/fs/aufs/debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c	2024-11-18 12:46:45.633029891 +0100
++++ linux/fs/aufs/debug.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,448 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -7435,7 +7441,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +	}
 +
 +	ctime = inode_get_ctime(inode);
-+	dpri("i%d: %p, i%lu, %s, cnt %d, nl %u, 0%o, sz %llu, blk %llu,"
++	dpri("i%d: %p, i%lu, %s, cnt %d, nl %u?, 0%o, sz %llu, blk %llu,"
 +	     " acl %p, def_acl %p,"
 +	     " hn %d, ct %lld, np %lu, st 0x%x, f 0x%x, v %llu, g %x%s%.*s\n",
 +	     bindex, inode,
@@ -7755,11 +7761,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/debug.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,226 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -7985,11 +7991,11 @@ diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 +#endif /* __AUFS_DEBUG_H__ */
 diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 --- /usr/share/empty/fs/aufs/dentry.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c	2024-10-15 11:25:59.889776980 +0200
-@@ -0,0 +1,1175 @@
++++ linux/fs/aufs/dentry.c	2025-02-04 12:14:49.459939113 +0100
+@@ -0,0 +1,1176 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -8495,10 +8501,11 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	if (d_really_is_positive(dentry)) {
 +		inode = d_inode(dentry);
 +		if (!d_is_dir(dentry)) {
-+			if (inode->i_nlink && !d_unhashed(dentry))
-+				drop_nlink(inode);
++			if (vfsub_inode_nlink(inode, AU_I_AUFS)
++			    && !d_unhashed(dentry))
++				vfsub_drop_nlink(inode);
 +		} else {
-+			clear_nlink(inode);
++			vfsub_clear_nlink(inode);
 +			/* stop next lookup */
 +			inode->i_flags |= S_DEAD;
 +		}
@@ -8878,7 +8885,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	 */
 +	if (do_udba && inode) {
 +		mode = (inode->i_mode & S_IFMT);
-+		plus = (inode->i_nlink > 0);
++		plus = (vfsub_inode_nlink(inode, AU_I_AUFS) > 0);
 +		ibs = au_ibtop(inode);
 +		ibe = au_ibbot(inode);
 +	}
@@ -8946,7 +8953,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +		h_cached_inode = h_inode;
 +		if (h_inode && bindex != bwh) {
 +			h_mode = (h_inode->i_mode & S_IFMT);
-+			h_plus = (h_inode->i_nlink > 0);
++			h_plus = (vfsub_inode_nlink(h_inode, AU_I_BRANCH) > 0);
 +		}
 +		if (inode && ibs <= bindex && bindex <= ibe)
 +			h_cached_inode = au_h_iptr(inode, bindex);
@@ -9102,7 +9109,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +	if (!(flags & (LOOKUP_OPEN | LOOKUP_EMPTY))
 +	    && inode
 +	    && !(inode->i_state && I_LINKABLE)
-+	    && (IS_DEADDIR(inode) || !inode->i_nlink)) {
++	    && (IS_DEADDIR(inode) || !vfsub_inode_nlink(inode, AU_I_AUFS))) {
 +		AuTraceErr(err);
 +		goto out_inval;
 +	}
@@ -9164,11 +9171,11 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 --- /usr/share/empty/fs/aufs/dentry.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/dentry.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,270 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -9438,11 +9445,11 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c	2022-12-17 09:21:34.796521861 +0100
++++ linux/fs/aufs/dinfo.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,555 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -9997,11 +10004,11 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 --- /usr/share/empty/fs/aufs/dir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/dir.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,765 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -10027,32 +10034,32 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +void au_add_nlink(struct inode *dir, struct inode *h_dir)
 +{
-+	unsigned int nlink;
++	unsigned int nlink, h_nlink;
 +
 +	AuDebugOn(!S_ISDIR(dir->i_mode) || !S_ISDIR(h_dir->i_mode));
 +
-+	nlink = dir->i_nlink;
-+	nlink += h_dir->i_nlink - 2;
-+	if (h_dir->i_nlink < 2)
++	nlink = vfsub_inode_nlink(dir, AU_I_AUFS);
++	h_nlink = vfsub_inode_nlink(h_dir, AU_I_BRANCH);
++	nlink += h_nlink - 2;
++	if (h_nlink < 2)
 +		nlink += 2;
-+	smp_mb(); /* for i_nlink */
 +	/* 0 can happen in revaliding */
-+	au_set_nlink(dir, nlink);
++	vfsub_set_nlink(dir, nlink);
 +}
 +
 +void au_sub_nlink(struct inode *dir, struct inode *h_dir)
 +{
-+	unsigned int nlink;
++	unsigned int nlink, h_nlink;
 +
 +	AuDebugOn(!S_ISDIR(dir->i_mode) || !S_ISDIR(h_dir->i_mode));
 +
-+	nlink = dir->i_nlink;
-+	nlink -= h_dir->i_nlink - 2;
-+	if (h_dir->i_nlink < 2)
++	nlink = vfsub_inode_nlink(dir, AU_I_AUFS);
++	h_nlink = vfsub_inode_nlink(h_dir, AU_I_BRANCH);
++	nlink -= h_nlink - 2;
++	if (h_nlink < 2)
 +		nlink -= 2;
-+	smp_mb(); /* for i_nlink */
 +	/* nlink == 0 means the branch-fs is broken */
-+	au_set_nlink(dir, nlink);
++	vfsub_set_nlink(dir, nlink);
 +}
 +
 +loff_t au_dir_size(struct file *file, struct dentry *dentry)
@@ -10147,7 +10154,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +	au_hn_inode_lock_nested(hdir, AuLsc_I_PARENT);
 +	h_dir = au_h_iptr(dir, btop);
 +	ts = inode_get_mtime(h_dir);
-+	if (h_dir->i_nlink
++	if (vfsub_inode_nlink(h_dir, AU_I_BRANCH)
 +	    && timespec64_compare(&ts, &dt.dt_mtime) < 0) {
 +		dt.dt_h_path = h_path;
 +		au_dtime_revert(&dt);
@@ -10601,7 +10608,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +
 +	err = 0;
 +	if (!au_opt_test(au_mntflags(dentry->d_sb), UDBA_NONE)
-+	    && !file_inode(h_file)->i_nlink)
++	    && !vfsub_inode_nlink(file_inode(h_file), AU_I_BRANCH))
 +		goto out_put;
 +
 +	do {
@@ -10766,11 +10773,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 +};
 diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 --- /usr/share/empty/fs/aufs/dir.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/dir.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,134 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -10904,11 +10911,11 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 --- /usr/share/empty/fs/aufs/dirren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.c	2023-10-10 22:51:18.033248030 +0200
++++ linux/fs/aufs/dirren.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,1315 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2017-2022 Junjiro R. Okajima
++ * Copyright (C) 2017-2025 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
@@ -12223,11 +12230,11 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 --- /usr/share/empty/fs/aufs/dirren.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.h	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/dirren.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,140 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2017-2022 Junjiro R. Okajima
++ * Copyright (C) 2017-2025 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
@@ -12367,11 +12374,11 @@ diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 +#endif /* __AUFS_DIRREN_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/dynop.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,365 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2022 Junjiro R. Okajima
++ * Copyright (C) 2010-2025 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
@@ -12736,11 +12743,11 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 --- /usr/share/empty/fs/aufs/dynop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/dynop.h	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,77 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2010-2022 Junjiro R. Okajima
++ * Copyright (C) 2010-2025 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
@@ -12817,11 +12824,11 @@ diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 +#endif /* __AUFS_DYNOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 --- /usr/share/empty/fs/aufs/export.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/export.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,846 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -13667,11 +13674,11 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 --- /usr/share/empty/fs/aufs/fhsm.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c	2022-11-05 23:02:18.962555950 +0100
++++ linux/fs/aufs/fhsm.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,426 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2011-2022 Junjiro R. Okajima
++ * Copyright (C) 2011-2025 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
@@ -14097,11 +14104,11 @@ diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/file.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,858 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -14499,7 +14506,7 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +		err = au_reopen_wh(file, bcpup, hi_wh);
 +
 +	if (!err
-+	    && (inode->i_nlink > 1
++	    && (vfsub_inode_nlink(inode, AU_I_AUFS) > 1
 +		|| (inode->i_state & I_LINKABLE))
 +	    && au_opt_test(au_mntflags(cpg.dentry->d_sb), PLINK))
 +		au_plink_append(inode, bcpup, au_h_dptr(cpg.dentry, bcpup));
@@ -14959,11 +14966,11 @@ diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 +};
 diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 --- /usr/share/empty/fs/aufs/file.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h	2024-10-15 11:25:59.893110313 +0200
++++ linux/fs/aufs/file.h	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,342 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -15305,11 +15312,11 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#endif /* __AUFS_FILE_H__ */
 diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 --- /usr/share/empty/fs/aufs/finfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/finfo.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,147 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -15456,11 +15463,11 @@ diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 --- /usr/share/empty/fs/aufs/f_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c	2024-10-15 11:25:59.889776980 +0200
++++ linux/fs/aufs/f_op.c	2025-02-04 12:14:49.459939113 +0100
 @@ -0,0 +1,782 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -16242,11 +16249,11 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/fsctx.c linux/fs/aufs/fsctx.c
 --- /usr/share/empty/fs/aufs/fsctx.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fsctx.c	2024-11-18 12:46:45.636363225 +0100
-@@ -0,0 +1,1243 @@
++++ linux/fs/aufs/fsctx.c	2025-02-04 12:14:49.463272447 +0100
+@@ -0,0 +1,1244 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2022 Junjiro R. Okajima
++ * Copyright (C) 2022-2025 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
@@ -16341,7 +16348,8 @@ diff -urN /usr/share/empty/fs/aufs/fsctx.c linux/fs/aufs/fsctx.c
 +out:
 +	inode_unlock(inode);
 +	err = cvt_err(err);
-+	AuTraceErr(err);
++	if (unlikely(err))
++		pr_err("remount err %d\n", err);
 +
 +	return err;
 +}
@@ -17489,11 +17497,11 @@ diff -urN /usr/share/empty/fs/aufs/fsctx.c linux/fs/aufs/fsctx.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 --- /usr/share/empty/fs/aufs/fstype.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/fstype.h	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,419 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -17912,11 +17920,11 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 --- /usr/share/empty/fs/aufs/hbl.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hbl.h	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/hbl.h	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,65 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2017-2022 Junjiro R. Okajima
++ * Copyright (C) 2017-2025 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
@@ -17981,11 +17989,11 @@ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 +#endif /* __AUFS_HBL_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/hfsnotify.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,290 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -18275,11 +18283,11 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/hfsplus.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,60 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2022 Junjiro R. Okajima
++ * Copyright (C) 2010-2025 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
@@ -18339,11 +18347,11 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 --- /usr/share/empty/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/hnotify.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,715 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -18662,7 +18670,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +	    && a->inode
 +	    && a->h_inode) {
 +		inode_lock_shared_nested(a->h_inode, AuLsc_I_CHILD);
-+		if (!a->h_inode->i_nlink
++		if (!vfsub_inode_nlink(a->h_inode, AU_I_BRANCH)
 +		    && !(a->h_inode->i_state & I_LINKABLE))
 +			hn_xino(a->inode, a->h_inode); /* ignore this error */
 +		inode_unlock_shared(a->h_inode);
@@ -18976,7 +18984,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +
 +	/* NFS fires the event for silly-renamed one from kworker */
 +	f = 0;
-+	if (!dir->i_nlink
++	if (!vfsub_inode_nlink(dir, AU_I_AUFS)
 +	    || (au_test_nfs(h_dir->i_sb) && (mask & FS_DELETE)))
 +		f = AuWkq_NEST;
 +	err = au_wkq_nowait(au_hn_bh, args, dir->i_sb, f);
@@ -19058,11 +19066,11 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +}
 diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 --- /usr/share/empty/fs/aufs/iinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c	2022-11-05 23:02:18.965889284 +0100
-@@ -0,0 +1,286 @@
++++ linux/fs/aufs/iinfo.c	2025-02-04 12:14:49.463272447 +0100
+@@ -0,0 +1,287 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -19209,7 +19217,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +
 +			h_i = au_hinode(iinfo, bindex)->hi_inode;
 +			if (h_i
-+			    && !h_i->i_nlink
++			    && !vfsub_inode_nlink(h_i, AU_I_BRANCH)
 +			    && !(h_i->i_state & I_LINKABLE))
 +				au_set_h_iptr(inode, bindex, NULL, 0);
 +		}
@@ -19242,6 +19250,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +	spin_lock_init(&iinfo->ii_generation.ig_spin);
 +	au_rw_init(&iinfo->ii_rwsem);
 +	inode_init_once(&c->vfs_inode);
++	spin_lock_init(&c->nlink_spin);
 +}
 +
 +void au_hinode_init(struct au_hinode *hinode)
@@ -19309,7 +19318,7 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +	struct au_hinode *hi;
 +	struct super_block *sb;
 +	aufs_bindex_t bindex, bbot;
-+	const unsigned char unlinked = !inode->i_nlink;
++	const unsigned char unlinked = !vfsub_inode_nlink(inode, AU_I_AUFS);
 +
 +	AuDebugOn(au_is_bad_inode(inode));
 +
@@ -19348,11 +19357,11 @@ diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 --- /usr/share/empty/fs/aufs/inode.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c	2024-11-18 12:46:45.636363225 +0100
-@@ -0,0 +1,531 @@
++++ linux/fs/aufs/inode.c	2025-02-04 12:14:49.463272447 +0100
+@@ -0,0 +1,532 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -19736,7 +19745,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +	h_dentry = au_h_dptr(dentry, btop);
 +	h_inode = d_inode(h_dentry);
 +	h_ino = h_inode->i_ino;
-+	hlinked = !d_is_dir(h_dentry) && h_inode->i_nlink > 1;
++	hlinked = !d_is_dir(h_dentry) && vfsub_inode_nlink(h_inode, AU_I_BRANCH) > 1;
 +
 +new_ino:
 +	/*
@@ -19789,7 +19798,8 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +		au_xino_write(sb, btop, h_ino, /*ino*/0);
 +		/* ignore this error */
 +		goto out_iput;
-+	} else if (!must_new && !IS_DEADDIR(inode) && inode->i_nlink) {
++	} else if (!must_new && !IS_DEADDIR(inode)
++		   && vfsub_inode_nlink(inode, AU_I_AUFS)) {
 +		/*
 +		 * horrible race condition between lookup, readdir and copyup
 +		 * (or something).
@@ -19883,11 +19893,11 @@ diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
 +}
 diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 --- /usr/share/empty/fs/aufs/inode.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h	2024-11-10 01:09:28.606384527 +0100
-@@ -0,0 +1,707 @@
++++ linux/fs/aufs/inode.h	2025-02-04 12:14:49.463272447 +0100
+@@ -0,0 +1,727 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -19913,6 +19923,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#ifdef __KERNEL__
 +
 +#include <linux/fsnotify.h>
++#include "fstype.h"
 +#include "rwsem.h"
 +
 +struct vfsmount;
@@ -19967,6 +19978,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +struct au_icntnr {
 +	struct au_iinfo		iinfo;
 +	struct inode		vfs_inode;
++	spinlock_t		nlink_spin; /* protects vfs_inode.i_nlink */
 +	struct hlist_bl_node	plink;
 +	struct rcu_head		rcu;
 +} ____cacheline_aligned_in_smp;
@@ -20012,6 +20024,24 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +	return &(container_of(inode, struct au_icntnr, vfs_inode)->iinfo);
 +}
 +
++static inline void au_nlink_lock(struct inode *inode)
++{
++	spinlock_t *spin;
++
++	AuDebugOn(!au_test_aufs(inode->i_sb));
++	AuDebugOn(is_bad_inode(inode));
++	spin = &(container_of(inode, struct au_icntnr, vfs_inode)->nlink_spin);
++	spin_lock(spin);
++}
++
++static inline void au_nlink_unlock(struct inode *inode)
++{
++	spinlock_t *spin;
++
++	spin = &(container_of(inode, struct au_icntnr, vfs_inode)->nlink_spin);
++	spin_unlock(spin);
++}
++
 +/* ---------------------------------------------------------------------- */
 +
 +/* inode.c */
@@ -20594,11 +20624,11 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/ioctl.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,220 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -20818,11 +20848,11 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 --- /usr/share/empty/fs/aufs/i_op_add.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/i_op_add.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,971 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -20945,7 +20975,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		if (unlikely(d_is_negative(h_dentry)))
 +			goto out;
 +		h_inode = d_inode(h_dentry);
-+		if (unlikely(!h_inode->i_nlink))
++		if (unlikely(!vfsub_inode_nlink(h_inode, AU_I_BRANCH)))
 +			goto out;
 +
 +		h_mode = h_inode->i_mode;
@@ -21326,7 +21356,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +		goto out_h_file;
 +	}
 +
-+	au_init_nlink(inode, 1);
++	vfsub_inode_nlink_init(inode, 1);
 +	d_tmpfile(file, inode);
 +	au_di(dentry)->di_tmpfile = 1;
 +	get_file(h_file);
@@ -21431,7 +21461,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +	inode = d_inode(src_dentry);
 +	if (au_ibtop(inode) <= a->bdst)
 +		h_inode = au_h_iptr(inode, a->bdst);
-+	if (!h_inode || !h_inode->i_nlink) {
++	if (!h_inode || !vfsub_inode_nlink(h_inode, AU_I_BRANCH)) {
 +		/* copyup src_dentry as the name of dentry. */
 +		bbot = au_dbbot(dentry);
 +		if (bbot < a->bsrc)
@@ -21644,7 +21674,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +
 +	au_dir_ts(dir, a->bdst);
 +	inode_inc_iversion(dir);
-+	inc_nlink(inode);
++	vfsub_inc_nlink(inode);
 +	inode_set_ctime_to_ts(inode, inode_get_ctime(dir));
 +	d_instantiate(dentry, au_igrab(inode));
 +	if (d_unhashed(a->h_path.dentry))
@@ -21749,7 +21779,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +
 +	err = epilog(dir, bindex, wh_dentry, dentry);
 +	if (!err) {
-+		inc_nlink(dir);
++		vfsub_inc_nlink(dir);
 +		goto out_unpin; /* success */
 +	}
 +
@@ -21793,11 +21823,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 --- /usr/share/empty/fs/aufs/i_op.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c	2024-11-18 12:46:45.636363225 +0100
-@@ -0,0 +1,1520 @@
++++ linux/fs/aufs/i_op.c	2025-02-04 12:51:12.459939006 +0100
+@@ -0,0 +1,1526 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -22425,7 +22455,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +			continue;
 +		if (d_is_positive(h_d[i])) {
 +			h_i = d_inode(h_d[i]);
-+			err = !h_i->i_nlink;
++			err = !vfsub_inode_nlink(h_i, AU_I_BRANCH);
 +		}
 +	}
 +
@@ -22435,7 +22465,13 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +
 +static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
 +{
++	AuRwMustWriteLock(&p->hdir->hi_inode->i_rwsem);
++#ifndef CONFIG_PREEMPT_RT
 +	atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
++#else
++	p->hdir->hi_inode->i_rwsem.rwbase.rtmutex.owner = task;
++	smp_mb();
++#endif
 +}
 +
 +void au_pin_hdir_acquire_nest(struct au_pin *p)
@@ -22970,12 +23006,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +
 +	au_cpup_attr_nlink(inode, /*force*/0);
 +	if (S_ISDIR(inode->i_mode)) {
-+		n = inode->i_nlink;
++		n = vfsub_inode_nlink(inode, AU_I_AUFS);
 +		n -= nlink;
 +		n += st->nlink;
-+		smp_mb(); /* for i_nlink */
 +		/* 0 can happen */
-+		au_set_nlink(inode, n);
++		vfsub_set_nlink(inode, n);
 +	}
 +
 +	spin_lock(&inode->i_lock);
@@ -23100,7 +23135,8 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +	if (!err) {
 +		if (positive)
 +			au_refresh_iattr(inode, st,
-+					 d_inode(h_path.dentry)->i_nlink);
++					 vfsub_inode_nlink(d_inode(h_path.dentry),
++							   AU_I_BRANCH));
 +		goto out_fill; /* success */
 +	}
 +	AuTraceErr(err);
@@ -23317,11 +23353,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 --- /usr/share/empty/fs/aufs/i_op_del.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c	2023-10-31 09:31:04.199880750 +0100
++++ linux/fs/aufs/i_op_del.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,523 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -23426,7 +23462,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +		if (unlikely(d_is_negative(h_dentry)))
 +			goto out;
 +		h_inode = d_inode(h_dentry);
-+		if (unlikely(!h_inode->i_nlink))
++		if (unlikely(!vfsub_inode_nlink(h_inode, AU_I_BRANCH)))
 +			goto out;
 +
 +		h_mode = h_inode->i_mode;
@@ -23844,11 +23880,11 @@ diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 +}
 diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 --- /usr/share/empty/fs/aufs/i_op_ren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/i_op_ren.c	2025-02-04 12:14:49.463272447 +0100
 @@ -0,0 +1,1264 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -24499,7 +24535,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +		if (unlikely(d_is_negative(a->dst_h_dentry)))
 +			goto out;
 +		h_inode = d_inode(a->dst_h_dentry);
-+		if (h_inode->i_nlink)
++		if (vfsub_inode_nlink(h_inode, AU_I_BRANCH))
 +			err = au_may_del(a->dst_dentry, a->btgt,
 +					 a->dst_h_parent, isdir);
 +	}
@@ -24896,7 +24932,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +		 * If it is a dir, VFS unhash it before this
 +		 * function. It means we cannot rely upon d_unhashed().
 +		 */
-+		if (unlikely(!a->dst_inode->i_nlink))
++		if (unlikely(!vfsub_inode_nlink(a->dst_inode, AU_I_AUFS)))
 +			goto out_unlock;
 +		if (!au_ftest_ren(a->auren_flags, ISDIR_DST)) {
 +			err = au_d_hashed_positive(a->dst_dentry);
@@ -25317,11 +25353,11 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 --- /usr/share/empty/fs/aufs/lcnt.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/lcnt.h	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/lcnt.h	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,186 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2018-2022 Junjiro R. Okajima
++ * Copyright (C) 2018-2025 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
@@ -25507,11 +25543,11 @@ diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 +#endif /* __AUFS_LCNT_H__ */
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/loop.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,148 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -25659,11 +25695,11 @@ diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 --- /usr/share/empty/fs/aufs/loop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h	2022-11-05 23:02:18.965889284 +0100
++++ linux/fs/aufs/loop.h	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,55 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -25803,11 +25839,11 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
 diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 --- /usr/share/empty/fs/aufs/module.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c	2022-11-05 23:02:18.965889284 +0100
-@@ -0,0 +1,273 @@
++++ linux/fs/aufs/module.c	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,275 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -25940,7 +25976,8 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 + * iterate_supers_type() doesn't protect us from
 + * remounting (branch management)
 + */
-+struct hlist_bl_head au_sbilist;
++struct au_rwsem au_sbilist_lock;
++struct hlist_head au_sbilist;
 +#endif
 +
 +/*
@@ -26074,17 +26111,18 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +	dbgaufs_fin();
 +	sysaufs_fin();
 +	au_dy_fin();
++	au_sbilist_fin();
 +}
 +
 +module_init(aufs_init);
 +module_exit(aufs_exit);
 diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 --- /usr/share/empty/fs/aufs/module.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h	2024-11-10 01:09:28.606384527 +0100
++++ linux/fs/aufs/module.h	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,180 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -26264,11 +26302,11 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c	2024-11-10 01:09:28.606384527 +0100
-@@ -0,0 +1,713 @@
++++ linux/fs/aufs/mvdown.c	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,714 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2011-2022 Junjiro R. Okajima
++ * Copyright (C) 2011-2025 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
@@ -26675,15 +26713,16 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +	    && atomic_read(&a->inode->i_count) == 1
 +	    /* && a->mvd_h_src_inode->i_nlink == 1 */
 +	    && (!plinked || !au_plink_test(a->inode))
-+	    && a->inode->i_nlink == 1)
++	    && vfsub_inode_nlink(a->inode, AU_I_AUFS) == 1)
 +		goto out;
 +
 +	err = -EBUSY;
 +	AU_MVD_PR(dmsg,
 +		  "b%d, d{b%d, c%d?}, i{c%d?, l%u}, hi{l%u}, p{%d, %d}\n",
 +		  a->mvd_bsrc, au_dbtop(a->dentry), au_dcount(a->dentry),
-+		  atomic_read(&a->inode->i_count), a->inode->i_nlink,
-+		  a->mvd_h_src_inode->i_nlink,
++		  atomic_read(&a->inode->i_count),
++		  vfsub_inode_nlink(a->inode, AU_I_AUFS),
++		  vfsub_inode_nlink(a->mvd_h_src_inode, AU_I_BRANCH),
 +		  plinked, plinked ? au_plink_test(a->inode) : 0);
 +
 +out:
@@ -26981,11 +27020,11 @@ diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 --- /usr/share/empty/fs/aufs/opts.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c	2024-11-10 01:09:28.609717860 +0100
++++ linux/fs/aufs/opts.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,1030 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -28015,11 +28054,11 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +}
 diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 --- /usr/share/empty/fs/aufs/opts.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h	2024-11-10 01:09:28.609717860 +0100
++++ linux/fs/aufs/opts.h	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,264 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -28283,11 +28322,11 @@ diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
 +#endif /* __AUFS_OPTS_H__ */
 diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 --- /usr/share/empty/fs/aufs/plink.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c	2022-11-05 23:02:18.969222617 +0100
++++ linux/fs/aufs/plink.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,516 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -28803,11 +28842,11 @@ diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
 +}
 diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 --- /usr/share/empty/fs/aufs/poll.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c	2022-11-05 23:02:18.969222617 +0100
++++ linux/fs/aufs/poll.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,51 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -28858,11 +28897,11 @@ diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
 +}
 diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 --- /usr/share/empty/fs/aufs/posix_acl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/posix_acl.c	2023-10-31 09:31:04.199880750 +0100
++++ linux/fs/aufs/posix_acl.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,108 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2014-2022 Junjiro R. Okajima
++ * Copyright (C) 2014-2025 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
@@ -28970,11 +29009,11 @@ diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
 +}
 diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 --- /usr/share/empty/fs/aufs/procfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c	2022-11-05 23:02:18.969222617 +0100
-@@ -0,0 +1,170 @@
++++ linux/fs/aufs/procfs.c	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,168 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2010-2022 Junjiro R. Okajima
++ * Copyright (C) 2010-2025 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
@@ -29024,22 +29063,20 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +	int err;
 +	struct super_block *sb;
 +	struct au_sbinfo *sbinfo;
-+	struct hlist_bl_node *pos;
 +
 +	err = -EBUSY;
 +	if (unlikely(file->private_data))
 +		goto out;
 +
 +	sb = NULL;
-+	/* don't use au_sbilist_lock() here */
-+	hlist_bl_lock(&au_sbilist);
-+	hlist_bl_for_each_entry(sbinfo, pos, &au_sbilist, si_list)
++	au_sbilist_read_lock();
++	hlist_for_each_entry(sbinfo, &au_sbilist, si_list)
 +		if (id == sysaufs_si_id(sbinfo)) {
 +			if (kobject_get_unless_zero(&sbinfo->si_kobj))
 +				sb = sbinfo->si_sb;
 +			break;
 +		}
-+	hlist_bl_unlock(&au_sbilist);
++	au_sbilist_read_unlock();
 +
 +	err = -EINVAL;
 +	if (unlikely(!sb))
@@ -29144,11 +29181,11 @@ diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 --- /usr/share/empty/fs/aufs/rdu.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c	2024-11-10 01:09:28.609717860 +0100
++++ linux/fs/aufs/rdu.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,384 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -29532,11 +29569,11 @@ diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 --- /usr/share/empty/fs/aufs/rwsem.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h	2024-10-15 11:25:59.893110313 +0200
-@@ -0,0 +1,85 @@
++++ linux/fs/aufs/rwsem.h	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,89 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -29567,7 +29604,11 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#define au_rwsem	rw_semaphore
 +
 +/* to debug easier, do not make them inlined functions */
++#ifndef CONFIG_PREEMPT_RT
 +#define AuRwMustNoWaiters(rw)	AuDebugOn(rwsem_is_contended(rw))
++#else
++#define AuRwMustNoWaiters(rw)	do {} while(0)
++#endif
 +
 +#ifdef CONFIG_LOCKDEP
 +/* rwsem_is_locked() is unusable */
@@ -29621,11 +29662,11 @@ diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
 +#endif /* __AUFS_RWSEM_H__ */
 diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 --- /usr/share/empty/fs/aufs/sbinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c	2022-11-05 23:02:18.969222617 +0100
++++ linux/fs/aufs/sbinfo.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,316 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -29941,11 +29982,11 @@ diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 --- /usr/share/empty/fs/aufs/super.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/super.c	2025-02-04 12:51:12.459939006 +0100
 @@ -0,0 +1,871 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -30736,7 +30777,7 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +	inode->i_op = aufs_iop + AuIop_DIR; /* with getattr by default */
 +	inode->i_fop = &aufs_dir_fop;
 +	inode->i_mode = S_IFDIR;
-+	au_init_nlink(inode, 2);
++	vfsub_inode_nlink_init(inode, 2);
 +	unlock_new_inode(inode);
 +
 +	root = d_make_root(inode);
@@ -30816,11 +30857,11 @@ diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
 +};
 diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 --- /usr/share/empty/fs/aufs/super.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h	2024-11-10 01:09:28.609717860 +0100
-@@ -0,0 +1,592 @@
++++ linux/fs/aufs/super.h	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,618 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -31016,7 +31057,7 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#endif
 +
 +#ifdef CONFIG_AUFS_SBILIST
-+	struct hlist_bl_node	si_list;
++	struct hlist_node	si_list;
 +#endif
 +
 +	/* dirty, necessary for unmounting, sysfs and sysrq */
@@ -31196,45 +31237,71 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +
 +#ifdef CONFIG_AUFS_SBILIST
 +/* module.c */
-+extern struct hlist_bl_head au_sbilist;
++extern struct au_rwsem au_sbilist_lock;
++extern struct hlist_head au_sbilist;
 +
 +static inline void au_sbilist_init(void)
 +{
-+	INIT_HLIST_BL_HEAD(&au_sbilist);
++	au_rw_init(&au_sbilist_lock);
++	INIT_HLIST_HEAD(&au_sbilist);
++}
++
++static inline void au_sbilist_fin(void)
++{
++	AuRwDestroy(&au_sbilist_lock);
 +}
 +
 +static inline void au_sbilist_add(struct super_block *sb)
 +{
-+	au_hbl_add(&au_sbi(sb)->si_list, &au_sbilist);
++	au_rw_write_lock(&au_sbilist_lock);
++	hlist_add_head(&au_sbi(sb)->si_list, &au_sbilist);
++	au_rw_write_unlock(&au_sbilist_lock);
 +}
 +
 +static inline void au_sbilist_del(struct super_block *sb)
 +{
-+	au_hbl_del(&au_sbi(sb)->si_list, &au_sbilist);
++	au_rw_write_lock(&au_sbilist_lock);
++	hlist_del(&au_sbi(sb)->si_list);
++	au_rw_write_unlock(&au_sbilist_lock);
 +}
 +
 +#ifdef CONFIG_AUFS_MAGIC_SYSRQ
-+static inline void au_sbilist_lock(void)
++static inline void au_sbilist_write_lock(void)
++{
++	au_rw_write_lock(&au_sbilist_lock);
++}
++
++static inline void au_sbilist_write_unlock(void)
 +{
-+	hlist_bl_lock(&au_sbilist);
++	au_rw_write_unlock(&au_sbilist_lock);
 +}
 +
-+static inline void au_sbilist_unlock(void)
++static inline void au_sbilist_read_lock(void)
 +{
-+	hlist_bl_unlock(&au_sbilist);
++	au_rw_read_lock(&au_sbilist_lock);
++}
++
++static inline void au_sbilist_read_unlock(void)
++{
++	au_rw_read_unlock(&au_sbilist_lock);
 +}
 +#define AuGFP_SBILIST	GFP_ATOMIC
 +#else
-+AuStubVoid(au_sbilist_lock, void)
-+AuStubVoid(au_sbilist_unlock, void)
++AuStubVoid(au_sbilist_write_lock, void)
++AuStubVoid(au_sbilist_write_unlock, void)
++AuStubVoid(au_sbilist_read_lock, void)
++AuStubVoid(au_sbilist_read_unlock, void)
 +#define AuGFP_SBILIST	GFP_NOFS
 +#endif /* CONFIG_AUFS_MAGIC_SYSRQ */
 +#else
 +AuStubVoid(au_sbilist_init, void)
++AuStubVoid(au_sbilist_fin, void)
 +AuStubVoid(au_sbilist_add, struct super_block *sb)
 +AuStubVoid(au_sbilist_del, struct super_block *sb)
-+AuStubVoid(au_sbilist_lock, void)
-+AuStubVoid(au_sbilist_unlock, void)
++AuStubVoid(au_sbilist_write_lock, void)
++AuStubVoid(au_sbilist_write_unlock, void)
++AuStubVoid(au_sbilist_read_lock, void)
++AuStubVoid(au_sbilist_read_unlock, void)
 +#define AuGFP_SBILIST	GFP_NOFS
 +#endif
 +
@@ -31412,11 +31479,11 @@ diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
 +#endif /* __AUFS_SUPER_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 --- /usr/share/empty/fs/aufs/sysaufs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c	2023-10-10 22:51:18.033248030 +0200
++++ linux/fs/aufs/sysaufs.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,94 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -31510,11 +31577,11 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 --- /usr/share/empty/fs/aufs/sysaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h	2022-11-05 23:02:18.969222617 +0100
++++ linux/fs/aufs/sysaufs.h	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,102 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -31616,11 +31683,11 @@ diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
 +#endif /* __SYSAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 --- /usr/share/empty/fs/aufs/sysfs.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c	2022-11-05 23:02:18.969222617 +0100
++++ linux/fs/aufs/sysfs.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,374 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -31994,11 +32061,11 @@ diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 --- /usr/share/empty/fs/aufs/sysrq.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c	2023-10-31 09:31:04.199880750 +0100
-@@ -0,0 +1,149 @@
++++ linux/fs/aufs/sysrq.c	2025-02-04 12:14:49.466605780 +0100
+@@ -0,0 +1,157 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -32101,17 +32168,25 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +module_param_named(sysrq, aufs_sysrq_key, charp, 0444);
 +MODULE_PARM_DESC(sysrq, "MagicSysRq key for " AUFS_NAME);
 +
-+static void au_sysrq(u8 key __maybe_unused)
++static void au_sysrq_work_fn(struct work_struct *wk __maybe_unused)
 +{
 +	struct au_sbinfo *sbinfo;
-+	struct hlist_bl_node *pos;
 +
-+	lockdep_off();
-+	au_sbilist_lock();
-+	hlist_bl_for_each_entry(sbinfo, pos, &au_sbilist, si_list)
++	au_sbilist_read_lock();
++	hlist_for_each_entry(sbinfo, &au_sbilist, si_list)
 +		sysrq_sb(sbinfo->si_sb);
-+	au_sbilist_unlock();
-+	lockdep_on();
++	au_sbilist_read_unlock();
++
++	module_put(THIS_MODULE);
++}
++
++static DECLARE_WORK(au_sysrq_work, au_sysrq_work_fn);
++
++static void au_sysrq(u8 key __maybe_unused)
++{
++	/* au_wkq is too much here */
++	__module_get(THIS_MODULE);
++	schedule_work(&au_sysrq_work);
 +}
 +
 +static struct sysrq_key_op au_sysrq_op = {
@@ -32147,11 +32222,11 @@ diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 --- /usr/share/empty/fs/aufs/vdir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/vdir.c	2025-02-04 12:14:49.466605780 +0100
 @@ -0,0 +1,896 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -33047,11 +33122,11 @@ diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 --- /usr/share/empty/fs/aufs/vfsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c	2024-11-10 01:09:28.609717860 +0100
-@@ -0,0 +1,919 @@
++++ linux/fs/aufs/vfsub.c	2025-02-04 12:14:49.469939113 +0100
+@@ -0,0 +1,965 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -33102,6 +33177,52 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +
 +/* ---------------------------------------------------------------------- */
 +
++unsigned int vfsub_inode_nlink_aufs(struct inode *inode)
++{
++	unsigned int nlink;
++
++	au_nlink_lock(inode);
++	nlink = inode->i_nlink;
++	au_nlink_unlock(inode);
++
++	return nlink;
++}
++
++void vfsub_inc_nlink(struct inode *inode)
++{
++	au_nlink_lock(inode);
++	inc_nlink(inode);
++	au_nlink_unlock(inode);
++}
++
++void vfsub_drop_nlink(struct inode *inode)
++{
++	au_nlink_lock(inode);
++	AuDebugOn(!inode->i_nlink);
++	drop_nlink(inode);
++	au_nlink_unlock(inode);
++}
++
++void vfsub_clear_nlink(struct inode *inode)
++{
++	au_nlink_lock(inode);
++	AuDebugOn(!inode->i_nlink);
++	clear_nlink(inode);
++	au_nlink_unlock(inode);
++}
++
++void vfsub_set_nlink(struct inode *inode, unsigned int nlink)
++{
++	/*
++	 * stop setting the value equal to the current one, in order to stop
++	 * a useless warning from vfs:destroy_inode() about sb->s_remove_count.
++	 */
++	au_nlink_lock(inode);
++	if (nlink != inode->i_nlink)
++		set_nlink(inode, nlink);
++	au_nlink_unlock(inode);
++}
++
 +int vfsub_update_h_iattr(struct path *h_path, int *did)
 +{
 +	int err;
@@ -33406,7 +33527,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +	const unsigned int link_max = UINT_MAX >> 1; /* rough margin */
 +
 +	if (!au_test_fs_no_limit_nlink(inode->i_sb)
-+	    || inode->i_nlink < link_max)
++	    || vfsub_inode_nlink(inode, AU_I_BRANCH) < link_max)
 +		return 0;
 +	return -EMLINK;
 +}
@@ -33970,11 +34091,11 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 --- /usr/share/empty/fs/aufs/vfsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h	2024-11-18 12:46:45.636363225 +0100
-@@ -0,0 +1,418 @@
++++ linux/fs/aufs/vfsub.h	2025-02-04 12:14:49.469939113 +0100
+@@ -0,0 +1,441 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -34004,6 +34125,7 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#include <linux/posix_acl.h>
 +#include <linux/xattr.h>
 +#include "debug.h"
++#include "fstype.h"
 +
 +/* copied from linux/fs/internal.h */
 +/* todo: BAD approach!! */
@@ -34030,33 +34152,55 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static inline void au_set_nlink(struct inode *inode, unsigned int nlink)
++unsigned int vfsub_inode_nlink_aufs(struct inode *inode);
++
++enum au_inode_type {
++	AU_I_AUFS,
++	AU_I_BRANCH,
++	AU_I_UNKNOWN
++};
++
++static inline unsigned int vfsub_inode_nlink(struct inode *inode,
++					     enum au_inode_type type)
 +{
-+	/*
-+	 * stop setting the value equal to the current one, in order to stop
-+	 * a useless warning from vfs:destroy_inode() about sb->s_remove_count.
-+	 */
-+	if (nlink != inode->i_nlink)
-+		set_nlink(inode, nlink);
++	unsigned int nlink;
++
++	switch (type) {
++	case AU_I_AUFS:
++		nlink = vfsub_inode_nlink_aufs(inode);
++		break;
++	case AU_I_BRANCH: /* aufs cannot be a branch of another aufs mount */
++		AuDebugOn(au_test_aufs(inode->i_sb));
++		nlink = inode->i_nlink;
++		break;
++	case AU_I_UNKNOWN:
++		if (au_test_aufs(inode->i_sb))
++			nlink = vfsub_inode_nlink_aufs(inode);
++		else
++			nlink = inode->i_nlink;
++		break;
++	};
++
++	return nlink;
 +}
 +
-+static inline void au_init_nlink(struct inode *inode, unsigned int nlink)
++void vfsub_inc_nlink(struct inode *inode);
++void vfsub_drop_nlink(struct inode *inode);
++void vfsub_clear_nlink(struct inode *inode);
++void vfsub_set_nlink(struct inode *inode, unsigned int nlink);
++
++static inline void vfsub_inode_nlink_init(struct inode *inode,
++					  unsigned int nlink)
 +{
 +	/* to ignore sb->s_remove_count, do not use set_nlink() */
 +	inode->__i_nlink = nlink;
 +}
 +
-+static inline void vfsub_drop_nlink(struct inode *inode)
-+{
-+	AuDebugOn(!inode->i_nlink);
-+	drop_nlink(inode);
-+}
-+
 +static inline void vfsub_dead_dir(struct inode *inode)
 +{
 +	AuDebugOn(!S_ISDIR(inode->i_mode));
 +	inode->i_flags |= S_DEAD;
-+	clear_nlink(inode);
++	vfsub_clear_nlink(inode);
 +}
 +
 +static inline int vfsub_native_ro(struct inode *inode)
@@ -34392,11 +34536,11 @@ diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
 +#endif /* __AUFS_VFSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 --- /usr/share/empty/fs/aufs/wbr_policy.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c	2024-11-10 01:09:28.609717860 +0100
++++ linux/fs/aufs/wbr_policy.c	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,830 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -35226,11 +35370,11 @@ diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
 +};
 diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 --- /usr/share/empty/fs/aufs/whout.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c	2023-10-31 09:31:04.199880750 +0100
++++ linux/fs/aufs/whout.c	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,1072 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -36211,10 +36355,10 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +	inode_unlock(wh_inode);
 +
 +	if (!err) {
-+		h_nlink = h_dir->i_nlink;
++		h_nlink = vfsub_inode_nlink(h_dir, AU_I_BRANCH);
 +		err = vfsub_rmdir(h_dir, &wh_path);
 +		/* some fs doesn't change the parent nlink in some cases */
-+		h_nlink -= h_dir->i_nlink;
++		h_nlink -= vfsub_inode_nlink(h_dir, AU_I_BRANCH);
 +	}
 +
 +	if (!err) {
@@ -36302,11 +36446,11 @@ diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
 +}
 diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 --- /usr/share/empty/fs/aufs/whout.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h	2023-10-31 09:31:04.199880750 +0100
++++ linux/fs/aufs/whout.h	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,87 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -36393,11 +36537,11 @@ diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
 +#endif /* __AUFS_WHOUT_H__ */
 diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 --- /usr/share/empty/fs/aufs/wkq.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c	2024-11-18 12:46:45.636363225 +0100
++++ linux/fs/aufs/wkq.c	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,370 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -36767,11 +36911,11 @@ diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
 +}
 diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 --- /usr/share/empty/fs/aufs/wkq.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h	2024-11-10 01:09:28.609717860 +0100
++++ linux/fs/aufs/wkq.h	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,89 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -36860,11 +37004,11 @@ diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
 +#endif /* __AUFS_WKQ_H__ */
 diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 --- /usr/share/empty/fs/aufs/xattr.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xattr.c	2024-10-15 11:25:59.893110313 +0200
++++ linux/fs/aufs/xattr.c	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,360 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2014-2022 Junjiro R. Okajima
++ * Copyright (C) 2014-2025 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
@@ -37224,11 +37368,11 @@ diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
 +}
 diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 --- /usr/share/empty/fs/aufs/xino.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c	2023-10-31 09:31:04.203214083 +0100
++++ linux/fs/aufs/xino.c	2025-02-04 12:14:49.469939113 +0100
 @@ -0,0 +1,1926 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -37425,7 +37569,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	h_dir = d_inode(h_parent);
 +	inode = file_inode(file);
 +	/* no delegation since it is just created */
-+	if (inode->i_nlink)
++	if (vfsub_inode_nlink(inode, AU_I_BRANCH))
 +		err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL,
 +				   /*force*/0);
 +	inode_unlock(h_dir);
@@ -38326,7 +38470,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	struct super_block *sb;
 +	struct au_sbinfo *sbinfo;
 +
-+	AuDebugOn(inode->i_nlink);
++	AuDebugOn(vfsub_inode_nlink(inode, AU_I_AUFS));
 +
 +	sb = inode->i_sb;
 +	xib_calc_bit(inode->i_ino, &pindex, &bit);
@@ -39015,7 +39159,7 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +	for (; bindex <= bbot; bindex++, hi++) {
 +		h_inode = hi->hi_inode;
 +		if (!h_inode
-+		    || (!unlinked && h_inode->i_nlink))
++		    || (!unlinked && vfsub_inode_nlink(h_inode, AU_I_BRANCH)))
 +			continue;
 +
 +		/* inode may not be revalidated */
@@ -39154,11 +39298,11 @@ diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
 +}
 diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
 --- /usr/share/empty/include/uapi/linux/aufs_type.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h	2024-11-18 12:46:45.636363225 +0100
++++ linux/include/uapi/linux/aufs_type.h	2025-02-04 12:51:12.459939006 +0100
 @@ -0,0 +1,452 @@
 +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 +/*
-+ * Copyright (C) 2005-2022 Junjiro R. Okajima
++ * Copyright (C) 2005-2025 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
@@ -39198,7 +39342,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +#include <limits.h>
 +#endif /* __KERNEL__ */
 +
-+#define AUFS_VERSION	"6.x-rcN-20241118"
++#define AUFS_VERSION	"6.12-20250113"
 +
 +/* todo? move this to linux-2.6.19/include/magic.h */
 +#define AUFS_SUPER_MAGIC	('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -39609,7 +39753,7 @@ diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/lin
 +
 +#endif /* __AUFS_TYPE_H__ */
 SPDX-License-Identifier: GPL-2.0
-aufs6.x-rcN loopback patch
+aufs6.12 loopback patch
 
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
 index 479480f25a6c..ba3477c30e29 100644
@@ -39757,7 +39901,7 @@ index 479480f25a6c..ba3477c30e29 100644
  
  static int loop_clr_fd(struct loop_device *lo)
 diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
-index d109c1392d60..dfe82d9c6292 100644
+index db7e9fcf1056..6d202136d29a 100644
 --- a/fs/aufs/f_op.c
 +++ b/fs/aufs/f_op.c
 @@ -317,7 +317,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
@@ -39770,7 +39914,7 @@ index d109c1392d60..dfe82d9c6292 100644
  		if (file->f_mapping != h_file->f_mapping) {
  			file->f_mapping = h_file->f_mapping;
 diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
-index 58043e31e5f3..e2bfae6f9d59 100644
+index 69dea4cda00c..92a74affb220 100644
 --- a/fs/aufs/loop.c
 +++ b/fs/aufs/loop.c
 @@ -133,3 +133,19 @@ void au_loopback_fin(void)
@@ -39794,7 +39938,7 @@ index 58043e31e5f3..e2bfae6f9d59 100644
 +	return f;
 +}
 diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
-index 03d4908a6c03..34d356e181d5 100644
+index 519efba31c70..ac701381da79 100644
 --- a/fs/aufs/loop.h
 +++ b/fs/aufs/loop.h
 @@ -26,6 +26,8 @@ void au_warn_loopback(struct super_block *h_sb);
@@ -39816,7 +39960,7 @@ index 03d4908a6c03..34d356e181d5 100644
  
  #endif /* __KERNEL__ */
 diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index ec1cd23719fd..55cde6ac582b 100644
+index 9c30cba52742..8161108d0f6d 100644
 --- a/fs/aufs/super.c
 +++ b/fs/aufs/super.c
 @@ -758,7 +758,10 @@ const struct super_operations aufs_sop = {
diff --git a/update-source.sh b/update-source.sh
index f6314b7d..e76bca9e 100755
--- a/update-source.sh
+++ b/update-source.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -xe
 
-#BRANCH=aufs6.10
-BRANCH=aufs6.x-rcN
+BRANCH=aufs6.12
+#BRANCH=aufs6.x-rcN
 
 # aufs6
 [ -d aufs-standalone ] || git clone https://github.com/sfjro/aufs-standalone.git
================================================================

---- gitweb:

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




More information about the pld-cvs-commit mailing list