[packages/kernel/LINUX_5_10] - update aufs patch, rel 2

baggins baggins at pld-linux.org
Wed Jul 24 06:06:08 CEST 2024


commit 316e2492f5c705817ec02317c1c467e2b7921bd5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Jul 24 04:31:57 2024 +0200

    - update aufs patch, rel 2

 kernel-aufs5.patch | 3392 ++++++++++++++++++++++++++++------------------------
 kernel.spec        |    2 +-
 update-source.sh   |    4 +-
 3 files changed, 1855 insertions(+), 1543 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index cc810718..669b6367 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -71,7 +71,7 @@
 %define		have_pcmcia	0
 %endif
 
-%define		rel		1
+%define		rel		2
 %define		basever		5.10
 %define		postver		.222
 
diff --git a/kernel-aufs5.patch b/kernel-aufs5.patch
index 65088de5..2dc7513d 100644
--- a/kernel-aufs5.patch
+++ b/kernel-aufs5.patch
@@ -1,8 +1,8 @@
 SPDX-License-Identifier: GPL-2.0
-aufs5.10.82 kbuild patch
+aufs5.10.140 kbuild patch
 
 diff --git a/fs/Kconfig b/fs/Kconfig
-index da524c4d7b7e0..50ab89368c2b5 100644
+index da524c4d7b7e..50ab89368c2b 100644
 --- a/fs/Kconfig
 +++ b/fs/Kconfig
 @@ -288,6 +288,7 @@ source "fs/sysv/Kconfig"
@@ -14,7 +14,7 @@ index da524c4d7b7e0..50ab89368c2b5 100644
  endif # MISC_FILESYSTEMS
  
 diff --git a/fs/Makefile b/fs/Makefile
-index 999d1a23f036c..0cd76857ca764 100644
+index 999d1a23f036..0cd76857ca76 100644
 --- a/fs/Makefile
 +++ b/fs/Makefile
 @@ -136,3 +136,4 @@ obj-$(CONFIG_EFIVAR_FS)		+= efivarfs/
@@ -23,10 +23,10 @@ index 999d1a23f036c..0cd76857ca764 100644
  obj-$(CONFIG_ZONEFS_FS)		+= zonefs/
 +obj-$(CONFIG_AUFS_FS)           += aufs/
 SPDX-License-Identifier: GPL-2.0
-aufs5.10.82 base patch
+aufs5.10.140 base patch
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 4fef10dd29753..e013880d69f33 100644
+index 4d10e79030a9..e49ee2cacd66 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -3009,6 +3009,19 @@ F:	include/linux/audit.h
@@ -50,7 +50,7 @@ index 4fef10dd29753..e013880d69f33 100644
  M:	Miguel Ojeda Sandonis <miguel.ojeda.sandonis at gmail.com>
  S:	Maintained
 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index ee537a9f1d1a4..d09b1ef4a2b56 100644
+index b10410585a74..c14f1fca3b1a 100644
 --- a/drivers/block/loop.c
 +++ b/drivers/block/loop.c
 @@ -752,6 +752,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -79,7 +79,7 @@ index ee537a9f1d1a4..d09b1ef4a2b56 100644
  
  static ssize_t loop_attr_show(struct device *dev, char *page,
 diff --git a/fs/dcache.c b/fs/dcache.c
-index ea0485861d937..ddca6240e0db4 100644
+index ea0485861d93..ddca6240e0db 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
 @@ -1285,7 +1285,7 @@ enum d_walk_ret {
@@ -92,7 +92,7 @@ index ea0485861d937..ddca6240e0db4 100644
  {
  	struct dentry *this_parent;
 diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 71b43538fa44c..7cd57fb4e8646 100644
+index 71b43538fa44..7cd57fb4e864 100644
 --- a/fs/fcntl.c
 +++ b/fs/fcntl.c
 @@ -32,7 +32,7 @@
@@ -114,7 +114,7 @@ index 71b43538fa44c..7cd57fb4e8646 100644
  		return error;
  
 diff --git a/fs/namespace.c b/fs/namespace.c
-index 046b084136c51..a256f0f9c6c09 100644
+index 046b084136c5..a256f0f9c6c0 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -792,6 +792,12 @@ static inline int check_mnt(struct mount *mnt)
@@ -131,7 +131,7 @@ index 046b084136c51..a256f0f9c6c09 100644
   * vfsmount lock must be held for write
   */
 diff --git a/fs/splice.c b/fs/splice.c
-index 866d5c2367b23..55b5356262085 100644
+index 6610e55c0e2a..5ac28e2b14a7 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -756,8 +756,8 @@ static int warn_unsupported(struct file *file, const char *op)
@@ -159,7 +159,7 @@ index 866d5c2367b23..55b5356262085 100644
  	int ret;
  
 diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 42d246a942283..2cc1a02e444c4 100644
+index 42d246a94228..2cc1a02e444c 100644
 --- a/include/linux/fs.h
 +++ b/include/linux/fs.h
 @@ -1332,6 +1332,7 @@ extern void fasync_free(struct fasync_struct *);
@@ -186,11 +186,19 @@ index 42d246a942283..2cc1a02e444c4 100644
  
  /* /sys/fs */
  extern struct kobject *fs_kobj;
+@@ -2566,6 +2569,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
+ }
+ 
+ void emergency_thaw_all(void);
++extern int __sync_filesystem(struct super_block *, int);
+ extern int sync_filesystem(struct super_block *);
+ extern const struct file_operations def_blk_fops;
+ extern const struct file_operations def_chr_fops;
 diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
-index 20b6797babe2c..7888c04c3ffaf 100644
+index 2c2586312b44..02dab569a2a0 100644
 --- a/include/linux/lockdep.h
 +++ b/include/linux/lockdep.h
-@@ -248,6 +248,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
+@@ -252,6 +252,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
  	return lock->key == key;
  }
  
@@ -199,7 +207,7 @@ index 20b6797babe2c..7888c04c3ffaf 100644
  /*
   * Acquire a lock.
   *
-@@ -384,6 +386,7 @@ static inline void lockdep_unregister_key(struct lock_class_key *key)
+@@ -388,6 +390,7 @@ static inline void lockdep_unregister_key(struct lock_class_key *key)
  
  #define lockdep_depth(tsk)	(0)
  
@@ -208,7 +216,7 @@ index 20b6797babe2c..7888c04c3ffaf 100644
  
  #define lockdep_assert_held(l)			do { (void)(l); } while (0)
 diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
-index 8f882f5881e87..6b9808f098435 100644
+index 8f882f5881e8..6b9808f09843 100644
 --- a/include/linux/mnt_namespace.h
 +++ b/include/linux/mnt_namespace.h
 @@ -7,12 +7,15 @@ struct mnt_namespace;
@@ -228,7 +236,7 @@ index 8f882f5881e87..6b9808f098435 100644
  extern const struct file_operations proc_mountinfo_operations;
  extern const struct file_operations proc_mountstats_operations;
 diff --git a/include/linux/splice.h b/include/linux/splice.h
-index a55179fd60fc3..8e21c53cf8831 100644
+index a55179fd60fc..8e21c53cf883 100644
 --- a/include/linux/splice.h
 +++ b/include/linux/splice.h
 @@ -93,4 +93,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
@@ -243,10 +251,10 @@ index a55179fd60fc3..8e21c53cf8831 100644
 +			 unsigned int flags);
  #endif
 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index 1f6a2f1226fa9..4550f7a021178 100644
+index 6cbd2b444476..52483df4b7f9 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -188,7 +188,7 @@ static
+@@ -186,7 +186,7 @@ unsigned long max_lock_class_idx;
  struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
  DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
  
@@ -255,7 +263,7 @@ index 1f6a2f1226fa9..4550f7a021178 100644
  {
  	unsigned int class_idx = hlock->class_idx;
  
-@@ -209,6 +209,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
+@@ -207,6 +207,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
  	 */
  	return lock_classes + class_idx;
  }
@@ -264,10 +272,10 @@ index 1f6a2f1226fa9..4550f7a021178 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
-aufs5.10.82 mmap patch
+aufs5.10.140 mmap patch
 
 diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 5d52aea8d7e7d..2fbf0ad30eaa9 100644
+index 5d52aea8d7e7..2fbf0ad30eaa 100644
 --- a/fs/proc/base.c
 +++ b/fs/proc/base.c
 @@ -2184,7 +2184,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
@@ -280,7 +288,7 @@ index 5d52aea8d7e7d..2fbf0ad30eaa9 100644
  		rc = 0;
  	}
 diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index 13452b32e2bd5..38acccfef9d49 100644
+index 13452b32e2bd..38acccfef9d4 100644
 --- a/fs/proc/nommu.c
 +++ b/fs/proc/nommu.c
 @@ -40,7 +40,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -296,7 +304,7 @@ index 13452b32e2bd5..38acccfef9d49 100644
  		ino = inode->i_ino;
  	}
 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 3931f60e421f7..e5bf27de3f0bc 100644
+index ef18f0d71b11..3c52843db20b 100644
 --- a/fs/proc/task_mmu.c
 +++ b/fs/proc/task_mmu.c
 @@ -280,7 +280,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
@@ -311,7 +319,7 @@ index 3931f60e421f7..e5bf27de3f0bc 100644
  		dev = inode->i_sb->s_dev;
  		ino = inode->i_ino;
  		pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1863,7 +1866,7 @@ static int show_numa_map(struct seq_file *m, void *v)
+@@ -1885,7 +1888,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;
@@ -321,7 +329,7 @@ index 3931f60e421f7..e5bf27de3f0bc 100644
  	struct mempolicy *pol;
  	char buffer[64];
 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index a6d21fc0033c6..02c2de31196e0 100644
+index a6d21fc0033c..02c2de31196e 100644
 --- a/fs/proc/task_nommu.c
 +++ b/fs/proc/task_nommu.c
 @@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
@@ -337,13 +345,14 @@ index a6d21fc0033c6..02c2de31196e0 100644
  		ino = inode->i_ino;
  		pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
 diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 289c26f055cdd..63f3dca76b2eb 100644
+index b8b677f47a8d..18c07145ed7e 100644
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -1730,6 +1730,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
+@@ -1732,6 +1732,43 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
  	unmap_mapping_range(mapping, holebegin, holelen, 0);
  }
  
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
 +extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
 +				      int);
@@ -365,32 +374,50 @@ index 289c26f055cdd..63f3dca76b2eb 100644
 +							  __LINE__)
 +#define vmr_fput(region)		vmr_do_fput(region, __func__, __LINE__)
 +#endif /* !CONFIG_MMU */
++
++#else
++
++#define vma_file_update_time(vma)	file_update_time((vma)->vm_file)
++#define vma_pr_or_file(vma)		(vma)->vm_file
++#define vma_get_file(vma)		get_file((vma)->vm_file)
++#define vma_fput(vma)			fput((vma)->vm_file)
++
++#ifndef CONFIG_MMU
++#define vmr_pr_or_file(region)		(region)->vm_file
++#define vmr_fput(region)		fput((region)->vm_file)
++#endif /* !CONFIG_MMU */
++
++#endif /* CONFIG_AUFS_FS */
 +
  extern int access_process_vm(struct task_struct *tsk, unsigned long addr,
  		void *buf, int len, unsigned int gup_flags);
  extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 4eb38918da8f8..facc9741d5701 100644
+index 4eb38918da8f..ed87c1ba3cf9 100644
 --- a/include/linux/mm_types.h
 +++ b/include/linux/mm_types.h
-@@ -282,6 +282,7 @@ struct vm_region {
+@@ -282,6 +282,9 @@ struct vm_region {
  	unsigned long	vm_top;		/* region allocated to here */
  	unsigned long	vm_pgoff;	/* the offset in vm_file corresponding to vm_start */
  	struct file	*vm_file;	/* the backing file or NULL */
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +	struct file	*vm_prfile;	/* the virtual backing file or NULL */
++#endif
  
  	int		vm_usage;	/* region usage count (access under nommu_region_sem) */
  	bool		vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -361,6 +362,7 @@ struct vm_area_struct {
+@@ -361,6 +364,9 @@ struct vm_area_struct {
  	unsigned long vm_pgoff;		/* Offset (within vm_file) in PAGE_SIZE
  					   units */
  	struct file * vm_file;		/* File we map to (can be NULL). */
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +	struct file *vm_prfile;		/* shadow of vm_file */
++#endif
  	void * vm_private_data;		/* was vm_pte (shared mem) */
  
  #ifdef CONFIG_SWAP
 diff --git a/kernel/fork.c b/kernel/fork.c
-index e465903abed9e..d1f00eaf675af 100644
+index a78c0b02edd5..e5874ec6b430 100644
 --- a/kernel/fork.c
 +++ b/kernel/fork.c
 @@ -554,7 +554,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -403,20 +430,16 @@ index e465903abed9e..d1f00eaf675af 100644
  				put_write_access(inode);
  			i_mmap_lock_write(mapping);
 diff --git a/mm/Makefile b/mm/Makefile
-index d73aed0fc99c1..93076a66ad6a5 100644
+index d73aed0fc99c..bf0989e5043d 100644
 --- a/mm/Makefile
 +++ b/mm/Makefile
-@@ -52,7 +52,7 @@ obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
- 			   mm_init.o percpu.o slab_common.o \
- 			   compaction.o vmacache.o \
- 			   interval_tree.o list_lru.o workingset.o \
--			   debug.o gup.o $(mmu-y)
-+			   prfile.o debug.o gup.o $(mmu-y)
- 
- # Give 'page_alloc' its own module-parameter namespace
- page-alloc-y := page_alloc.o
+@@ -120,3 +120,4 @@ obj-$(CONFIG_MEMFD_CREATE) += memfd.o
+ obj-$(CONFIG_MAPPING_DIRTY_HELPERS) += mapping_dirty_helpers.o
+ obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
+ obj-$(CONFIG_PAGE_REPORTING) += page_reporting.o
++obj-y += prfile.o
 diff --git a/mm/filemap.c b/mm/filemap.c
-index 125b69f59caad..00bfb23c599fd 100644
+index 125b69f59caa..00bfb23c599f 100644
 --- a/mm/filemap.c
 +++ b/mm/filemap.c
 @@ -2913,7 +2913,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
@@ -429,7 +452,7 @@ index 125b69f59caad..00bfb23c599fd 100644
  	if (page->mapping != inode->i_mapping) {
  		unlock_page(page);
 diff --git a/mm/mmap.c b/mm/mmap.c
-index 5c8b4485860de..59f2f758d77e5 100644
+index a1ee93f55ceb..2baefbc409b4 100644
 --- a/mm/mmap.c
 +++ b/mm/mmap.c
 @@ -179,7 +179,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
@@ -450,7 +473,16 @@ index 5c8b4485860de..59f2f758d77e5 100644
  		}
  		if (next->anon_vma)
  			anon_vma_merge(vma, next);
-@@ -1897,8 +1897,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1834,7 +1834,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+ 				 * fput the vma->vm_file here or we would add an extra fput for file
+ 				 * and cause general protection fault ultimately.
+ 				 */
+-				fput(vma->vm_file);
++				vma_fput(vma);
+ 				vm_area_free(vma);
+ 				vma = merge;
+ 				/* Update vm_flags to pick up the change. */
+@@ -1901,8 +1901,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
  	if (vma->vm_ops && vma->vm_ops->close)
  		vma->vm_ops->close(vma);
  unmap_and_free_vma:
@@ -460,7 +492,7 @@ index 5c8b4485860de..59f2f758d77e5 100644
  
  	/* Undo any partial mapping done by a device driver. */
  	unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
-@@ -2757,7 +2757,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2752,7 +2752,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
  		goto out_free_mpol;
  
  	if (new->vm_file)
@@ -469,7 +501,7 @@ index 5c8b4485860de..59f2f758d77e5 100644
  
  	if (new->vm_ops && new->vm_ops->open)
  		new->vm_ops->open(new);
-@@ -2776,7 +2776,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2771,7 +2771,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
  	if (new->vm_ops && new->vm_ops->close)
  		new->vm_ops->close(new);
  	if (new->vm_file)
@@ -478,45 +510,52 @@ index 5c8b4485860de..59f2f758d77e5 100644
  	unlink_anon_vmas(new);
   out_free_mpol:
  	mpol_put(vma_policy(new));
-@@ -2969,7 +2969,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
- 	struct vm_area_struct *vma;
+@@ -2965,6 +2965,9 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
  	unsigned long populate = 0;
  	unsigned long ret = -EINVAL;
--	struct file *file;
-+	struct file *file, *prfile;
+ 	struct file *file;
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
++	struct file *prfile;
++#endif
  
  	pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
  		     current->comm, current->pid);
-@@ -3044,10 +3044,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -3039,10 +3042,34 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
  		}
  	}
  
--	file = get_file(vma->vm_file);
++#if 1 /* IS_ENABLED(CONFIG_AUFS_FS) */
 +	vma_get_file(vma);
 +	file = vma->vm_file;
 +	prfile = vma->vm_prfile;
- 	ret = do_mmap(vma->vm_file, start, size,
- 			prot, flags, pgoff, &populate, NULL);
++	ret = do_mmap(vma->vm_file, start, size,
++			prot, flags, pgoff, &populate, NULL);
 +	if (!IS_ERR_VALUE(ret) && file && prfile) {
 +		struct vm_area_struct *new_vma;
 +
 +		new_vma = find_vma(mm, ret);
 +		if (!new_vma->vm_prfile)
 +			new_vma->vm_prfile = prfile;
-+		if (new_vma != vma)
++		if (prfile)
 +			get_file(prfile);
 +	}
 +	/*
 +	 * two fput()s instead of vma_fput(vma),
 +	 * coz vma may not be available anymore.
 +	 */
- 	fput(file);
++	fput(file);
 +	if (prfile)
 +		fput(prfile);
++#else
+ 	file = get_file(vma->vm_file);
+ 	ret = do_mmap(vma->vm_file, start, size,
+ 			prot, flags, pgoff, &populate, NULL);
+ 	fput(file);
++#endif /* CONFIG_AUFS_FS */
  out:
  	mmap_write_unlock(mm);
  	if (populate)
-@@ -3334,7 +3351,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -3329,7 +3356,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
  		if (anon_vma_clone(new_vma, vma))
  			goto out_free_mempol;
  		if (new_vma->vm_file)
@@ -526,7 +565,7 @@ index 5c8b4485860de..59f2f758d77e5 100644
  			new_vma->vm_ops->open(new_vma);
  		vma_link(mm, new_vma, prev, rb_link, rb_parent);
 diff --git a/mm/nommu.c b/mm/nommu.c
-index 0faf39b32cdb9..78ecad7204c86 100644
+index 0faf39b32cdb..78ecad7204c8 100644
 --- a/mm/nommu.c
 +++ b/mm/nommu.c
 @@ -533,7 +533,7 @@ static void __put_nommu_region(struct vm_region *region)
@@ -571,7 +610,7 @@ index 0faf39b32cdb9..78ecad7204c86 100644
  
 diff --git a/mm/prfile.c b/mm/prfile.c
 new file mode 100644
-index 0000000000000..511543ab1b418
+index 000000000000..511543ab1b41
 --- /dev/null
 +++ b/mm/prfile.c
 @@ -0,0 +1,86 @@
@@ -662,10 +701,10 @@ index 0000000000000..511543ab1b418
 +}
 +#endif /* !CONFIG_MMU */
 SPDX-License-Identifier: GPL-2.0
-aufs5.10.82 standalone patch
+aufs5.10.140 standalone patch
 
 diff --git a/fs/dcache.c b/fs/dcache.c
-index ddca6240e0db4..30dec552278dc 100644
+index ddca6240e0db..30dec552278d 100644
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
 @@ -1390,6 +1390,7 @@ void d_walk(struct dentry *parent, void *data,
@@ -685,7 +724,7 @@ index ddca6240e0db4..30dec552278dc 100644
  /**
   * d_ancestor - search for an ancestor
 diff --git a/fs/exec.c b/fs/exec.c
-index ca89e0e3ef10f..666565bb411f6 100644
+index b56bc4b4016e..21b35412e66e 100644
 --- a/fs/exec.c
 +++ b/fs/exec.c
 @@ -113,6 +113,7 @@ bool path_noexec(const struct path *path)
@@ -697,7 +736,7 @@ index ca89e0e3ef10f..666565bb411f6 100644
  #ifdef CONFIG_USELIB
  /*
 diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 7cd57fb4e8646..96bc0e48b7467 100644
+index 7cd57fb4e864..96bc0e48b746 100644
 --- a/fs/fcntl.c
 +++ b/fs/fcntl.c
 @@ -85,6 +85,7 @@ int setfl(int fd, struct file *filp, unsigned long arg)
@@ -709,7 +748,7 @@ index 7cd57fb4e8646..96bc0e48b7467 100644
  static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
                       int force)
 diff --git a/fs/file_table.c b/fs/file_table.c
-index 709ada3151da5..27a3e3c9f2a82 100644
+index 7a3b4a7f6808..b5e3bcd3f255 100644
 --- a/fs/file_table.c
 +++ b/fs/file_table.c
 @@ -162,6 +162,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred)
@@ -721,7 +760,7 @@ index 709ada3151da5..27a3e3c9f2a82 100644
  /*
   * Variant of alloc_empty_file() that doesn't check and modify nr_files.
 diff --git a/fs/namespace.c b/fs/namespace.c
-index a256f0f9c6c09..5d6b3e723e913 100644
+index a256f0f9c6c0..5d6b3e723e91 100644
 --- a/fs/namespace.c
 +++ b/fs/namespace.c
 @@ -431,6 +431,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -749,7 +788,7 @@ index a256f0f9c6c09..5d6b3e723e913 100644
  static void lock_mnt_tree(struct mount *mnt)
  {
 diff --git a/fs/notify/group.c b/fs/notify/group.c
-index a4a4b1c64d32a..86dc2efb1850c 100644
+index a4a4b1c64d32..86dc2efb1850 100644
 --- a/fs/notify/group.c
 +++ b/fs/notify/group.c
 @@ -100,6 +100,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
@@ -761,7 +800,7 @@ index a4a4b1c64d32a..86dc2efb1850c 100644
  /*
   * Drop a reference to a group.  Free it if it's through.
 diff --git a/fs/open.c b/fs/open.c
-index 3aaaad47d9cac..60ae17e35e125 100644
+index 3aaaad47d9ca..60ae17e35e12 100644
 --- a/fs/open.c
 +++ b/fs/open.c
 @@ -65,6 +65,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -773,7 +812,7 @@ index 3aaaad47d9cac..60ae17e35e125 100644
  long vfs_truncate(const struct path *path, loff_t length)
  {
 diff --git a/fs/read_write.c b/fs/read_write.c
-index 75f764b434184..7582bb3fb634b 100644
+index 75f764b43418..7582bb3fb634 100644
 --- a/fs/read_write.c
 +++ b/fs/read_write.c
 @@ -503,6 +503,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
@@ -793,7 +832,7 @@ index 75f764b434184..7582bb3fb634b 100644
  /* file_ppos returns &file->f_pos or NULL if file is stream */
  static inline loff_t *file_ppos(struct file *file)
 diff --git a/fs/splice.c b/fs/splice.c
-index 55b5356262085..c13ac0fbac318 100644
+index 5ac28e2b14a7..d072140e0c94 100644
 --- a/fs/splice.c
 +++ b/fs/splice.c
 @@ -763,6 +763,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -813,7 +852,7 @@ index 55b5356262085..c13ac0fbac318 100644
  /**
   * splice_direct_to_actor - splices data directly between two non-pipes
 diff --git a/fs/xattr.c b/fs/xattr.c
-index cd7a563e8bcd4..7d989d57b0f0d 100644
+index cd7a563e8bcd..7d989d57b0f0 100644
 --- a/fs/xattr.c
 +++ b/fs/xattr.c
 @@ -360,6 +360,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
@@ -825,10 +864,10 @@ index cd7a563e8bcd4..7d989d57b0f0d 100644
  ssize_t
  __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index 4550f7a021178..efc579b9a36d9 100644
+index 52483df4b7f9..5a3affee7a9b 100644
 --- a/kernel/locking/lockdep.c
 +++ b/kernel/locking/lockdep.c
-@@ -209,6 +209,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
+@@ -207,6 +207,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
  	 */
  	return lock_classes + class_idx;
  }
@@ -837,7 +876,7 @@ index 4550f7a021178..efc579b9a36d9 100644
  
  #ifdef CONFIG_LOCK_STAT
 diff --git a/kernel/task_work.c b/kernel/task_work.c
-index 8d6e1217c451c..0e73637adda86 100644
+index 8d6e1217c451..0e73637adda8 100644
 --- a/kernel/task_work.c
 +++ b/kernel/task_work.c
 @@ -154,3 +154,4 @@ void task_work_run(void)
@@ -846,10 +885,10 @@ index 8d6e1217c451c..0e73637adda86 100644
  }
 +EXPORT_SYMBOL_GPL(task_work_run);
 diff --git a/security/security.c b/security/security.c
-index a864ff824dd3b..d919d763ade5a 100644
+index 8ea826ea6167..a1e4bb7eacce 100644
 --- a/security/security.c
 +++ b/security/security.c
-@@ -1094,6 +1094,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
+@@ -1109,6 +1109,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
  		return 0;
  	return call_int_hook(path_rmdir, 0, dir, dentry);
  }
@@ -857,7 +896,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_unlink(const struct path *dir, struct dentry *dentry)
  {
-@@ -1110,6 +1111,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
+@@ -1125,6 +1126,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
  		return 0;
  	return call_int_hook(path_symlink, 0, dir, dentry, old_name);
  }
@@ -865,7 +904,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
  		       struct dentry *new_dentry)
-@@ -1118,6 +1120,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
+@@ -1133,6 +1135,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
  		return 0;
  	return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
  }
@@ -873,7 +912,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
  			 const struct path *new_dir, struct dentry *new_dentry,
-@@ -1145,6 +1148,7 @@ int security_path_truncate(const struct path *path)
+@@ -1160,6 +1163,7 @@ int security_path_truncate(const struct path *path)
  		return 0;
  	return call_int_hook(path_truncate, 0, path);
  }
@@ -881,7 +920,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_chmod(const struct path *path, umode_t mode)
  {
-@@ -1152,6 +1156,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
+@@ -1167,6 +1171,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
  		return 0;
  	return call_int_hook(path_chmod, 0, path, mode);
  }
@@ -889,7 +928,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  {
-@@ -1159,6 +1164,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
+@@ -1174,6 +1179,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
  		return 0;
  	return call_int_hook(path_chown, 0, path, uid, gid);
  }
@@ -897,7 +936,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_path_chroot(const struct path *path)
  {
-@@ -1259,6 +1265,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -1274,6 +1280,7 @@ int security_inode_permission(struct inode *inode, int mask)
  		return 0;
  	return call_int_hook(inode_permission, 0, inode, mask);
  }
@@ -905,7 +944,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  
  int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
  {
-@@ -1451,6 +1458,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -1466,6 +1473,7 @@ int security_file_permission(struct file *file, int mask)
  
  	return fsnotify_perm(file, mask);
  }
@@ -915,7 +954,7 @@ index a864ff824dd3b..d919d763ade5a 100644
  {
 diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Documentation/ABI/testing/debugfs-aufs
 --- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/debugfs-aufs	2021-12-03 15:38:59.926647310 +0100
++++ linux/Documentation/ABI/testing/debugfs-aufs	2024-07-24 04:23:03.915339675 +0200
 @@ -0,0 +1,55 @@
 +What:		/debug/aufs/si_<id>/
 +Date:		March 2009
@@ -974,7 +1013,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Document
 +		will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs
 --- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs	2021-12-03 15:38:59.926647310 +0100
++++ linux/Documentation/ABI/testing/sysfs-aufs	2024-07-24 04:23:03.915339675 +0200
 @@ -0,0 +1,31 @@
 +What:		/sys/fs/aufs/si_<id>/
 +Date:		March 2009
@@ -1009,7 +1048,7 @@ diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentat
 +		will be empty. About XINO files, see the aufs manual.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,171 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -1184,7 +1223,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt lin
 +about it. But currently I have implemented it in kernel space.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,258 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -1446,7 +1485,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt li
 +For this purpose, use "aumvdown" command in aufs-util.git.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,85 @@
 +
 +# Copyright (C) 2015-2021 Junjiro R. Okajima
@@ -1535,7 +1574,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.t
 +       be implemented in aufs, but not all I am afraid.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,113 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -1652,7 +1691,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt li
 +   by over-mounting something (or another method).
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,74 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -1730,7 +1769,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt li
 +    same named entry on the upper branch.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,64 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -1798,7 +1837,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.tx
 +  copyup policy.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot linux/Documentation/filesystems/aufs/design/06dirren.dot
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.dot	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.dot	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,31 @@
 +
 +// to view this graph, run dot(1) command in GRAPHVIZ.
@@ -1833,7 +1872,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot li
 +}
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,102 @@
 +
 +# Copyright (C) 2017-2021 Junjiro R. Okajima
@@ -1914,7 +1953,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li
 +simply the inode-numbers on the branch. The file is created or updated
 +in removing the branch, and loaded in adding the branch. Its lifetime is
 +equal to the branch.
-+The list is refered in lookup, and when the current target inode is
++The list is referred in lookup, and when the current target inode is
 +found in the list, the aufs tries loading the "detailed info per
 +directory" and get the changed and valid name of the dir.
 +
@@ -1939,7 +1978,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt li
 +equivalen to udba=reval case.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,120 @@
 +
 +# Copyright (C) 2011-2021 Junjiro R. Okajima
@@ -2063,7 +2102,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linu
 +should restore the original file state after an error happens.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,72 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -2139,7 +2178,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linu
 +I have to give up this "looks-smater" approach.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,96 @@
 +
 +# Copyright (C) 2014-2021 Junjiro R. Okajima
@@ -2239,7 +2278,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt lin
 +now, aufs implements the branch attributes to ignore the error.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,58 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -2301,7 +2340,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt li
 +  lookup_one_len(), vfs_getattr(), encode_fh() and others.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,52 @@
 +
 +# Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -2357,7 +2396,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linu
 +initramfs will use it to replace the old one at the next boot.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
 --- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2021-12-03 15:38:59.929980643 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,47 @@
 +
 +# Copyright (C) 2010-2021 Junjiro R. Okajima
@@ -2408,8 +2447,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt lin
 +regular files only.
 diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
 --- /usr/share/empty/Documentation/filesystems/aufs/README	1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README	2021-12-03 15:38:59.929980643 +0100
-@@ -0,0 +1,394 @@
++++ linux/Documentation/filesystems/aufs/README	2024-07-24 04:23:03.915339675 +0200
+@@ -0,0 +1,396 @@
 +
 +Aufs5 -- advanced multi layered unification filesystem version 5.x
 +http://aufs.sf.net
@@ -2779,7 +2818,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +The Parted Magic Project made a donation (2013/9 and 11).
 +Pavel Barta made a donation (2013/10).
 +Nikolay Pertsev made a donation (2014/5).
-+James B made a donation (2014/7 and 2015/7).
++James B made a donation (2014/7, 2015/7, and 2021/12).
 +Stefano Di Biase made a donation (2014/8).
 +Daniel Epellei made a donation (2015/1).
 +OmegaPhil made a donation (2016/1, 2018/4).
@@ -2787,6 +2826,8 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +James Burry made a donation (2016/12).
 +Carsten Rose made a donation (2018/9).
 +Porteus Kiosk made a donation (2018/10).
++huronOS team: Enya Quetzalli made donations (2022/5, 2023/5 and 8).
++Vasily Mikhaylichenko made a donation (2023/5).
 +
 +Thank you very much.
 +Donations are always, including future donations, very important and
@@ -2806,7 +2847,7 @@ diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documenta
 +# End: ;
 diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 --- /usr/share/empty/fs/aufs/aufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h	2021-12-03 15:38:59.929980643 +0100
++++ linux/fs/aufs/aufs.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,62 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -2872,7 +2913,7 @@ diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
 +#endif /* __AUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 --- /usr/share/empty/fs/aufs/branch.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/branch.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,1427 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -4155,7 +4196,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
 +		 * file_release_write() for each file, because the branch
 +		 * attribute in aufs world is totally different from the native
 +		 * fs rw/ro mode.
-+		*/
++		 */
 +		/* fi_read_lock(file); */
 +		hfile = &au_fi(file)->fi_htop;
 +		hf = hfile->hf_file;
@@ -4303,7 +4344,7 @@ 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	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/branch.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,364 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -4671,7 +4712,7 @@ diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
 +#endif /* __AUFS_BRANCH_H__ */
 diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
 --- /usr/share/empty/fs/aufs/conf.mk	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/conf.mk	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/conf.mk	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,40 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -4715,7 +4756,7 @@ 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	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/cpup.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,1447 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -5308,7 +5349,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 + * regardless 'acl' option, reset all ACL.
 + * All ACL will be copied up later from the original entry on the lower branch.
 + */
-+static int au_reset_acl(struct inode *h_dir, struct path *h_path, umode_t mode)
++static int au_reset_acl(struct path *h_path, umode_t mode)
 +{
 +	int err;
 +	struct dentry *h_dentry;
@@ -5425,7 +5466,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +		err = -EIO;
 +	}
 +	if (!err)
-+		err = au_reset_acl(h_dir, &h_path, mode);
++		err = au_reset_acl(&h_path, mode);
 +
 +	mnt_flags = au_mntflags(sb);
 +	if (!au_opt_test(mnt_flags, UDBA_NONE)
@@ -6166,7 +6207,7 @@ diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
 +}
 diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
 --- /usr/share/empty/fs/aufs/cpup.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/cpup.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,100 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -6270,7 +6311,7 @@ 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	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dbgaufs.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,526 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -6800,7 +6841,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 --- /usr/share/empty/fs/aufs/dbgaufs.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dbgaufs.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,53 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -6857,7 +6898,7 @@ diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
 +#endif /* __DBGAUFS_H__ */
 diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 --- /usr/share/empty/fs/aufs/dcsub.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dcsub.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,225 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -7086,7 +7127,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 --- /usr/share/empty/fs/aufs/dcsub.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dcsub.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,137 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -7227,7 +7268,7 @@ diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
 +#endif /* __AUFS_DCSUB_H__ */
 diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 --- /usr/share/empty/fs/aufs/debug.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/debug.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,444 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -7278,7 +7319,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +	return sprintf(buffer, "%d", atomic_read(a));
 +}
 +
-+static struct kernel_param_ops param_ops_atomic_t = {
++static const struct kernel_param_ops param_ops_atomic_t = {
 +	.set = param_atomic_t_set,
 +	.get = param_atomic_t_get
 +	/* void (*free)(void *arg) */
@@ -7675,7 +7716,7 @@ diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
 +}
 diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
 --- /usr/share/empty/fs/aufs/debug.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/debug.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,226 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -7905,8 +7946,8 @@ 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	2021-12-03 15:38:59.933313976 +0100
-@@ -0,0 +1,1163 @@
++++ linux/fs/aufs/dentry.c	2024-07-24 04:23:03.918673005 +0200
+@@ -0,0 +1,1162 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -7930,7 +7971,6 @@ diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
 + */
 +
 +#include <linux/iversion.h>
-+#include <linux/namei.h>
 +#include "aufs.h"
 +
 +/*
@@ -9072,7 +9112,7 @@ 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	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dentry.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,268 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -9344,7 +9384,7 @@ diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
 +#endif /* __AUFS_DENTRY_H__ */
 diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 --- /usr/share/empty/fs/aufs/dinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dinfo.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,554 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -9902,7 +9942,7 @@ diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
 --- /usr/share/empty/fs/aufs/dir.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dir.c	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,763 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -10669,7 +10709,7 @@ 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	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dir.h	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,134 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -10807,7 +10847,7 @@ diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
 +#endif /* __AUFS_DIR_H__ */
 diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 --- /usr/share/empty/fs/aufs/dirren.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dirren.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,1315 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -12126,7 +12166,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 --- /usr/share/empty/fs/aufs/dirren.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dirren.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,140 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -12270,7 +12310,7 @@ diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
 +#endif /* __AUFS_DIRREN_H__ */
 diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 --- /usr/share/empty/fs/aufs/dynop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dynop.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,368 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -12642,7 +12682,7 @@ diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
 +}
 diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
 --- /usr/share/empty/fs/aufs/dynop.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/dynop.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,77 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -12723,8 +12763,8 @@ 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	2021-12-03 15:38:59.933313976 +0100
-@@ -0,0 +1,837 @@
++++ linux/fs/aufs/export.c	2024-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,836 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -12749,7 +12789,6 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +
 +#include <linux/exportfs.h>
 +#include <linux/fs_struct.h>
-+#include <linux/namei.h>
 +#include <linux/nsproxy.h>
 +#include <linux/random.h>
 +#include <linux/writeback.h>
@@ -13564,7 +13603,7 @@ diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
 +}
 diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 --- /usr/share/empty/fs/aufs/fhsm.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c	2021-12-03 15:38:59.933313976 +0100
++++ linux/fs/aufs/fhsm.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,427 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -13995,7 +14034,7 @@ diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
 +}
 diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
 --- /usr/share/empty/fs/aufs/file.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/file.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,863 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -14862,7 +14901,7 @@ 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	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/file.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,342 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -15208,7 +15247,7 @@ diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
 +#endif /* __AUFS_FILE_H__ */
 diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
 --- /usr/share/empty/fs/aufs/finfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/finfo.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,149 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -15361,8 +15400,8 @@ 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	2021-12-03 15:38:59.933313976 +0100
-@@ -0,0 +1,771 @@
++++ linux/fs/aufs/f_op.c	2024-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,775 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -15808,6 +15847,10 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +	lockdep_off();
 +	err = vfs_fallocate(h_file, mode, offset, len);
 +	lockdep_on();
++	/*
++	 * we don't need to call file_modifed() here since au_write_post()
++	 * is equivalent and copies-up all timestamps and permission bits.
++	 */
 +	au_write_post(inode, h_file, &wpre, /*written*/1);
 +
 +out:
@@ -16134,13 +16177,13 @@ diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
 +	.fallocate	= aufs_fallocate,
 +	.copy_file_range = aufs_copy_file_range
 +};
-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	2021-12-03 15:38:59.936647310 +0100
-@@ -0,0 +1,401 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
+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-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,1242 @@
++// SPDX-License-Identifier: GPL-2.0
 +/*
-+ * Copyright (C) 2005-2021 Junjiro R. Okajima
++ * Copyright (C) 2022 Junjiro R. Okajima
 + *
 + * This program, aufs is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -16157,230 +16200,1476 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 + */
 +
 +/*
-+ * judging filesystem type
++ * fs context, aka new mount api
 + */
 +
-+#ifndef __AUFS_FSTYPE_H__
-+#define __AUFS_FSTYPE_H__
-+
-+#ifdef __KERNEL__
++#include <linux/fs_context.h>
++#include "aufs.h"
 +
-+#include <linux/fs.h>
-+#include <linux/magic.h>
-+#include <linux/nfs_fs.h>
-+#include <linux/romfs_fs.h>
++struct au_fsctx_opts {
++	aufs_bindex_t bindex;
++	unsigned char skipped;
++	struct au_opt *opt, *opt_tail;
++	struct super_block *sb;
++	struct au_sbinfo *sbinfo;
++	struct au_opts opts;
++};
 +
-+static inline int au_test_aufs(struct super_block *sb)
++/* stop extra interpretation of errno in mount(8), and strange error messages */
++static int cvt_err(int err)
 +{
-+	return sb->s_magic == AUFS_SUPER_MAGIC;
-+}
++	AuTraceErr(err);
 +
-+static inline const char *au_sbtype(struct super_block *sb)
-+{
-+	return sb->s_type->name;
++	switch (err) {
++	case -ENOENT:
++	case -ENOTDIR:
++	case -EEXIST:
++	case -EIO:
++		err = -EINVAL;
++	}
++	return err;
 +}
 +
-+static inline int au_test_iso9660(struct super_block *sb __maybe_unused)
++static int au_fsctx_reconfigure(struct fs_context *fc)
 +{
-+#if IS_ENABLED(CONFIG_ISO9660_FS)
-+	return sb->s_magic == ISOFS_SUPER_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	int err, do_dx;
++	unsigned int mntflags;
++	struct dentry *root;
++	struct super_block *sb;
++	struct inode *inode;
++	struct au_fsctx_opts *a = fc->fs_private;
 +
-+static inline int au_test_romfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_ROMFS_FS)
-+	return sb->s_magic == ROMFS_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	AuDbg("fc %p\n", fc);
 +
-+static inline int au_test_cramfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_CRAMFS)
-+	return sb->s_magic == CRAMFS_MAGIC;
-+#endif
-+	return 0;
-+}
++	root = fc->root;
++	sb = root->d_sb;
++	err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
++	if (!err) {
++		di_write_lock_child(root);
++		err = au_opts_verify(sb, fc->sb_flags, /*pending*/0);
++		aufs_write_unlock(root);
++	}
 +
-+static inline int au_test_nfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_NFS_FS)
-+	return sb->s_magic == NFS_SUPER_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	inode = d_inode(root);
++	inode_lock(inode);
++	err = si_write_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
++	if (unlikely(err))
++		goto out;
++	di_write_lock_child(root);
 +
-+static inline int au_test_fuse(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_FUSE_FS)
-+	return sb->s_magic == FUSE_SUPER_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	/* au_opts_remount() may return an error */
++	err = au_opts_remount(sb, &a->opts);
 +
-+static inline int au_test_xfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_XFS_FS)
-+	return sb->s_magic == XFS_SB_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	if (au_ftest_opts(a->opts.flags, REFRESH))
++		au_remount_refresh(sb, au_ftest_opts(a->opts.flags,
++						     REFRESH_IDOP));
 +
-+static inline int au_test_tmpfs(struct super_block *sb __maybe_unused)
-+{
-+#ifdef CONFIG_TMPFS
-+	return sb->s_magic == TMPFS_MAGIC;
-+#else
-+	return 0;
-+#endif
++	if (au_ftest_opts(a->opts.flags, REFRESH_DYAOP)) {
++		mntflags = au_mntflags(sb);
++		do_dx = !!au_opt_test(mntflags, DIO);
++		au_dy_arefresh(do_dx);
++	}
++
++	au_fhsm_wrote_all(sb, /*force*/1); /* ?? */
++	aufs_write_unlock(root);
++
++out:
++	inode_unlock(inode);
++	err = cvt_err(err);
++	AuTraceErr(err);
++
++	return err;
 +}
 +
-+static inline int au_test_ecryptfs(struct super_block *sb __maybe_unused)
++/* ---------------------------------------------------------------------- */
++
++static int au_fsctx_fill_super(struct super_block *sb, struct fs_context *fc)
 +{
-+#if IS_ENABLED(CONFIG_ECRYPT_FS)
-+	return !strcmp(au_sbtype(sb), "ecryptfs");
-+#else
-+	return 0;
-+#endif
++	int err;
++	struct au_fsctx_opts *a = fc->fs_private;
++	struct au_sbinfo *sbinfo = a->sbinfo;
++	struct dentry *root;
++	struct inode *inode;
++
++	sbinfo->si_sb = sb;
++	sb->s_fs_info = sbinfo;
++	kobject_get(&sbinfo->si_kobj);
++
++	__si_write_lock(sb);
++	si_pid_set(sb);
++	au_sbilist_add(sb);
++
++	/* all timestamps always follow the ones on the branch */
++	sb->s_flags |= SB_NOATIME | SB_NODIRATIME;
++	sb->s_flags |= SB_I_VERSION; /* do we really need this? */
++	sb->s_op = &aufs_sop;
++	sb->s_d_op = &aufs_dop;
++	sb->s_magic = AUFS_SUPER_MAGIC;
++	sb->s_maxbytes = 0;
++	sb->s_stack_depth = 1;
++	au_export_init(sb);
++	au_xattr_init(sb);
++
++	err = au_alloc_root(sb);
++	if (unlikely(err)) {
++		si_write_unlock(sb);
++		goto out;
++	}
++	root = sb->s_root;
++	inode = d_inode(root);
++	ii_write_lock_parent(inode);
++	aufs_write_unlock(root);
++
++	/* lock vfs_inode first, then aufs. */
++	inode_lock(inode);
++	aufs_write_lock(root);
++	err = au_opts_mount(sb, &a->opts);
++	AuTraceErr(err);
++	if (!err && au_ftest_si(sbinfo, NO_DREVAL)) {
++		sb->s_d_op = &aufs_dop_noreval;
++		/* infofc(fc, "%ps", sb->s_d_op); */
++		pr_info("%ps\n", sb->s_d_op);
++		au_refresh_dop(root, /*force_reval*/0);
++		sbinfo->si_iop_array = aufs_iop_nogetattr;
++		au_refresh_iop(inode, /*force_getattr*/0);
++	}
++	aufs_write_unlock(root);
++	inode_unlock(inode);
++	if (!err)
++		goto out; /* success */
++
++	dput(root);
++	sb->s_root = NULL;
++
++out:
++	if (unlikely(err))
++		kobject_put(&sbinfo->si_kobj);
++	AuTraceErr(err);
++	err = cvt_err(err);
++	AuTraceErr(err);
++	return err;
 +}
 +
-+static inline int au_test_ramfs(struct super_block *sb)
++static int au_fsctx_get_tree(struct fs_context *fc)
 +{
-+	return sb->s_magic == RAMFS_MAGIC;
++	int err;
++
++	AuDbg("fc %p\n", fc);
++	err = get_tree_nodev(fc, au_fsctx_fill_super);
++
++	AuTraceErr(err);
++	return err;
 +}
 +
-+static inline int au_test_ubifs(struct super_block *sb __maybe_unused)
++/* ---------------------------------------------------------------------- */
++
++static void au_fsctx_dump(struct au_opts *opts)
 +{
-+#if IS_ENABLED(CONFIG_UBIFS_FS)
-+	return sb->s_magic == UBIFS_SUPER_MAGIC;
-+#else
-+	return 0;
++#ifdef CONFIG_AUFS_DEBUG
++	/* reduce stack space */
++	union {
++		struct au_opt_add *add;
++		struct au_opt_del *del;
++		struct au_opt_mod *mod;
++		struct au_opt_xino *xino;
++		struct au_opt_xino_itrunc *xino_itrunc;
++		struct au_opt_wbr_create *create;
++	} u;
++	struct au_opt *opt;
++
++	opt = opts->opt;
++	while (opt->type != Opt_tail) {
++		switch (opt->type) {
++		case Opt_add:
++			u.add = &opt->add;
++			AuDbg("add {b%d, %s, 0x%x, %p}\n",
++				  u.add->bindex, u.add->pathname, u.add->perm,
++				  u.add->path.dentry);
++			break;
++		case Opt_del:
++			fallthrough;
++		case Opt_idel:
++			u.del = &opt->del;
++			AuDbg("del {%s, %p}\n",
++			      u.del->pathname, u.del->h_path.dentry);
++			break;
++		case Opt_mod:
++			fallthrough;
++		case Opt_imod:
++			u.mod = &opt->mod;
++			AuDbg("mod {%s, 0x%x, %p}\n",
++				  u.mod->path, u.mod->perm, u.mod->h_root);
++			break;
++		case Opt_append:
++			u.add = &opt->add;
++			AuDbg("append {b%d, %s, 0x%x, %p}\n",
++				  u.add->bindex, u.add->pathname, u.add->perm,
++				  u.add->path.dentry);
++			break;
++		case Opt_prepend:
++			u.add = &opt->add;
++			AuDbg("prepend {b%d, %s, 0x%x, %p}\n",
++				  u.add->bindex, u.add->pathname, u.add->perm,
++				  u.add->path.dentry);
++			break;
++
++		case Opt_dirwh:
++			AuDbg("dirwh %d\n", opt->dirwh);
++			break;
++		case Opt_rdcache:
++			AuDbg("rdcache %d\n", opt->rdcache);
++			break;
++		case Opt_rdblk:
++			AuDbg("rdblk %d\n", opt->rdblk);
++			break;
++		case Opt_rdhash:
++			AuDbg("rdhash %u\n", opt->rdhash);
++			break;
++
++		case Opt_xino:
++			u.xino = &opt->xino;
++			AuDbg("xino {%s %pD}\n", u.xino->path, u.xino->file);
++			break;
++
++#define au_fsctx_TF(name)					  \
++			case Opt_##name:			  \
++				if (opt->tf)			  \
++					AuLabel(name);		  \
++				else				  \
++					AuLabel(no##name);	  \
++				break;
++
++		/* simple true/false flag */
++		au_fsctx_TF(trunc_xino);
++		au_fsctx_TF(trunc_xib);
++		au_fsctx_TF(dirperm1);
++		au_fsctx_TF(plink);
++		au_fsctx_TF(shwh);
++		au_fsctx_TF(dio);
++		au_fsctx_TF(warn_perm);
++		au_fsctx_TF(verbose);
++		au_fsctx_TF(sum);
++		au_fsctx_TF(dirren);
++		au_fsctx_TF(acl);
++#undef au_fsctx_TF
++
++		case Opt_trunc_xino_path:
++			fallthrough;
++		case Opt_itrunc_xino:
++			u.xino_itrunc = &opt->xino_itrunc;
++			AuDbg("trunc_xino %d\n", u.xino_itrunc->bindex);
++			break;
++		case Opt_noxino:
++			AuLabel(noxino);
++			break;
++
++		case Opt_list_plink:
++			AuLabel(list_plink);
++			break;
++		case Opt_udba:
++			AuDbg("udba %d, %s\n",
++				  opt->udba, au_optstr_udba(opt->udba));
++			break;
++		case Opt_diropq_a:
++			AuLabel(diropq_a);
++			break;
++		case Opt_diropq_w:
++			AuLabel(diropq_w);
++			break;
++		case Opt_wsum:
++			AuLabel(wsum);
++			break;
++		case Opt_wbr_create:
++			u.create = &opt->wbr_create;
++			AuDbg("create %d, %s\n", u.create->wbr_create,
++				  au_optstr_wbr_create(u.create->wbr_create));
++			switch (u.create->wbr_create) {
++			case AuWbrCreate_MFSV:
++				fallthrough;
++			case AuWbrCreate_PMFSV:
++				AuDbg("%d sec\n", u.create->mfs_second);
++				break;
++			case AuWbrCreate_MFSRR:
++				fallthrough;
++			case AuWbrCreate_TDMFS:
++				AuDbg("%llu watermark\n",
++					  u.create->mfsrr_watermark);
++				break;
++			case AuWbrCreate_MFSRRV:
++				fallthrough;
++			case AuWbrCreate_TDMFSV:
++				fallthrough;
++			case AuWbrCreate_PMFSRRV:
++				AuDbg("%llu watermark, %d sec\n",
++					  u.create->mfsrr_watermark,
++					  u.create->mfs_second);
++				break;
++			}
++			break;
++		case Opt_wbr_copyup:
++			AuDbg("copyup %d, %s\n", opt->wbr_copyup,
++				  au_optstr_wbr_copyup(opt->wbr_copyup));
++			break;
++		case Opt_fhsm_sec:
++			AuDbg("fhsm_sec %u\n", opt->fhsm_second);
++			break;
++
++		default:
++			AuDbg("type %d\n", opt->type);
++			BUG();
++		}
++		opt++;
++	}
 +#endif
 +}
 +
-+static inline int au_test_procfs(struct super_block *sb __maybe_unused)
-+{
++/* ---------------------------------------------------------------------- */
++
++/*
++ * For conditionally compiled mount options.
++ * Instead of fsparam_flag_no(), use this macro to distinguish ignore_silent.
++ */
++#define au_ignore_flag(name, action)		\
++	fsparam_flag(name, action),		\
++	fsparam_flag("no" name, Opt_ignore_silent)
++
++const struct fs_parameter_spec aufs_fsctx_paramspec[] = {
++	fsparam_string("br", Opt_br),
++
++	/* "add=%d:%s" or "ins=%d:%s" */
++	fsparam_string("add", Opt_add),
++	fsparam_string("ins", Opt_add),
++	fsparam_path("append", Opt_append),
++	fsparam_path("prepend", Opt_prepend),
++
++	fsparam_path("del", Opt_del),
++	/* fsparam_s32("idel", Opt_idel), */
++	fsparam_path("mod", Opt_mod),
++	/* fsparam_string("imod", Opt_imod), */
++
++	fsparam_s32("dirwh", Opt_dirwh),
++
++	fsparam_path("xino", Opt_xino),
++	fsparam_flag("noxino", Opt_noxino),
++	fsparam_flag_no("trunc_xino", Opt_trunc_xino),
++	/* "trunc_xino_v=%d:%d" */
++	/* fsparam_string("trunc_xino_v", Opt_trunc_xino_v), */
++	fsparam_path("trunc_xino", Opt_trunc_xino_path),
++	fsparam_s32("itrunc_xino", Opt_itrunc_xino),
++	/* fsparam_path("zxino", Opt_zxino), */
++	fsparam_flag_no("trunc_xib", Opt_trunc_xib),
++
 +#ifdef CONFIG_PROC_FS
-+	return sb->s_magic == PROC_SUPER_MAGIC;
++	fsparam_flag_no("plink", Opt_plink),
 +#else
-+	return 0;
++	au_ignore_flag("plink", Opt_ignore),
 +#endif
-+}
 +
-+static inline int au_test_sysfs(struct super_block *sb __maybe_unused)
-+{
-+#ifdef CONFIG_SYSFS
-+	return sb->s_magic == SYSFS_MAGIC;
-+#else
-+	return 0;
++#ifdef CONFIG_AUFS_DEBUG
++	fsparam_flag("list_plink", Opt_list_plink),
 +#endif
-+}
 +
-+static inline int au_test_configfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_CONFIGFS_FS)
-+	return sb->s_magic == CONFIGFS_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	fsparam_string("udba", Opt_udba),
 +
-+static inline int au_test_minix(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_MINIX_FS)
-+	return sb->s_magic == MINIX3_SUPER_MAGIC
-+		|| sb->s_magic == MINIX2_SUPER_MAGIC
-+		|| sb->s_magic == MINIX2_SUPER_MAGIC2
-+		|| sb->s_magic == MINIX_SUPER_MAGIC
-+		|| sb->s_magic == MINIX_SUPER_MAGIC2;
++	fsparam_flag_no("dio", Opt_dio),
++
++#ifdef CONFIG_AUFS_DIRREN
++	fsparam_flag_no("dirren", Opt_dirren),
 +#else
-+	return 0;
++	au_ignore_flag("dirren", Opt_ignore),
 +#endif
-+}
 +
-+static inline int au_test_fat(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_FAT_FS)
-+	return sb->s_magic == MSDOS_SUPER_MAGIC;
++#ifdef CONFIG_AUFS_FHSM
++	fsparam_s32("fhsm_sec", Opt_fhsm_sec),
 +#else
-+	return 0;
++	fsparam_s32("fhsm_sec", Opt_ignore),
 +#endif
-+}
 +
-+static inline int au_test_msdos(struct super_block *sb)
-+{
-+	return au_test_fat(sb);
-+}
++	/* always | a | whiteouted | w */
++	fsparam_string("diropq", Opt_diropq),
 +
-+static inline int au_test_vfat(struct super_block *sb)
-+{
-+	return au_test_fat(sb);
-+}
++	fsparam_flag_no("warn_perm", Opt_warn_perm),
 +
-+static inline int au_test_securityfs(struct super_block *sb __maybe_unused)
-+{
-+#ifdef CONFIG_SECURITYFS
-+	return sb->s_magic == SECURITYFS_MAGIC;
++#ifdef CONFIG_AUFS_SHWH
++	fsparam_flag_no("shwh", Opt_shwh),
 +#else
-+	return 0;
++	au_ignore_flag("shwh", Opt_err),
 +#endif
-+}
 +
-+static inline int au_test_squashfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_SQUASHFS)
-+	return sb->s_magic == SQUASHFS_MAGIC;
-+#else
-+	return 0;
-+#endif
-+}
++	fsparam_flag_no("dirperm1", Opt_dirperm1),
 +
-+static inline int au_test_btrfs(struct super_block *sb __maybe_unused)
-+{
-+#if IS_ENABLED(CONFIG_BTRFS_FS)
-+	return sb->s_magic == BTRFS_SUPER_MAGIC;
++	fsparam_flag_no("verbose", Opt_verbose),
++	fsparam_flag("v", Opt_verbose),
++	fsparam_flag("quiet", Opt_noverbose),
++	fsparam_flag("q", Opt_noverbose),
++	/* user-space may handle this */
++	fsparam_flag("silent", Opt_noverbose),
++
++	fsparam_flag_no("sum", Opt_sum),
++	fsparam_flag("wsum", Opt_wsum),
++
++	fsparam_s32("rdcache", Opt_rdcache),
++	/* "def" or s32 */
++	fsparam_string("rdblk", Opt_rdblk),
++	/* "def" or s32 */
++	fsparam_string("rdhash", Opt_rdhash),
++
++	fsparam_string("create", Opt_wbr_create),
++	fsparam_string("create_policy", Opt_wbr_create),
++	fsparam_string("cpup", Opt_wbr_copyup),
++	fsparam_string("copyup", Opt_wbr_copyup),
++	fsparam_string("copyup_policy", Opt_wbr_copyup),
++
++	/* generic VFS flag */
++#ifdef CONFIG_FS_POSIX_ACL
++	fsparam_flag_no("acl", Opt_acl),
 +#else
-+	return 0;
++	au_ignore_flag("acl", Opt_ignore),
 +#endif
-+}
 +
-+static inline int au_test_xenfs(struct super_block *sb __maybe_unused)
++	/* internal use for the scripts */
++	fsparam_string("si", Opt_ignore_silent),
++
++	/* obsoleted, keep them temporary */
++	fsparam_flag("nodlgt", Opt_ignore_silent),
++	fsparam_flag("clean_plink", Opt_ignore),
++	fsparam_string("dirs", Opt_br),
++	fsparam_u32("debug", Opt_ignore),
++	/* "whiteout" or "all" */
++	fsparam_string("delete", Opt_ignore),
++	fsparam_string("imap", Opt_ignore),
++
++	/* temporary workaround, due to old mount(8)? */
++	fsparam_flag("relatime", Opt_ignore_silent),
++
++	{}
++};
++
++static int au_fsctx_parse_do_add(struct fs_context *fc, struct au_opt *opt,
++				 char *brspec, size_t speclen,
++				 aufs_bindex_t bindex)
 +{
-+#if IS_ENABLED(CONFIG_XENFS)
-+	return sb->s_magic == XENFS_SUPER_MAGIC;
-+#else
-+	return 0;
-+#endif
++	int err;
++	char *p;
++
++	AuDbg("brspec %s\n", brspec);
++
++	err = -ENOMEM;
++	if (!speclen)
++		speclen = strlen(brspec);
++	/* will be freed by au_fsctx_free() */
++	p = kmemdup_nul(brspec, speclen, GFP_NOFS);
++	if (unlikely(!p)) {
++		errorfc(fc, "failed in %s", brspec);
++		goto out;
++	}
++	err = au_opt_add(opt, p, fc->sb_flags, bindex);
++
++out:
++	AuTraceErr(err);
++	return err;
 +}
 +
-+static inline int au_test_debugfs(struct super_block *sb __maybe_unused)
++static int au_fsctx_parse_br(struct fs_context *fc, char *brspec)
 +{
-+#ifdef CONFIG_DEBUG_FS
-+	return sb->s_magic == DEBUGFS_MAGIC;
-+#else
-+	return 0;
-+#endif
++	int err;
++	char *p;
++	struct au_fsctx_opts *a = fc->fs_private;
++	struct au_opt *opt = a->opt;
++	aufs_bindex_t bindex = a->bindex;
++
++	AuDbg("brspec %s\n", brspec);
++
++	err = -EINVAL;
++	while ((p = strsep(&brspec, ":")) && *p) {
++		err = au_fsctx_parse_do_add(fc, opt, p, /*len*/0, bindex);
++		AuTraceErr(err);
++		if (unlikely(err))
++			break;
++		bindex++;
++		opt++;
++		if (unlikely(opt > a->opt_tail)) {
++			err = -E2BIG;
++			bindex--;
++			opt--;
++			break;
++		}
++		opt->type = Opt_tail;
++		a->skipped = 1;
++	}
++	a->bindex = bindex;
++	a->opt = opt;
++
++	AuTraceErr(err);
++	return err;
 +}
 +
-+static inline int au_test_nilfs(struct super_block *sb __maybe_unused)
++static int au_fsctx_parse_add(struct fs_context *fc, char *addspec)
 +{
-+#if IS_ENABLED(CONFIG_NILFS)
-+	return sb->s_magic == NILFS_SUPER_MAGIC;
-+#else
-+	return 0;
-+#endif
++	int err, n;
++	char *p;
++	struct au_fsctx_opts *a = fc->fs_private;
++	struct au_opt *opt = a->opt;
++
++	err = -EINVAL;
++	p = strchr(addspec, ':');
++	if (unlikely(!p)) {
++		errorfc(fc, "bad arg in %s", addspec);
++		goto out;
++	}
++	*p++ = '\0';
++	err = kstrtoint(addspec, 0, &n);
++	if (unlikely(err)) {
++		errorfc(fc, "bad integer in %s", addspec);
++		goto out;
++	}
++	AuDbg("n %d\n", n);
++	err = au_fsctx_parse_do_add(fc, opt, p, /*len*/0, n);
++
++out:
++	AuTraceErr(err);
++	return err;
 +}
 +
-+static inline int au_test_hfsplus(struct super_block *sb __maybe_unused)
++static int au_fsctx_parse_del(struct fs_context *fc, struct au_opt_del *del,
++			      struct fs_parameter *param)
 +{
-+#if IS_ENABLED(CONFIG_HFSPLUS_FS)
++	int err;
++
++	err = -ENOMEM;
++	/* will be freed by au_fsctx_free() */
++	del->pathname = kmemdup_nul(param->string, param->size, GFP_NOFS);
++	if (unlikely(!del->pathname))
++		goto out;
++	AuDbg("del %s\n", del->pathname);
++	err = vfsub_kern_path(del->pathname, AuOpt_LkupDirFlags, &del->h_path);
++	if (unlikely(err))
++		errorfc(fc, "lookup failed %s (%d)", del->pathname, err);
++
++out:
++	AuTraceErr(err);
++	return err;
++}
++
++#if 0 /* reserved for future use */
++static int au_fsctx_parse_idel(struct fs_context *fc, struct au_opt_del *del,
++			       aufs_bindex_t bindex)
++{
++	int err;
++	struct super_block *sb;
++	struct dentry *root;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	sb = a->sb;
++	AuDebugOn(!sb);
++
++	err = -EINVAL;
++	root = sb->s_root;
++	aufs_read_lock(root, AuLock_FLUSH);
++	if (bindex < 0 || au_sbbot(sb) < bindex) {
++		errorfc(fc, "out of bounds, %d", bindex);
++		goto out;
++	}
++
++	err = 0;
++	del->h_path.dentry = dget(au_h_dptr(root, bindex));
++	del->h_path.mnt = mntget(au_sbr_mnt(sb, bindex));
++
++out:
++	aufs_read_unlock(root, !AuLock_IR);
++	AuTraceErr(err);
++	return err;
++}
++#endif
++
++static int au_fsctx_parse_mod(struct fs_context *fc, struct au_opt_mod *mod,
++			      struct fs_parameter *param)
++{
++	int err;
++	struct path path;
++	char *p;
++
++	err = -ENOMEM;
++	/* will be freed by au_fsctx_free() */
++	mod->path = kmemdup_nul(param->string, param->size, GFP_NOFS);
++	if (unlikely(!mod->path))
++		goto out;
++
++	err = -EINVAL;
++	p = strchr(mod->path, '=');
++	if (unlikely(!p)) {
++		errorfc(fc, "no permission %s", mod->path);
++		goto out;
++	}
++
++	*p++ = 0;
++	err = vfsub_kern_path(mod->path, AuOpt_LkupDirFlags, &path);
++	if (unlikely(err)) {
++		errorfc(fc, "lookup failed %s (%d)", mod->path, err);
++		goto out;
++	}
++
++	mod->perm = au_br_perm_val(p);
++	AuDbg("mod path %s, perm 0x%x, %s", mod->path, mod->perm, p);
++	mod->h_root = dget(path.dentry);
++	path_put(&path);
++
++out:
++	AuTraceErr(err);
++	return err;
++}
++
++#if 0 /* reserved for future use */
++static int au_fsctx_parse_imod(struct fs_context *fc, struct au_opt_mod *mod,
++			       char *ibrspec)
++{
++	int err, n;
++	char *p;
++	struct super_block *sb;
++	struct dentry *root;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	sb = a->sb;
++	AuDebugOn(!sb);
++
++	err = -EINVAL;
++	p = strchr(ibrspec, ':');
++	if (unlikely(!p)) {
++		errorfc(fc, "no index, %s", ibrspec);
++		goto out;
++	}
++	*p++ = '\0';
++	err = kstrtoint(ibrspec, 0, &n);
++	if (unlikely(err)) {
++		errorfc(fc, "bad integer in %s", ibrspec);
++		goto out;
++	}
++	AuDbg("n %d\n", n);
++
++	root = sb->s_root;
++	aufs_read_lock(root, AuLock_FLUSH);
++	if (n < 0 || au_sbbot(sb) < n) {
++		errorfc(fc, "out of bounds, %d", bindex);
++		goto out_root;
++	}
++
++	err = 0;
++	mod->perm = au_br_perm_val(p);
++	AuDbg("mod path %s, perm 0x%x, %s\n",
++	      mod->path, mod->perm, p);
++	mod->h_root = dget(au_h_dptr(root, bindex));
++
++out_root:
++	aufs_read_unlock(root, !AuLock_IR);
++out:
++	AuTraceErr(err);
++	return err;
++}
++#endif
++
++static int au_fsctx_parse_xino(struct fs_context *fc,
++			       struct au_opt_xino *xino,
++			       struct fs_parameter *param)
++{
++	int err;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	err = -ENOMEM;
++	/* will be freed by au_opts_free() */
++	xino->path = kmemdup_nul(param->string, param->size, GFP_NOFS);
++	if (unlikely(!xino->path))
++		goto out;
++	AuDbg("path %s\n", xino->path);
++
++	xino->file = au_xino_create(a->sb, xino->path, /*silent*/0,
++				    /*wbrtop*/0);
++	err = PTR_ERR(xino->file);
++	if (IS_ERR(xino->file)) {
++		xino->file = NULL;
++		goto out;
++	}
++
++	err = 0;
++	if (unlikely(a->sb && xino->file->f_path.dentry->d_sb == a->sb)) {
++		err = -EINVAL;
++		errorfc(fc, "%s must be outside", xino->path);
++	}
++
++out:
++	AuTraceErr(err);
++	return err;
++}
++
++static
++int au_fsctx_parse_xino_itrunc_path(struct fs_context *fc,
++				    struct au_opt_xino_itrunc *xino_itrunc,
++				    char *pathname)
++{
++	int err;
++	aufs_bindex_t bbot, bindex;
++	struct path path;
++	struct dentry *root;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	AuDebugOn(!a->sb);
++
++	err = vfsub_kern_path(pathname, AuOpt_LkupDirFlags, &path);
++	if (unlikely(err)) {
++		errorfc(fc, "lookup failed %s (%d)", pathname, err);
++		goto out;
++	}
++
++	xino_itrunc->bindex = -1;
++	root = a->sb->s_root;
++	aufs_read_lock(root, AuLock_FLUSH);
++	bbot = au_sbbot(a->sb);
++	for (bindex = 0; bindex <= bbot; bindex++) {
++		if (au_h_dptr(root, bindex) == path.dentry) {
++			xino_itrunc->bindex = bindex;
++			break;
++		}
++	}
++	aufs_read_unlock(root, !AuLock_IR);
++	path_put(&path);
++
++	if (unlikely(xino_itrunc->bindex < 0)) {
++		err = -EINVAL;
++		errorfc(fc, "no such branch %s", pathname);
++	}
++
++out:
++	AuTraceErr(err);
++	return err;
++}
++
++static int au_fsctx_parse_xino_itrunc(struct fs_context *fc,
++				      struct au_opt_xino_itrunc *xino_itrunc,
++				      unsigned int bindex)
++{
++	int err;
++	aufs_bindex_t bbot;
++	struct super_block *sb;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	sb = a->sb;
++	AuDebugOn(!sb);
++
++	err = 0;
++	si_noflush_read_lock(sb);
++	bbot = au_sbbot(sb);
++	si_read_unlock(sb);
++	if (bindex <= bbot)
++		xino_itrunc->bindex = bindex;
++	else {
++		err = -EINVAL;
++		errorfc(fc, "out of bounds, %u", bindex);
++	}
++
++	AuTraceErr(err);
++	return err;
++}
++
++static int au_fsctx_parse_param(struct fs_context *fc, struct fs_parameter *param)
++{
++	int err, token;
++	struct fs_parse_result result;
++	struct au_fsctx_opts *a = fc->fs_private;
++	struct au_opt *opt = a->opt;
++
++	AuDbg("fc %p, param {key %s, string %s}\n",
++	      fc, param->key, param->string);
++	err = fs_parse(fc, aufs_fsctx_paramspec, param, &result);
++	if (unlikely(err < 0))
++		goto out;
++	token = err;
++	AuDbg("token %d, res{negated %d, uint64 %llu}\n",
++	      token, result.negated, result.uint_64);
++
++	err = -EINVAL;
++	a->skipped = 0;
++	switch (token) {
++	case Opt_br:
++		err = au_fsctx_parse_br(fc, param->string);
++		break;
++	case Opt_add:
++		err = au_fsctx_parse_add(fc, param->string);
++		break;
++	case Opt_append:
++		err = au_fsctx_parse_do_add(fc, opt, param->string, param->size,
++					    /*dummy bindex*/1);
++		break;
++	case Opt_prepend:
++		err = au_fsctx_parse_do_add(fc, opt, param->string, param->size,
++					    /*bindex*/0);
++		break;
++
++	case Opt_del:
++		err = au_fsctx_parse_del(fc, &opt->del, param);
++		break;
++#if 0 /* reserved for future use */
++	case Opt_idel:
++		if (!a->sb) {
++			err = 0;
++			a->skipped = 1;
++			break;
++		}
++		del->pathname = "(indexed)";
++		err = au_opts_parse_idel(fc, &opt->del, result.uint_32);
++		break;
++#endif
++
++	case Opt_mod:
++		err = au_fsctx_parse_mod(fc, &opt->mod, param);
++		break;
++#ifdef IMOD /* reserved for future use */
++	case Opt_imod:
++		if (!a->sb) {
++			err = 0;
++			a->skipped = 1;
++			break;
++		}
++		u.mod->path = "(indexed)";
++		err = au_opts_parse_imod(fc, &opt->mod, param->string);
++		break;
++#endif
++
++	case Opt_xino:
++		err = au_fsctx_parse_xino(fc, &opt->xino, param);
++		break;
++	case Opt_trunc_xino_path:
++		if (!a->sb) {
++			errorfc(fc, "no such branch %s", param->string);
++			break;
++		}
++		err = au_fsctx_parse_xino_itrunc_path(fc, &opt->xino_itrunc,
++						      param->string);
++		break;
++#if 0
++	case Opt_trunc_xino_v:
++		if (!a->sb) {
++			err = 0;
++			a->skipped = 1;
++			break;
++		}
++		err = au_fsctx_parse_xino_itrunc_path(fc, &opt->xino_itrunc,
++						      param->string);
++		break;
++#endif
++	case Opt_itrunc_xino:
++		if (!a->sb) {
++			errorfc(fc, "out of bounds %s", param->string);
++			break;
++		}
++		err = au_fsctx_parse_xino_itrunc(fc, &opt->xino_itrunc,
++						 result.int_32);
++		break;
++
++	case Opt_dirwh:
++		err = 0;
++		opt->dirwh = result.int_32;
++		break;
++
++	case Opt_rdcache:
++		if (unlikely(result.int_32 > AUFS_RDCACHE_MAX)) {
++			errorfc(fc, "rdcache must be smaller than %d",
++				AUFS_RDCACHE_MAX);
++			break;
++		}
++		err = 0;
++		opt->rdcache = result.int_32;
++		break;
++
++	case Opt_rdblk:
++		err = 0;
++		opt->rdblk = AUFS_RDBLK_DEF;
++		if (!strcmp(param->string, "def"))
++			break;
++
++		err = kstrtoint(param->string, 0, &result.int_32);
++		if (unlikely(err)) {
++			errorfc(fc, "bad value in %s", param->key);
++			break;
++		}
++		err = -EINVAL;
++		if (unlikely(result.int_32 < 0
++			     || result.int_32 > KMALLOC_MAX_SIZE)) {
++			errorfc(fc, "bad value in %s", param->key);
++			break;
++		}
++		if (unlikely(result.int_32 && result.int_32 < NAME_MAX)) {
++			errorfc(fc, "rdblk must be larger than %d", NAME_MAX);
++			break;
++		}
++		err = 0;
++		opt->rdblk = result.int_32;
++		break;
++
++	case Opt_rdhash:
++		err = 0;
++		opt->rdhash = AUFS_RDHASH_DEF;
++		if (!strcmp(param->string, "def"))
++			break;
++
++		err = kstrtoint(param->string, 0, &result.int_32);
++		if (unlikely(err)) {
++			errorfc(fc, "bad value in %s", param->key);
++			break;
++		}
++		/* how about zero? */
++		if (result.int_32 < 0
++		    || result.int_32 * sizeof(struct hlist_head)
++		    > KMALLOC_MAX_SIZE) {
++			err = -EINVAL;
++			errorfc(fc, "bad integer in %s", param->key);
++			break;
++		}
++		opt->rdhash = result.int_32;
++		break;
++
++	case Opt_diropq:
++		/*
++		 * As other options, fs/aufs/opts.c can handle these strings by
++		 * match_token().  But "diropq=" is deprecated now and will
++		 * never have other value.  So simple strcmp() is enough here.
++		 */
++		if (!strcmp(param->string, "a") ||
++		    !strcmp(param->string, "always")) {
++			err = 0;
++			opt->type = Opt_diropq_a;
++		} else if (!strcmp(param->string, "w") ||
++			   !strcmp(param->string, "whiteouted")) {
++			err = 0;
++			opt->type = Opt_diropq_w;
++		} else
++			errorfc(fc, "unknown value %s", param->string);
++		break;
++
++	case Opt_udba:
++		opt->udba = au_udba_val(param->string);
++		if (opt->udba >= 0)
++			err = 0;
++		else
++			errorf(fc, "wrong value, %s", param->string);
++		break;
++
++	case Opt_wbr_create:
++		opt->wbr_create.wbr_create
++			= au_wbr_create_val(param->string, &opt->wbr_create);
++		if (opt->wbr_create.wbr_create >= 0)
++			err = 0;
++		else
++			errorf(fc, "wrong value, %s", param->key);
++		break;
++
++	case Opt_wbr_copyup:
++		opt->wbr_copyup = au_wbr_copyup_val(param->string);
++		if (opt->wbr_copyup >= 0)
++			err = 0;
++		else
++			errorfc(fc, "wrong value, %s", param->key);
++		break;
++
++	case Opt_fhsm_sec:
++		if (unlikely(result.int_32 < 0)) {
++			errorfc(fc, "bad integer in %s\n", param->key);
++			break;
++		}
++		err = 0;
++		if (sysaufs_brs)
++			opt->fhsm_second = result.int_32;
++		else
++			warnfc(fc, "ignored %s %s", param->key, param->string);
++		break;
++
++	/* simple true/false flag */
++#define au_fsctx_TF(name)				\
++		case Opt_##name:			\
++			err = 0;			\
++			opt->tf = !result.negated;	\
++			break
++	au_fsctx_TF(trunc_xino);
++	au_fsctx_TF(trunc_xib);
++	au_fsctx_TF(dirperm1);
++	au_fsctx_TF(plink);
++	au_fsctx_TF(shwh);
++	au_fsctx_TF(dio);
++	au_fsctx_TF(warn_perm);
++	au_fsctx_TF(verbose);
++	au_fsctx_TF(sum);
++	au_fsctx_TF(dirren);
++	au_fsctx_TF(acl);
++#undef au_fsctx_TF
++
++	case Opt_noverbose:
++		err = 0;
++		opt->type = Opt_verbose;
++		opt->tf = false;
++		break;
++
++	case Opt_noxino:
++		fallthrough;
++	case Opt_list_plink:
++		fallthrough;
++	case Opt_wsum:
++		err = 0;
++		break;
++
++	case Opt_ignore:
++		warnfc(fc, "ignored %s", param->key);
++		fallthrough;
++	case Opt_ignore_silent:
++		a->skipped = 1;
++		err = 0;
++		break;
++	default:
++		a->skipped = 1;
++		err = -ENOPARAM;
++		break;
++	}
++	if (unlikely(err))
++		goto out;
++	if (a->skipped)
++		goto out;
++
++	switch (token) {
++	case Opt_br:
++		fallthrough;
++	case Opt_noverbose:
++		fallthrough;
++	case Opt_diropq:
++		break;
++	default:
++		opt->type = token;
++		break;
++	}
++	opt++;
++	if (unlikely(opt > a->opt_tail)) {
++		err = -E2BIG;
++		opt--;
++	}
++	opt->type = Opt_tail;
++	a->opt = opt;
++
++out:
++	return err;
++}
++
++/*
++ * these options accept both 'name=val' and 'name:val' form.
++ * some accept optional '=' in its value.
++ * eg. br:/br1=rw:/br2=ro and br=/br1=rw:/br2=ro
++ */
++static inline unsigned int is_colonopt(char *str)
++{
++#define do_test(name)					\
++	if (!strncmp(str, name ":", sizeof(name)))	\
++		return sizeof(name) - 1
++	do_test("br");
++	do_test("add");
++	do_test("ins");
++	do_test("append");
++	do_test("prepend");
++	do_test("del");
++	/* do_test("idel"); */
++	do_test("mod");
++	/* do_test("imod"); */
++#undef do_test
++
++	return 0;
++}
++
++static int au_fsctx_parse_monolithic(struct fs_context *fc, void *data)
++{
++	int err;
++	unsigned int u;
++	char *str;
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	str = data;
++	AuDbg("str %s\n", str);
++	while (str) {
++		u = is_colonopt(str);
++		if (u)
++			str[u] = '=';
++		str = strchr(str, ',');
++		if (!str)
++			break;
++		str++;
++	}
++	str = data;
++	AuDbg("str %s\n", str);
++
++	err = generic_parse_monolithic(fc, str);
++	AuTraceErr(err);
++	au_fsctx_dump(&a->opts);
++
++	return err;
++}
++
++/* ---------------------------------------------------------------------- */
++
++static void au_fsctx_opts_free(struct au_opts *opts)
++{
++	struct au_opt *opt;
++
++	opt = opts->opt;
++	while (opt->type != Opt_tail) {
++		switch (opt->type) {
++		case Opt_add:
++			fallthrough;
++		case Opt_append:
++			fallthrough;
++		case Opt_prepend:
++			kfree(opt->add.pathname);
++			path_put(&opt->add.path);
++			break;
++		case Opt_del:
++			kfree(opt->del.pathname);
++			fallthrough;
++		case Opt_idel:
++			path_put(&opt->del.h_path);
++			break;
++		case Opt_mod:
++			kfree(opt->mod.path);
++			fallthrough;
++		case Opt_imod:
++			dput(opt->mod.h_root);
++			break;
++		case Opt_xino:
++			kfree(opt->xino.path);
++			fput(opt->xino.file);
++			break;
++		}
++		opt++;
++	}
++}
++
++static void au_fsctx_free(struct fs_context *fc)
++{
++	struct au_fsctx_opts *a = fc->fs_private;
++
++	/* fs_type=%p, root=%pD */
++	AuDbg("fc %p{sb_flags 0x%x, sb_flags_mask 0x%x, purpose %u\n",
++	      fc, fc->sb_flags, fc->sb_flags_mask, fc->purpose);
++
++	kobject_put(&a->sbinfo->si_kobj);
++	au_fsctx_opts_free(&a->opts);
++	free_page((unsigned long)a->opts.opt);
++	au_kfree_rcu(a);
++}
++
++static const struct fs_context_operations au_fsctx_ops = {
++	.free			= au_fsctx_free,
++	.parse_param		= au_fsctx_parse_param,
++	.parse_monolithic	= au_fsctx_parse_monolithic,
++	.get_tree		= au_fsctx_get_tree,
++	.reconfigure		= au_fsctx_reconfigure
++	/*
++	 * nfs4 requires ->dup()? No.
++	 * I don't know what is this ->dup() for.
++	 */
++};
++
++int aufs_fsctx_init(struct fs_context *fc)
++{
++	int err;
++	struct au_fsctx_opts *a;
++
++	/* fs_type=%p, root=%pD */
++	AuDbg("fc %p{sb_flags 0x%x, sb_flags_mask 0x%x, purpose %u\n",
++	      fc, fc->sb_flags, fc->sb_flags_mask, fc->purpose);
++
++	/* they will be freed by au_fsctx_free() */
++	err = -ENOMEM;
++	a = kzalloc(sizeof(*a), GFP_NOFS);
++	if (unlikely(!a))
++		goto out;
++	a->bindex = 0;
++	a->opts.opt = (void *)__get_free_page(GFP_NOFS);
++	if (unlikely(!a->opts.opt))
++		goto out_a;
++	a->opt = a->opts.opt;
++	a->opt->type = Opt_tail;
++	a->opts.max_opt = PAGE_SIZE / sizeof(*a->opts.opt);
++	a->opt_tail = a->opt + a->opts.max_opt - 1;
++	a->opts.sb_flags = fc->sb_flags;
++
++	a->sb = NULL;
++	if (fc->root) {
++		AuDebugOn(fc->purpose != FS_CONTEXT_FOR_RECONFIGURE);
++		a->opts.flags = AuOpts_REMOUNT;
++		a->sb = fc->root->d_sb;
++		a->sbinfo = au_sbi(a->sb);
++		kobject_get(&a->sbinfo->si_kobj);
++	} else {
++		a->sbinfo = au_si_alloc(a->sb);
++		AuDebugOn(!a->sbinfo);
++		err = PTR_ERR(a->sbinfo);
++		if (IS_ERR(a->sbinfo))
++			goto out_opt;
++		au_rw_write_unlock(&a->sbinfo->si_rwsem);
++	}
++
++	err = 0;
++	fc->fs_private = a;
++	fc->ops = &au_fsctx_ops;
++	goto out; /* success */
++
++out_opt:
++	free_page((unsigned long)a->opts.opt);
++out_a:
++	au_kfree_rcu(a);
++out:
++	AuTraceErr(err);
++	return err;
++}
+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-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,401 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++/*
++ * Copyright (C) 2005-2021 Junjiro R. Okajima
++ *
++ * This program, aufs is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
++ */
++
++/*
++ * judging filesystem type
++ */
++
++#ifndef __AUFS_FSTYPE_H__
++#define __AUFS_FSTYPE_H__
++
++#ifdef __KERNEL__
++
++#include <linux/fs.h>
++#include <linux/magic.h>
++#include <linux/nfs_fs.h>
++#include <linux/romfs_fs.h>
++
++static inline int au_test_aufs(struct super_block *sb)
++{
++	return sb->s_magic == AUFS_SUPER_MAGIC;
++}
++
++static inline const char *au_sbtype(struct super_block *sb)
++{
++	return sb->s_type->name;
++}
++
++static inline int au_test_iso9660(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_ISO9660_FS)
++	return sb->s_magic == ISOFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_romfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_ROMFS_FS)
++	return sb->s_magic == ROMFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_cramfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_CRAMFS)
++	return sb->s_magic == CRAMFS_MAGIC;
++#endif
++	return 0;
++}
++
++static inline int au_test_nfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_NFS_FS)
++	return sb->s_magic == NFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_fuse(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_FUSE_FS)
++	return sb->s_magic == FUSE_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_xfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_XFS_FS)
++	return sb->s_magic == XFS_SB_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_tmpfs(struct super_block *sb __maybe_unused)
++{
++#ifdef CONFIG_TMPFS
++	return sb->s_magic == TMPFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_ecryptfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_ECRYPT_FS)
++	return !strcmp(au_sbtype(sb), "ecryptfs");
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_ramfs(struct super_block *sb)
++{
++	return sb->s_magic == RAMFS_MAGIC;
++}
++
++static inline int au_test_ubifs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_UBIFS_FS)
++	return sb->s_magic == UBIFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_procfs(struct super_block *sb __maybe_unused)
++{
++#ifdef CONFIG_PROC_FS
++	return sb->s_magic == PROC_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_sysfs(struct super_block *sb __maybe_unused)
++{
++#ifdef CONFIG_SYSFS
++	return sb->s_magic == SYSFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_configfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_CONFIGFS_FS)
++	return sb->s_magic == CONFIGFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_minix(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_MINIX_FS)
++	return sb->s_magic == MINIX3_SUPER_MAGIC
++		|| sb->s_magic == MINIX2_SUPER_MAGIC
++		|| sb->s_magic == MINIX2_SUPER_MAGIC2
++		|| sb->s_magic == MINIX_SUPER_MAGIC
++		|| sb->s_magic == MINIX_SUPER_MAGIC2;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_fat(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_FAT_FS)
++	return sb->s_magic == MSDOS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_msdos(struct super_block *sb)
++{
++	return au_test_fat(sb);
++}
++
++static inline int au_test_vfat(struct super_block *sb)
++{
++	return au_test_fat(sb);
++}
++
++static inline int au_test_securityfs(struct super_block *sb __maybe_unused)
++{
++#ifdef CONFIG_SECURITYFS
++	return sb->s_magic == SECURITYFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_squashfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_SQUASHFS)
++	return sb->s_magic == SQUASHFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_btrfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_BTRFS_FS)
++	return sb->s_magic == BTRFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_xenfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_XENFS)
++	return sb->s_magic == XENFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_debugfs(struct super_block *sb __maybe_unused)
++{
++#ifdef CONFIG_DEBUG_FS
++	return sb->s_magic == DEBUGFS_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_nilfs(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_NILFS)
++	return sb->s_magic == NILFS_SUPER_MAGIC;
++#else
++	return 0;
++#endif
++}
++
++static inline int au_test_hfsplus(struct super_block *sb __maybe_unused)
++{
++#if IS_ENABLED(CONFIG_HFSPLUS_FS)
 +	return sb->s_magic == HFSPLUS_SUPER_MAGIC;
 +#else
 +	return 0;
@@ -16541,7 +17830,7 @@ diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
 +#endif /* __AUFS_FSTYPE_H__ */
 diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 --- /usr/share/empty/fs/aufs/hbl.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hbl.h	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/hbl.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,65 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -16610,7 +17899,7 @@ diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
 +#endif /* __AUFS_HBL_H__ */
 diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 --- /usr/share/empty/fs/aufs/hfsnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/hfsnotify.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,288 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -16902,7 +18191,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
 +};
 diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 --- /usr/share/empty/fs/aufs/hfsplus.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/hfsplus.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,60 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -16966,7 +18255,7 @@ diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
 +}
 diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 --- /usr/share/empty/fs/aufs/hnotify.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/hnotify.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,715 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -17685,7 +18974,7 @@ diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
 +}
 diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
 --- /usr/share/empty/fs/aufs/iinfo.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/iinfo.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,286 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -17975,7 +19264,7 @@ 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	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/inode.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,529 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -18508,7 +19797,7 @@ 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	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/inode.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,698 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -19210,7 +20499,7 @@ diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
 +#endif /* __AUFS_INODE_H__ */
 diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 --- /usr/share/empty/fs/aufs/ioctl.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/ioctl.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,220 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -19434,7 +20723,7 @@ diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
 +#endif
 diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
 --- /usr/share/empty/fs/aufs/i_op_add.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/i_op_add.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,936 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -20374,8 +21663,8 @@ 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	2021-12-03 15:38:59.936647310 +0100
-@@ -0,0 +1,1502 @@
++++ linux/fs/aufs/i_op.c	2024-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,1501 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -20401,7 +21690,6 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +#include <linux/device_cgroup.h>
 +#include <linux/fs_stack.h>
 +#include <linux/iversion.h>
-+#include <linux/namei.h>
 +#include <linux/security.h>
 +#include "aufs.h"
 +
@@ -21880,7 +23168,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
 +};
 diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
 --- /usr/share/empty/fs/aufs/i_op_del.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/i_op_del.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,520 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -22404,7 +23692,7 @@ 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	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/i_op_ren.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,1256 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -23664,7 +24952,7 @@ diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
 +}
 diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 --- /usr/share/empty/fs/aufs/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Kconfig	2021-12-03 15:38:59.929980643 +0100
++++ linux/fs/aufs/Kconfig	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,199 @@
 +# SPDX-License-Identifier: GPL-2.0
 +config AUFS_FS
@@ -23792,7 +25080,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +	his child on the lower branch, since it is a bad idea to issue
 +	rename(2) internally for every lower branch. But user may not
 +	accept this behaviour. So here is a workaround to allow such
-+	rename(2) and store some extra infromation on the writable
++	rename(2) and store some extra information on the writable
 +	branch. Obviously this costs high (and I don't like it).
 +	To use this feature, you need to enable this configuration AND
 +	to specify the mount option `dirren.'
@@ -23867,7 +25155,7 @@ diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
 +endif
 diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 --- /usr/share/empty/fs/aufs/lcnt.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/lcnt.h	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/lcnt.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,186 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -24057,7 +25345,7 @@ diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
 +#endif /* __AUFS_LCNT_H__ */
 diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
 --- /usr/share/empty/fs/aufs/loop.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/loop.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,148 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -24209,7 +25497,7 @@ 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	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/loop.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,55 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -24268,7 +25556,7 @@ diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
 +#endif /* __AUFS_LOOP_H__ */
 diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
 --- /usr/share/empty/fs/aufs/magic.mk	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/magic.mk	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/magic.mk	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,31 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -24303,7 +25591,7 @@ diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
 +endif
 diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 --- /usr/share/empty/fs/aufs/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile	2021-12-03 15:38:59.929980643 +0100
++++ linux/fs/aufs/Makefile	2024-07-24 04:23:03.918673005 +0200
 @@ -0,0 +1,46 @@
 +# SPDX-License-Identifier: GPL-2.0
 +
@@ -24324,7 +25612,7 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +endif
 +
 +obj-$(CONFIG_AUFS_FS) += aufs.o
-+aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o \
++aufs-y := module.o sbinfo.o super.o branch.o xino.o sysaufs.o opts.o fsctx.o \
 +	wkq.o vfsub.o dcsub.o \
 +	cpup.o whout.o wbr_policy.o \
 +	dinfo.o dentry.o \
@@ -24353,7 +25641,7 @@ diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
 diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 --- /usr/share/empty/fs/aufs/module.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/module.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,273 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -24630,7 +25918,7 @@ diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
 +module_exit(aufs_exit);
 diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 --- /usr/share/empty/fs/aufs/module.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h	2021-12-03 15:38:59.936647310 +0100
++++ linux/fs/aufs/module.h	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,166 @@
 +/* SPDX-License-Identifier: GPL-2.0 */
 +/*
@@ -24800,7 +26088,7 @@ diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
 +#endif /* __AUFS_MODULE_H__ */
 diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
 --- /usr/share/empty/fs/aufs/mvdown.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c	2021-12-03 15:38:59.939980643 +0100
++++ linux/fs/aufs/mvdown.c	2024-07-24 04:23:03.922006334 +0200
 @@ -0,0 +1,706 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
@@ -25510,8 +26798,8 @@ 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	2021-12-03 15:38:59.939980643 +0100
-@@ -0,0 +1,1880 @@
++++ linux/fs/aufs/opts.c	2024-07-24 04:23:03.922006334 +0200
+@@ -0,0 +1,1032 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005-2021 Junjiro R. Okajima
@@ -25534,172 +26822,12 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 + * mount options/flags
 + */
 +
-+#include <linux/namei.h>
 +#include <linux/types.h> /* a distribution requires */
 +#include <linux/parser.h>
 +#include "aufs.h"
 +
 +/* ---------------------------------------------------------------------- */
 +
-+enum {
-+	Opt_br,
-+	Opt_add, Opt_del, Opt_mod, Opt_append, Opt_prepend,
-+	Opt_idel, Opt_imod,
-+	Opt_dirwh, Opt_rdcache, Opt_rdblk, Opt_rdhash,
-+	Opt_rdblk_def, Opt_rdhash_def,
-+	Opt_xino, Opt_noxino,
-+	Opt_trunc_xino, Opt_trunc_xino_v, Opt_notrunc_xino,
-+	Opt_trunc_xino_path, Opt_itrunc_xino,
-+	Opt_trunc_xib, Opt_notrunc_xib,
-+	Opt_shwh, Opt_noshwh,
-+	Opt_plink, Opt_noplink, Opt_list_plink,
-+	Opt_udba,
-+	Opt_dio, Opt_nodio,
-+	Opt_diropq_a, Opt_diropq_w,
-+	Opt_warn_perm, Opt_nowarn_perm,
-+	Opt_wbr_copyup, Opt_wbr_create,
-+	Opt_fhsm_sec,
-+	Opt_verbose, Opt_noverbose,
-+	Opt_sum, Opt_nosum, Opt_wsum,
-+	Opt_dirperm1, Opt_nodirperm1,
-+	Opt_dirren, Opt_nodirren,
-+	Opt_acl, Opt_noacl,
-+	Opt_tail, Opt_ignore, Opt_ignore_silent, Opt_err
-+};
-+
-+static match_table_t options = {
-+	{Opt_br, "br=%s"},
-+	{Opt_br, "br:%s"},
-+
-+	{Opt_add, "add=%d:%s"},
-+	{Opt_add, "add:%d:%s"},
-+	{Opt_add, "ins=%d:%s"},
-+	{Opt_add, "ins:%d:%s"},
-+	{Opt_append, "append=%s"},
-+	{Opt_append, "append:%s"},
-+	{Opt_prepend, "prepend=%s"},
-+	{Opt_prepend, "prepend:%s"},
-+
-+	{Opt_del, "del=%s"},
-+	{Opt_del, "del:%s"},
-+	/* {Opt_idel, "idel:%d"}, */
-+	{Opt_mod, "mod=%s"},
-+	{Opt_mod, "mod:%s"},
-+	/* {Opt_imod, "imod:%d:%s"}, */
-+
-+	{Opt_dirwh, "dirwh=%d"},
-+
-+	{Opt_xino, "xino=%s"},
-+	{Opt_noxino, "noxino"},
-+	{Opt_trunc_xino, "trunc_xino"},
-+	{Opt_trunc_xino_v, "trunc_xino_v=%d:%d"},
-+	{Opt_notrunc_xino, "notrunc_xino"},
-+	{Opt_trunc_xino_path, "trunc_xino=%s"},
-+	{Opt_itrunc_xino, "itrunc_xino=%d"},
-+	/* {Opt_zxino, "zxino=%s"}, */
-+	{Opt_trunc_xib, "trunc_xib"},
-+	{Opt_notrunc_xib, "notrunc_xib"},
-+
-+#ifdef CONFIG_PROC_FS
-+	{Opt_plink, "plink"},
-+#else
-+	{Opt_ignore_silent, "plink"},
-+#endif
-+
-+	{Opt_noplink, "noplink"},
-+
-+#ifdef CONFIG_AUFS_DEBUG
-+	{Opt_list_plink, "list_plink"},
-+#endif
-+
-+	{Opt_udba, "udba=%s"},
-+
-+	{Opt_dio, "dio"},
-+	{Opt_nodio, "nodio"},
-+
-+#ifdef CONFIG_AUFS_DIRREN
-+	{Opt_dirren, "dirren"},
-+	{Opt_nodirren, "nodirren"},
-+#else
-+	{Opt_ignore, "dirren"},
-+	{Opt_ignore_silent, "nodirren"},
-+#endif
-+
-+#ifdef CONFIG_AUFS_FHSM
-+	{Opt_fhsm_sec, "fhsm_sec=%d"},
-+#else
-+	{Opt_ignore, "fhsm_sec=%d"},
-+#endif
-+
-+	{Opt_diropq_a, "diropq=always"},
-+	{Opt_diropq_a, "diropq=a"},
-+	{Opt_diropq_w, "diropq=whiteouted"},
-+	{Opt_diropq_w, "diropq=w"},
-+
-+	{Opt_warn_perm, "warn_perm"},
-+	{Opt_nowarn_perm, "nowarn_perm"},
-+
-+	/* keep them temporary */
-+	{Opt_ignore_silent, "nodlgt"},
-+	{Opt_ignore, "clean_plink"},
-+
-+#ifdef CONFIG_AUFS_SHWH
-+	{Opt_shwh, "shwh"},
-+#endif
-+	{Opt_noshwh, "noshwh"},
-+
-+	{Opt_dirperm1, "dirperm1"},
-+	{Opt_nodirperm1, "nodirperm1"},
-+
-+	{Opt_verbose, "verbose"},
-+	{Opt_verbose, "v"},
-+	{Opt_noverbose, "noverbose"},
-+	{Opt_noverbose, "quiet"},
-+	{Opt_noverbose, "q"},
-+	{Opt_noverbose, "silent"},
-+
-+	{Opt_sum, "sum"},
-+	{Opt_nosum, "nosum"},
-+	{Opt_wsum, "wsum"},
-+
-+	{Opt_rdcache, "rdcache=%d"},
-+	{Opt_rdblk, "rdblk=%d"},
-+	{Opt_rdblk_def, "rdblk=def"},
-+	{Opt_rdhash, "rdhash=%d"},
-+	{Opt_rdhash_def, "rdhash=def"},
-+
-+	{Opt_wbr_create, "create=%s"},
-+	{Opt_wbr_create, "create_policy=%s"},
-+	{Opt_wbr_copyup, "cpup=%s"},
-+	{Opt_wbr_copyup, "copyup=%s"},
-+	{Opt_wbr_copyup, "copyup_policy=%s"},
-+
-+	/* generic VFS flag */
-+#ifdef CONFIG_FS_POSIX_ACL
-+	{Opt_acl, "acl"},
-+	{Opt_noacl, "noacl"},
-+#else
-+	{Opt_ignore, "acl"},
-+	{Opt_ignore_silent, "noacl"},
-+#endif
-+
-+	/* internal use for the scripts */
-+	{Opt_ignore_silent, "si=%s"},
-+
-+	{Opt_br, "dirs=%s"},
-+	{Opt_ignore, "debug=%d"},
-+	{Opt_ignore, "delete=whiteout"},
-+	{Opt_ignore, "delete=all"},
-+	{Opt_ignore, "imap=%s"},
-+
-+	/* temporary workaround, due to old mount(8)? */
-+	{Opt_ignore_silent, "relatime"},
-+
-+	{Opt_err, NULL}
-+};
-+
-+/* ---------------------------------------------------------------------- */
-+
 +static const char *au_parser_pattern(int val, match_table_t tbl)
 +{
 +	struct match_token *p;
@@ -25831,7 +26959,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	return q - str->a;
 +}
 +
-+static int noinline_for_stack br_perm_val(char *perm)
++int au_br_perm_val(char *perm)
 +{
 +	int val, bad, sz;
 +	char *p;
@@ -25924,7 +27052,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	{-1, NULL}
 +};
 +
-+static int noinline_for_stack udba_val(char *str)
++int au_udba_val(char *str)
 +{
 +	substring_t args[MAX_OPT_ARGS];
 +
@@ -25995,8 +27123,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	return err;
 +}
 +
-+static int noinline_for_stack
-+au_wbr_create_val(char *str, struct au_opt_wbr_create *create)
++int au_wbr_create_val(char *str, struct au_opt_wbr_create *create)
 +{
 +	int err, e;
 +	substring_t args[MAX_OPT_ARGS];
@@ -26052,7 +27179,7 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	{-1, NULL}
 +};
 +
-+static int noinline_for_stack au_wbr_copyup_val(char *str)
++int au_wbr_copyup_val(char *str)
 +{
 +	substring_t args[MAX_OPT_ARGS];
 +
@@ -26066,235 +27193,8 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +
 +/* ---------------------------------------------------------------------- */
 +
-+static const int lkup_dirflags = LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
-+
-+static void dump_opts(struct au_opts *opts)
-+{
-+#ifdef CONFIG_AUFS_DEBUG
-+	/* reduce stack space */
-+	union {
-+		struct au_opt_add *add;
-+		struct au_opt_del *del;
-+		struct au_opt_mod *mod;
-+		struct au_opt_xino *xino;
-+		struct au_opt_xino_itrunc *xino_itrunc;
-+		struct au_opt_wbr_create *create;
-+	} u;
-+	struct au_opt *opt;
-+
-+	opt = opts->opt;
-+	while (opt->type != Opt_tail) {
-+		switch (opt->type) {
-+		case Opt_add:
-+			u.add = &opt->add;
-+			AuDbg("add {b%d, %s, 0x%x, %p}\n",
-+				  u.add->bindex, u.add->pathname, u.add->perm,
-+				  u.add->path.dentry);
-+			break;
-+		case Opt_del:
-+		case Opt_idel:
-+			u.del = &opt->del;
-+			AuDbg("del {%s, %p}\n",
-+			      u.del->pathname, u.del->h_path.dentry);
-+			break;
-+		case Opt_mod:
-+		case Opt_imod:
-+			u.mod = &opt->mod;
-+			AuDbg("mod {%s, 0x%x, %p}\n",
-+				  u.mod->path, u.mod->perm, u.mod->h_root);
-+			break;
-+		case Opt_append:
-+			u.add = &opt->add;
-+			AuDbg("append {b%d, %s, 0x%x, %p}\n",
-+				  u.add->bindex, u.add->pathname, u.add->perm,
-+				  u.add->path.dentry);
-+			break;
-+		case Opt_prepend:
-+			u.add = &opt->add;
-+			AuDbg("prepend {b%d, %s, 0x%x, %p}\n",
-+				  u.add->bindex, u.add->pathname, u.add->perm,
-+				  u.add->path.dentry);
-+			break;
-+		case Opt_dirwh:
-+			AuDbg("dirwh %d\n", opt->dirwh);
-+			break;
-+		case Opt_rdcache:
-+			AuDbg("rdcache %d\n", opt->rdcache);
-+			break;
-+		case Opt_rdblk:
-+			AuDbg("rdblk %u\n", opt->rdblk);
-+			break;
-+		case Opt_rdblk_def:
-+			AuDbg("rdblk_def\n");
-+			break;
-+		case Opt_rdhash:
-+			AuDbg("rdhash %u\n", opt->rdhash);
-+			break;
-+		case Opt_rdhash_def:
-+			AuDbg("rdhash_def\n");
-+			break;
-+		case Opt_xino:
-+			u.xino = &opt->xino;
-+			AuDbg("xino {%s %pD}\n", u.xino->path, u.xino->file);
-+			break;
-+		case Opt_trunc_xino:
-+			AuLabel(trunc_xino);
-+			break;
-+		case Opt_notrunc_xino:
-+			AuLabel(notrunc_xino);
-+			break;
-+		case Opt_trunc_xino_path:
-+		case Opt_itrunc_xino:
-+			u.xino_itrunc = &opt->xino_itrunc;
-+			AuDbg("trunc_xino %d\n", u.xino_itrunc->bindex);
-+			break;
-+		case Opt_noxino:
-+			AuLabel(noxino);
-+			break;
-+		case Opt_trunc_xib:
-+			AuLabel(trunc_xib);
-+			break;
-+		case Opt_notrunc_xib:
-+			AuLabel(notrunc_xib);
-+			break;
-+		case Opt_shwh:
-+			AuLabel(shwh);
-+			break;
-+		case Opt_noshwh:
-+			AuLabel(noshwh);
-+			break;
-+		case Opt_dirperm1:
-+			AuLabel(dirperm1);
-+			break;
-+		case Opt_nodirperm1:
-+			AuLabel(nodirperm1);
-+			break;
-+		case Opt_plink:
-+			AuLabel(plink);
-+			break;
-+		case Opt_noplink:
-+			AuLabel(noplink);
-+			break;
-+		case Opt_list_plink:
-+			AuLabel(list_plink);
-+			break;
-+		case Opt_udba:
-+			AuDbg("udba %d, %s\n",
-+				  opt->udba, au_optstr_udba(opt->udba));
-+			break;
-+		case Opt_dio:
-+			AuLabel(dio);
-+			break;
-+		case Opt_nodio:
-+			AuLabel(nodio);
-+			break;
-+		case Opt_diropq_a:
-+			AuLabel(diropq_a);
-+			break;
-+		case Opt_diropq_w:
-+			AuLabel(diropq_w);
-+			break;
-+		case Opt_warn_perm:
-+			AuLabel(warn_perm);
-+			break;
-+		case Opt_nowarn_perm:
-+			AuLabel(nowarn_perm);
-+			break;
-+		case Opt_verbose:
-+			AuLabel(verbose);
-+			break;
-+		case Opt_noverbose:
-+			AuLabel(noverbose);
-+			break;
-+		case Opt_sum:
-+			AuLabel(sum);
-+			break;
-+		case Opt_nosum:
-+			AuLabel(nosum);
-+			break;
-+		case Opt_wsum:
-+			AuLabel(wsum);
-+			break;
-+		case Opt_wbr_create:
-+			u.create = &opt->wbr_create;
-+			AuDbg("create %d, %s\n", u.create->wbr_create,
-+				  au_optstr_wbr_create(u.create->wbr_create));
-+			switch (u.create->wbr_create) {
-+			case AuWbrCreate_MFSV:
-+			case AuWbrCreate_PMFSV:
-+				AuDbg("%d sec\n", u.create->mfs_second);
-+				break;
-+			case AuWbrCreate_MFSRR:
-+			case AuWbrCreate_TDMFS:
-+				AuDbg("%llu watermark\n",
-+					  u.create->mfsrr_watermark);
-+				break;
-+			case AuWbrCreate_MFSRRV:
-+			case AuWbrCreate_TDMFSV:
-+			case AuWbrCreate_PMFSRRV:
-+				AuDbg("%llu watermark, %d sec\n",
-+					  u.create->mfsrr_watermark,
-+					  u.create->mfs_second);
-+				break;
-+			}
-+			break;
-+		case Opt_wbr_copyup:
-+			AuDbg("copyup %d, %s\n", opt->wbr_copyup,
-+				  au_optstr_wbr_copyup(opt->wbr_copyup));
-+			break;
-+		case Opt_fhsm_sec:
-+			AuDbg("fhsm_sec %u\n", opt->fhsm_second);
-+			break;
-+		case Opt_dirren:
-+			AuLabel(dirren);
-+			break;
-+		case Opt_nodirren:
-+			AuLabel(nodirren);
-+			break;
-+		case Opt_acl:
-+			AuLabel(acl);
-+			break;
-+		case Opt_noacl:
-+			AuLabel(noacl);
-+			break;
-+		default:
-+			BUG();
-+		}
-+		opt++;
-+	}
-+#endif
-+}
-+
-+void au_opts_free(struct au_opts *opts)
-+{
-+	struct au_opt *opt;
-+
-+	opt = opts->opt;
-+	while (opt->type != Opt_tail) {
-+		switch (opt->type) {
-+		case Opt_add:
-+		case Opt_append:
-+		case Opt_prepend:
-+			path_put(&opt->add.path);
-+			break;
-+		case Opt_del:
-+		case Opt_idel:
-+			path_put(&opt->del.h_path);
-+			break;
-+		case Opt_mod:
-+		case Opt_imod:
-+			dput(opt->mod.h_root);
-+			break;
-+		case Opt_xino:
-+			fput(opt->xino.file);
-+			break;
-+		}
-+		opt++;
-+	}
-+}
-+
-+static int opt_add(struct au_opt *opt, char *opt_str, unsigned long sb_flags,
-+		   aufs_bindex_t bindex)
++int au_opt_add(struct au_opt *opt, char *opt_str, unsigned long sb_flags,
++	       aufs_bindex_t bindex)
 +{
 +	int err;
 +	struct au_opt_add *add = &opt->add;
@@ -26307,10 +27207,10 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	if (p) {
 +		*p++ = 0;
 +		if (*p)
-+			add->perm = br_perm_val(p);
++			add->perm = au_br_perm_val(p);
 +	}
 +
-+	err = vfsub_kern_path(add->pathname, lkup_dirflags, &add->path);
++	err = vfsub_kern_path(add->pathname, AuOpt_LkupDirFlags, &add->path);
 +	if (!err) {
 +		if (!p) {
 +			add->perm = AuBrPerm_RO;
@@ -26329,460 +27229,6 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +	return err;
 +}
 +
-+static int au_opts_parse_del(struct au_opt_del *del, substring_t args[])
-+{
-+	int err;
-+
-+	del->pathname = args[0].from;
-+	AuDbg("del path %s\n", del->pathname);
-+
-+	err = vfsub_kern_path(del->pathname, lkup_dirflags, &del->h_path);
-+	if (unlikely(err))
-+		pr_err("lookup failed %s (%d)\n", del->pathname, err);
-+
-+	return err;
-+}
-+
-+#if 0 /* reserved for future use */
-+static int au_opts_parse_idel(struct super_block *sb, aufs_bindex_t bindex,
-+			      struct au_opt_del *del, substring_t args[])
-+{
-+	int err;
-+	struct dentry *root;
-+
-+	err = -EINVAL;
-+	root = sb->s_root;
-+	aufs_read_lock(root, AuLock_FLUSH);
-+	if (bindex < 0 || au_sbbot(sb) < bindex) {
-+		pr_err("out of bounds, %d\n", bindex);
-+		goto out;
-+	}
-+
-+	err = 0;
-+	del->h_path.dentry = dget(au_h_dptr(root, bindex));
-+	del->h_path.mnt = mntget(au_sbr_mnt(sb, bindex));
-+
-+out:
-+	aufs_read_unlock(root, !AuLock_IR);
-+	return err;
-+}
-+#endif
-+
-+static int noinline_for_stack
-+au_opts_parse_mod(struct au_opt_mod *mod, substring_t args[])
-+{
-+	int err;
-+	struct path path;
-+	char *p;
-+
-+	err = -EINVAL;
-+	mod->path = args[0].from;
-+	p = strchr(mod->path, '=');
-+	if (unlikely(!p)) {
-+		pr_err("no permission %s\n", args[0].from);
-+		goto out;
-+	}
-+
-+	*p++ = 0;
-+	err = vfsub_kern_path(mod->path, lkup_dirflags, &path);
-+	if (unlikely(err)) {
-+		pr_err("lookup failed %s (%d)\n", mod->path, err);
-+		goto out;
-+	}
-+
-+	mod->perm = br_perm_val(p);
-+	AuDbg("mod path %s, perm 0x%x, %s\n", mod->path, mod->perm, p);
-+	mod->h_root = dget(path.dentry);
-+	path_put(&path);
-+
-+out:
-+	return err;
-+}
-+
-+#if 0 /* reserved for future use */
-+static int au_opts_parse_imod(struct super_block *sb, aufs_bindex_t bindex,
-+			      struct au_opt_mod *mod, substring_t args[])
-+{
-+	int err;
-+	struct dentry *root;
-+
-+	err = -EINVAL;
-+	root = sb->s_root;
-+	aufs_read_lock(root, AuLock_FLUSH);
-+	if (bindex < 0 || au_sbbot(sb) < bindex) {
-+		pr_err("out of bounds, %d\n", bindex);
-+		goto out;
-+	}
-+
-+	err = 0;
-+	mod->perm = br_perm_val(args[1].from);
-+	AuDbg("mod path %s, perm 0x%x, %s\n",
-+	      mod->path, mod->perm, args[1].from);
-+	mod->h_root = dget(au_h_dptr(root, bindex));
-+
-+out:
-+	aufs_read_unlock(root, !AuLock_IR);
-+	return err;
-+}
-+#endif
-+
-+static int au_opts_parse_xino(struct super_block *sb, struct au_opt_xino *xino,
-+			      substring_t args[])
-+{
-+	int err;
-+	struct file *file;
-+
-+	file = au_xino_create(sb, args[0].from, /*silent*/0, /*wbrtop*/0);
-+	err = PTR_ERR(file);
-+	if (IS_ERR(file))
-+		goto out;
-+
-+	err = -EINVAL;
-+	if (unlikely(file->f_path.dentry->d_sb == sb)) {
-+		fput(file);
-+		pr_err("%s must be outside\n", args[0].from);
-+		goto out;
-+	}
-+
-+	err = 0;
-+	xino->file = file;
-+	xino->path = args[0].from;
-+
-+out:
-+	return err;
-+}
-+
-+static int noinline_for_stack
-+au_opts_parse_xino_itrunc_path(struct super_block *sb,
-+			       struct au_opt_xino_itrunc *xino_itrunc,
-+			       substring_t args[])
-+{
-+	int err;
-+	aufs_bindex_t bbot, bindex;
-+	struct path path;
-+	struct dentry *root;
-+
-+	err = vfsub_kern_path(args[0].from, lkup_dirflags, &path);
-+	if (unlikely(err)) {
-+		pr_err("lookup failed %s (%d)\n", args[0].from, err);
-+		goto out;
-+	}
-+
-+	xino_itrunc->bindex = -1;
-+	root = sb->s_root;
-+	aufs_read_lock(root, AuLock_FLUSH);
-+	bbot = au_sbbot(sb);
-+	for (bindex = 0; bindex <= bbot; bindex++) {
-+		if (au_h_dptr(root, bindex) == path.dentry) {
-+			xino_itrunc->bindex = bindex;
-+			break;
-+		}
-+	}
-+	aufs_read_unlock(root, !AuLock_IR);
-+	path_put(&path);
-+
-+	if (unlikely(xino_itrunc->bindex < 0)) {
-+		pr_err("no such branch %s\n", args[0].from);
-+		err = -EINVAL;
-+	}
-+
-+out:
-+	return err;
-+}
-+
-+/* called without aufs lock */
-+int au_opts_parse(struct super_block *sb, char *str, struct au_opts *opts)
-+{
-+	int err, n, token;
-+	aufs_bindex_t bindex;
-+	unsigned char skipped;
-+	struct dentry *root;
-+	struct au_opt *opt, *opt_tail;
-+	char *opt_str;
-+	/* reduce the stack space */
-+	union {
-+		struct au_opt_xino_itrunc *xino_itrunc;
-+		struct au_opt_wbr_create *create;
-+	} u;
-+	struct {
-+		substring_t args[MAX_OPT_ARGS];
-+	} *a;
-+
-+	err = -ENOMEM;
-+	a = kmalloc(sizeof(*a), GFP_NOFS);
-+	if (unlikely(!a))
-+		goto out;
-+
-+	root = sb->s_root;
-+	err = 0;
-+	bindex = 0;
-+	opt = opts->opt;
-+	opt_tail = opt + opts->max_opt - 1;
-+	opt->type = Opt_tail;
-+	while (!err && (opt_str = strsep(&str, ",")) && *opt_str) {
-+		err = -EINVAL;
-+		skipped = 0;
-+		token = match_token(opt_str, options, a->args);
-+		switch (token) {
-+		case Opt_br:
-+			err = 0;
-+			while (!err && (opt_str = strsep(&a->args[0].from, ":"))
-+			       && *opt_str) {
-+				err = opt_add(opt, opt_str, opts->sb_flags,
-+					      bindex++);
-+				if (unlikely(!err && ++opt > opt_tail)) {
-+					err = -E2BIG;
-+					break;
-+				}
-+				opt->type = Opt_tail;
-+				skipped = 1;
-+			}
-+			break;
-+		case Opt_add:
-+			if (unlikely(match_int(&a->args[0], &n))) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			bindex = n;
-+			err = opt_add(opt, a->args[1].from, opts->sb_flags,
-+				      bindex);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+		case Opt_append:
-+			err = opt_add(opt, a->args[0].from, opts->sb_flags,
-+				      /*dummy bindex*/1);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+		case Opt_prepend:
-+			err = opt_add(opt, a->args[0].from, opts->sb_flags,
-+				      /*bindex*/0);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+		case Opt_del:
-+			err = au_opts_parse_del(&opt->del, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+#if 0 /* reserved for future use */
-+		case Opt_idel:
-+			del->pathname = "(indexed)";
-+			if (unlikely(match_int(&args[0], &n))) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			err = au_opts_parse_idel(sb, n, &opt->del, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+#endif
-+		case Opt_mod:
-+			err = au_opts_parse_mod(&opt->mod, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+#ifdef IMOD /* reserved for future use */
-+		case Opt_imod:
-+			u.mod->path = "(indexed)";
-+			if (unlikely(match_int(&a->args[0], &n))) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			err = au_opts_parse_imod(sb, n, &opt->mod, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+#endif
-+		case Opt_xino:
-+			err = au_opts_parse_xino(sb, &opt->xino, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+
-+		case Opt_trunc_xino_path:
-+			err = au_opts_parse_xino_itrunc_path
-+				(sb, &opt->xino_itrunc, a->args);
-+			if (!err)
-+				opt->type = token;
-+			break;
-+
-+		case Opt_itrunc_xino:
-+			u.xino_itrunc = &opt->xino_itrunc;
-+			if (unlikely(match_int(&a->args[0], &n))) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			u.xino_itrunc->bindex = n;
-+			aufs_read_lock(root, AuLock_FLUSH);
-+			if (n < 0 || au_sbbot(sb) < n) {
-+				pr_err("out of bounds, %d\n", n);
-+				aufs_read_unlock(root, !AuLock_IR);
-+				break;
-+			}
-+			aufs_read_unlock(root, !AuLock_IR);
-+			err = 0;
-+			opt->type = token;
-+			break;
-+
-+		case Opt_dirwh:
-+			if (unlikely(match_int(&a->args[0], &opt->dirwh)))
-+				break;
-+			err = 0;
-+			opt->type = token;
-+			break;
-+
-+		case Opt_rdcache:
-+			if (unlikely(match_int(&a->args[0], &n))) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			if (unlikely(n > AUFS_RDCACHE_MAX)) {
-+				pr_err("rdcache must be smaller than %d\n",
-+				       AUFS_RDCACHE_MAX);
-+				break;
-+			}
-+			opt->rdcache = n;
-+			err = 0;
-+			opt->type = token;
-+			break;
-+		case Opt_rdblk:
-+			if (unlikely(match_int(&a->args[0], &n)
-+				     || n < 0
-+				     || n > KMALLOC_MAX_SIZE)) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			if (unlikely(n && n < NAME_MAX)) {
-+				pr_err("rdblk must be larger than %d\n",
-+				       NAME_MAX);
-+				break;
-+			}
-+			opt->rdblk = n;
-+			err = 0;
-+			opt->type = token;
-+			break;
-+		case Opt_rdhash:
-+			if (unlikely(match_int(&a->args[0], &n)
-+				     || n < 0
-+				     || n * sizeof(struct hlist_head)
-+				     > KMALLOC_MAX_SIZE)) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			opt->rdhash = n;
-+			err = 0;
-+			opt->type = token;
-+			break;
-+
-+		case Opt_trunc_xino:
-+		case Opt_notrunc_xino:
-+		case Opt_noxino:
-+		case Opt_trunc_xib:
-+		case Opt_notrunc_xib:
-+		case Opt_shwh:
-+		case Opt_noshwh:
-+		case Opt_dirperm1:
-+		case Opt_nodirperm1:
-+		case Opt_plink:
-+		case Opt_noplink:
-+		case Opt_list_plink:
-+		case Opt_dio:
-+		case Opt_nodio:
-+		case Opt_diropq_a:
-+		case Opt_diropq_w:
-+		case Opt_warn_perm:
-+		case Opt_nowarn_perm:
-+		case Opt_verbose:
-+		case Opt_noverbose:
-+		case Opt_sum:
-+		case Opt_nosum:
-+		case Opt_wsum:
-+		case Opt_rdblk_def:
-+		case Opt_rdhash_def:
-+		case Opt_dirren:
-+		case Opt_nodirren:
-+		case Opt_acl:
-+		case Opt_noacl:
-+			err = 0;
-+			opt->type = token;
-+			break;
-+
-+		case Opt_udba:
-+			opt->udba = udba_val(a->args[0].from);
-+			if (opt->udba >= 0) {
-+				err = 0;
-+				opt->type = token;
-+			} else
-+				pr_err("wrong value, %s\n", opt_str);
-+			break;
-+
-+		case Opt_wbr_create:
-+			u.create = &opt->wbr_create;
-+			u.create->wbr_create
-+				= au_wbr_create_val(a->args[0].from, u.create);
-+			if (u.create->wbr_create >= 0) {
-+				err = 0;
-+				opt->type = token;
-+			} else
-+				pr_err("wrong value, %s\n", opt_str);
-+			break;
-+		case Opt_wbr_copyup:
-+			opt->wbr_copyup = au_wbr_copyup_val(a->args[0].from);
-+			if (opt->wbr_copyup >= 0) {
-+				err = 0;
-+				opt->type = token;
-+			} else
-+				pr_err("wrong value, %s\n", opt_str);
-+			break;
-+
-+		case Opt_fhsm_sec:
-+			if (unlikely(match_int(&a->args[0], &n)
-+				     || n < 0)) {
-+				pr_err("bad integer in %s\n", opt_str);
-+				break;
-+			}
-+			if (sysaufs_brs) {
-+				opt->fhsm_second = n;
-+				opt->type = token;
-+			} else
-+				pr_warn("ignored %s\n", opt_str);
-+			err = 0;
-+			break;
-+
-+		case Opt_ignore:
-+			pr_warn("ignored %s\n", opt_str);
-+			fallthrough;
-+		case Opt_ignore_silent:
-+			skipped = 1;
-+			err = 0;
-+			break;
-+		case Opt_err:
-+			pr_err("unknown option %s\n", opt_str);
-+			break;
-+		}
-+
-+		if (!err && !skipped) {
-+			if (unlikely(++opt > opt_tail)) {
-+				err = -E2BIG;
-+				opt--;
-+				opt->type = Opt_tail;
-+				break;
-+			}
-+			opt->type = Opt_tail;
-+		}
-+	}
-+
-+	au_kfree_rcu(a);
-+	dump_opts(opts);
-+	if (unlikely(err))
-+		au_opts_free(opts);
-+
-+out:
-+	return err;
-+}
-+
 +static int au_opt_wbr_create(struct super_block *sb,
 +			     struct au_opt_wbr_create *create)
 +{
@@ -26848,12 +27294,13 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +		break;
 +
 +	case Opt_plink:
-+		au_opt_set(sbinfo->si_mntflags, PLINK);
-+		break;
-+	case Opt_noplink:
-+		if (au_opt_test(sbinfo->si_mntflags, PLINK))
-+			au_plink_put(sb, /*verbose*/1);
-+		au_opt_clr(sbinfo->si_mntflags, PLINK);
++		if (opt->tf)
++			au_opt_set(sbinfo->si_mntflags, PLINK);
++		else {
++			if (au_opt_test(sbinfo->si_mntflags, PLINK))
++				au_plink_put(sb, /*verbose*/1);
++			au_opt_clr(sbinfo->si_mntflags, PLINK);
++		}
 +		break;
 +	case Opt_list_plink:
 +		if (au_opt_test(sbinfo->si_mntflags, PLINK))
@@ -26861,12 +27308,13 @@ diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
 +		break;
 +
 +	case Opt_dio:
-+		au_opt_set(sbinfo->si_mntflags, DIO);
<Skipped 1103 lines>
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list