wok rev 24141

linux: add r8188eu.ko
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 14 20:30:13 2021 +0000 (2021-11-14)
parents c7f8c2901186
children 4769ccf2417c
files linux-aufs/receipt linux-wireless/receipt linux/stuff/aufs3-base.patch linux/stuff/aufs3-loopback.patch linux/stuff/aufs3-mmap.patch linux/stuff/aufs3-standalone.patch linux/stuff/linux-slitaz.config linux/stuff/linux-slitaz.config64 linux64-wireless/receipt
line diff
     1.1 --- a/linux-aufs/receipt	Fri Nov 12 11:11:24 2021 +0100
     1.2 +++ b/linux-aufs/receipt	Sun Nov 14 20:30:13 2021 +0000
     1.3 @@ -25,10 +25,11 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 -	if [ ! -d fs ]; then
     1.8 -		kver=$(. ../linux/receipt ; echo $VERSION)
     1.9 -		git checkout origin/aufs${kver%.*}
    1.10 -	fi
    1.11 +	# Must match kernel version
    1.12 +	[ -d fs ] && rm -rf *
    1.13 +	kver=$(. $WOK/linux/receipt ; echo $VERSION)
    1.14 +	git checkout origin/aufs${kver%.*}
    1.15 +
    1.16  	sed -i \
    1.17  		-e 's|CONFIG_AUFS_BRANCH_MAX_127 =.*|CONFIG_AUFS_BRANCH_MAX_127 =|' \
    1.18  		-e 's|#CONFIG_AUFS_BRANCH_MAX_32767 =.*|CONFIG_AUFS_BRANCH_MAX_32767 = y|' \
     2.1 --- a/linux-wireless/receipt	Fri Nov 12 11:11:24 2021 +0100
     2.2 +++ b/linux-wireless/receipt	Sun Nov 14 20:30:13 2021 +0000
     2.3 @@ -21,6 +21,7 @@
     2.4      
     2.5      $wanted_stuff/list_modules.sh drivers/net/wireless drivers/staging/wlan-ng \
     2.6      drivers/misc/echo drivers/leds net/wireless net/mac80211 \
     2.7 +    drivers/staging/rtl8188eu/r8188eu.ko.xz \
     2.8      drivers/staging/rtl8712/r8712u.ko.xz drivers/staging/rtl8192u/r8192u_usb.ko.xz \
     2.9  	drivers/staging/crystalhd/crystalhd.ko.xz | while read module; do
    2.10      	dir=$path/$(dirname $module)
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/linux/stuff/aufs3-base.patch	Sun Nov 14 20:30:13 2021 +0000
     3.3 @@ -0,0 +1,149 @@
     3.4 +aufs3.16 base patch
     3.5 +
     3.6 +diff --git a/MAINTAINERS b/MAINTAINERS
     3.7 +index c2066f4..f07a989 100644
     3.8 +--- a/MAINTAINERS
     3.9 ++++ b/MAINTAINERS
    3.10 +@@ -1698,6 +1698,20 @@ F:	include/linux/audit.h
    3.11 + F:	include/uapi/linux/audit.h
    3.12 + F:	kernel/audit*
    3.13 + 
    3.14 ++AUFS (advanced multi layered unification filesystem) FILESYSTEM
    3.15 ++M:	"J. R. Okajima" <hooanon05g@gmail.com>
    3.16 ++L:	linux-unionfs@vger.kernel.org
    3.17 ++L:	aufs-users@lists.sourceforge.net (members only)
    3.18 ++W:	http://aufs.sourceforge.net
    3.19 ++T:	git://git.code.sf.net/p/aufs/aufs3-linux
    3.20 ++T:	git://github.com/sfjro/aufs3-linux.git
    3.21 ++S:	Supported
    3.22 ++F:	Documentation/filesystems/aufs/
    3.23 ++F:	Documentation/ABI/testing/debugfs-aufs
    3.24 ++F:	Documentation/ABI/testing/sysfs-aufs
    3.25 ++F:	fs/aufs/
    3.26 ++F:	include/uapi/linux/aufs_type.h
    3.27 ++
    3.28 + AUXILIARY DISPLAY DRIVERS
    3.29 + M:	Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
    3.30 + W:	http://miguelojeda.es/auxdisplay.htm
    3.31 +diff --git a/drivers/block/loop.c b/drivers/block/loop.c
    3.32 +index 6cb1beb..30efd68 100644
    3.33 +--- a/drivers/block/loop.c
    3.34 ++++ b/drivers/block/loop.c
    3.35 +@@ -692,6 +692,24 @@ static inline int is_loop_device(struct file *file)
    3.36 + 	return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
    3.37 + }
    3.38 + 
    3.39 ++/*
    3.40 ++ * for AUFS
    3.41 ++ * no get/put for file.
    3.42 ++ */
    3.43 ++struct file *loop_backing_file(struct super_block *sb)
    3.44 ++{
    3.45 ++	struct file *ret;
    3.46 ++	struct loop_device *l;
    3.47 ++
    3.48 ++	ret = NULL;
    3.49 ++	if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
    3.50 ++		l = sb->s_bdev->bd_disk->private_data;
    3.51 ++		ret = l->lo_backing_file;
    3.52 ++	}
    3.53 ++	return ret;
    3.54 ++}
    3.55 ++EXPORT_SYMBOL(loop_backing_file);
    3.56 ++
    3.57 + /* loop sysfs attributes */
    3.58 + 
    3.59 + static ssize_t loop_attr_show(struct device *dev, char *page,
    3.60 +diff --git a/fs/dcache.c b/fs/dcache.c
    3.61 +index 06f6585..0ea8c4a 100644
    3.62 +--- a/fs/dcache.c
    3.63 ++++ b/fs/dcache.c
    3.64 +@@ -1057,7 +1057,7 @@ enum d_walk_ret {
    3.65 +  *
    3.66 +  * The @enter() and @finish() callbacks are called with d_lock held.
    3.67 +  */
    3.68 +-static void d_walk(struct dentry *parent, void *data,
    3.69 ++void d_walk(struct dentry *parent, void *data,
    3.70 + 		   enum d_walk_ret (*enter)(void *, struct dentry *),
    3.71 + 		   void (*finish)(void *))
    3.72 + {
    3.73 +diff --git a/fs/inode.c b/fs/inode.c
    3.74 +index 6eecb7f..b225c0f 100644
    3.75 +--- a/fs/inode.c
    3.76 ++++ b/fs/inode.c
    3.77 +@@ -1496,7 +1496,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
    3.78 +  * This does the actual work of updating an inodes time or version.  Must have
    3.79 +  * had called mnt_want_write() before calling this.
    3.80 +  */
    3.81 +-static int update_time(struct inode *inode, struct timespec *time, int flags)
    3.82 ++int update_time(struct inode *inode, struct timespec *time, int flags)
    3.83 + {
    3.84 + 	if (inode->i_op->update_time)
    3.85 + 		return inode->i_op->update_time(inode, time, flags);
    3.86 +diff --git a/fs/splice.c b/fs/splice.c
    3.87 +index f5cb9ba..9ba380c 100644
    3.88 +--- a/fs/splice.c
    3.89 ++++ b/fs/splice.c
    3.90 +@@ -1114,8 +1114,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
    3.91 + /*
    3.92 +  * Attempt to initiate a splice from pipe to file.
    3.93 +  */
    3.94 +-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
    3.95 +-			   loff_t *ppos, size_t len, unsigned int flags)
    3.96 ++long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
    3.97 ++		    loff_t *ppos, size_t len, unsigned int flags)
    3.98 + {
    3.99 + 	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
   3.100 + 				loff_t *, size_t, unsigned int);
   3.101 +@@ -1131,9 +1131,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   3.102 + /*
   3.103 +  * Attempt to initiate a splice from a file to a pipe.
   3.104 +  */
   3.105 +-static long do_splice_to(struct file *in, loff_t *ppos,
   3.106 +-			 struct pipe_inode_info *pipe, size_t len,
   3.107 +-			 unsigned int flags)
   3.108 ++long do_splice_to(struct file *in, loff_t *ppos,
   3.109 ++		  struct pipe_inode_info *pipe, size_t len,
   3.110 ++		  unsigned int flags)
   3.111 + {
   3.112 + 	ssize_t (*splice_read)(struct file *, loff_t *,
   3.113 + 			       struct pipe_inode_info *, size_t, unsigned int);
   3.114 +diff --git a/include/linux/file.h b/include/linux/file.h
   3.115 +index 4d69123..62cffc0 100644
   3.116 +--- a/include/linux/file.h
   3.117 ++++ b/include/linux/file.h
   3.118 +@@ -19,6 +19,7 @@ struct dentry;
   3.119 + struct path;
   3.120 + extern struct file *alloc_file(struct path *, fmode_t mode,
   3.121 + 	const struct file_operations *fop);
   3.122 ++extern struct file *get_empty_filp(void);
   3.123 + 
   3.124 + static inline void fput_light(struct file *file, int fput_needed)
   3.125 + {
   3.126 +diff --git a/include/linux/fs.h b/include/linux/fs.h
   3.127 +index e11d60c..2f32b35 100644
   3.128 +--- a/include/linux/fs.h
   3.129 ++++ b/include/linux/fs.h
   3.130 +@@ -2618,6 +2618,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *);
   3.131 + extern int inode_newsize_ok(const struct inode *, loff_t offset);
   3.132 + extern void setattr_copy(struct inode *inode, const struct iattr *attr);
   3.133 + 
   3.134 ++extern int update_time(struct inode *, struct timespec *, int);
   3.135 + extern int file_update_time(struct file *file);
   3.136 + 
   3.137 + extern int generic_show_options(struct seq_file *m, struct dentry *root);
   3.138 +diff --git a/include/linux/splice.h b/include/linux/splice.h
   3.139 +index da2751d..2e0fca6 100644
   3.140 +--- a/include/linux/splice.h
   3.141 ++++ b/include/linux/splice.h
   3.142 +@@ -83,4 +83,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
   3.143 + extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
   3.144 + 
   3.145 + extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
   3.146 ++
   3.147 ++extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   3.148 ++			   loff_t *ppos, size_t len, unsigned int flags);
   3.149 ++extern long do_splice_to(struct file *in, loff_t *ppos,
   3.150 ++			 struct pipe_inode_info *pipe, size_t len,
   3.151 ++			 unsigned int flags);
   3.152 + #endif
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/linux/stuff/aufs3-loopback.patch	Sun Nov 14 20:30:13 2021 +0000
     4.3 @@ -0,0 +1,290 @@
     4.4 +aufs3.16 loopback patch
     4.5 +
     4.6 +diff --git a/drivers/block/loop.c b/drivers/block/loop.c
     4.7 +index 30efd68..77b31b4 100644
     4.8 +--- a/drivers/block/loop.c
     4.9 ++++ b/drivers/block/loop.c
    4.10 +@@ -514,7 +514,7 @@ out:
    4.11 + }
    4.12 + 
    4.13 + struct switch_request {
    4.14 +-	struct file *file;
    4.15 ++	struct file *file, *virt_file;
    4.16 + 	struct completion wait;
    4.17 + };
    4.18 + 
    4.19 +@@ -576,7 +576,8 @@ static int loop_thread(void *data)
    4.20 +  * First it needs to flush existing IO, it does this by sending a magic
    4.21 +  * BIO down the pipe. The completion of this BIO does the actual switch.
    4.22 +  */
    4.23 +-static int loop_switch(struct loop_device *lo, struct file *file)
    4.24 ++static int loop_switch(struct loop_device *lo, struct file *file,
    4.25 ++		       struct file *virt_file)
    4.26 + {
    4.27 + 	struct switch_request w;
    4.28 + 	struct bio *bio = bio_alloc(GFP_KERNEL, 0);
    4.29 +@@ -584,6 +585,7 @@ static int loop_switch(struct loop_device *lo, struct file *file)
    4.30 + 		return -ENOMEM;
    4.31 + 	init_completion(&w.wait);
    4.32 + 	w.file = file;
    4.33 ++	w.virt_file = virt_file;
    4.34 + 	bio->bi_private = &w;
    4.35 + 	bio->bi_bdev = NULL;
    4.36 + 	loop_make_request(lo->lo_queue, bio);
    4.37 +@@ -600,7 +602,7 @@ static int loop_flush(struct loop_device *lo)
    4.38 + 	if (!lo->lo_thread)
    4.39 + 		return 0;
    4.40 + 
    4.41 +-	return loop_switch(lo, NULL);
    4.42 ++	return loop_switch(lo, NULL, NULL);
    4.43 + }
    4.44 + 
    4.45 + /*
    4.46 +@@ -619,6 +621,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
    4.47 + 	mapping = file->f_mapping;
    4.48 + 	mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
    4.49 + 	lo->lo_backing_file = file;
    4.50 ++	lo->lo_backing_virt_file = p->virt_file;
    4.51 + 	lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
    4.52 + 		mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
    4.53 + 	lo->old_gfp_mask = mapping_gfp_mask(mapping);
    4.54 +@@ -627,6 +630,13 @@ out:
    4.55 + 	complete(&p->wait);
    4.56 + }
    4.57 + 
    4.58 ++static struct file *loop_real_file(struct file *file)
    4.59 ++{
    4.60 ++	struct file *f = NULL;
    4.61 ++	if (file->f_dentry->d_sb->s_op->real_loop)
    4.62 ++		f = file->f_dentry->d_sb->s_op->real_loop(file);
    4.63 ++	return f;
    4.64 ++}
    4.65 + 
    4.66 + /*
    4.67 +  * loop_change_fd switched the backing store of a loopback device to
    4.68 +@@ -640,6 +650,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
    4.69 + 			  unsigned int arg)
    4.70 + {
    4.71 + 	struct file	*file, *old_file;
    4.72 ++	struct file	*f, *virt_file = NULL, *old_virt_file;
    4.73 + 	struct inode	*inode;
    4.74 + 	int		error;
    4.75 + 
    4.76 +@@ -656,9 +667,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
    4.77 + 	file = fget(arg);
    4.78 + 	if (!file)
    4.79 + 		goto out;
    4.80 ++	f = loop_real_file(file);
    4.81 ++	if (f) {
    4.82 ++		virt_file = file;
    4.83 ++		file = f;
    4.84 ++		get_file(file);
    4.85 ++	}
    4.86 + 
    4.87 + 	inode = file->f_mapping->host;
    4.88 + 	old_file = lo->lo_backing_file;
    4.89 ++	old_virt_file = lo->lo_backing_virt_file;
    4.90 + 
    4.91 + 	error = -EINVAL;
    4.92 + 
    4.93 +@@ -670,17 +688,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
    4.94 + 		goto out_putf;
    4.95 + 
    4.96 + 	/* and ... switch */
    4.97 +-	error = loop_switch(lo, file);
    4.98 ++	error = loop_switch(lo, file, virt_file);
    4.99 + 	if (error)
   4.100 + 		goto out_putf;
   4.101 + 
   4.102 + 	fput(old_file);
   4.103 ++	if (old_virt_file)
   4.104 ++		fput(old_virt_file);
   4.105 + 	if (lo->lo_flags & LO_FLAGS_PARTSCAN)
   4.106 + 		ioctl_by_bdev(bdev, BLKRRPART, 0);
   4.107 + 	return 0;
   4.108 + 
   4.109 +  out_putf:
   4.110 + 	fput(file);
   4.111 ++	if (virt_file)
   4.112 ++		fput(virt_file);
   4.113 +  out:
   4.114 + 	return error;
   4.115 + }
   4.116 +@@ -841,7 +863,7 @@ static void loop_config_discard(struct loop_device *lo)
   4.117 + static int loop_set_fd(struct loop_device *lo, fmode_t mode,
   4.118 + 		       struct block_device *bdev, unsigned int arg)
   4.119 + {
   4.120 +-	struct file	*file, *f;
   4.121 ++	struct file	*file, *f, *virt_file = NULL;
   4.122 + 	struct inode	*inode;
   4.123 + 	struct address_space *mapping;
   4.124 + 	unsigned lo_blocksize;
   4.125 +@@ -856,6 +878,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
   4.126 + 	file = fget(arg);
   4.127 + 	if (!file)
   4.128 + 		goto out;
   4.129 ++	f = loop_real_file(file);
   4.130 ++	if (f) {
   4.131 ++		virt_file = file;
   4.132 ++		file = f;
   4.133 ++		get_file(file);
   4.134 ++	}
   4.135 + 
   4.136 + 	error = -EBUSY;
   4.137 + 	if (lo->lo_state != Lo_unbound)
   4.138 +@@ -904,6 +932,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
   4.139 + 	lo->lo_device = bdev;
   4.140 + 	lo->lo_flags = lo_flags;
   4.141 + 	lo->lo_backing_file = file;
   4.142 ++	lo->lo_backing_virt_file = virt_file;
   4.143 + 	lo->transfer = transfer_none;
   4.144 + 	lo->ioctl = NULL;
   4.145 + 	lo->lo_sizelimit = 0;
   4.146 +@@ -948,6 +977,7 @@ out_clr:
   4.147 + 	lo->lo_thread = NULL;
   4.148 + 	lo->lo_device = NULL;
   4.149 + 	lo->lo_backing_file = NULL;
   4.150 ++	lo->lo_backing_virt_file = NULL;
   4.151 + 	lo->lo_flags = 0;
   4.152 + 	set_capacity(lo->lo_disk, 0);
   4.153 + 	invalidate_bdev(bdev);
   4.154 +@@ -957,6 +987,8 @@ out_clr:
   4.155 + 	lo->lo_state = Lo_unbound;
   4.156 +  out_putf:
   4.157 + 	fput(file);
   4.158 ++	if (virt_file)
   4.159 ++		fput(virt_file);
   4.160 +  out:
   4.161 + 	/* This is safe: open() is still holding a reference. */
   4.162 + 	module_put(THIS_MODULE);
   4.163 +@@ -1003,6 +1035,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
   4.164 + static int loop_clr_fd(struct loop_device *lo)
   4.165 + {
   4.166 + 	struct file *filp = lo->lo_backing_file;
   4.167 ++	struct file *virt_filp = lo->lo_backing_virt_file;
   4.168 + 	gfp_t gfp = lo->old_gfp_mask;
   4.169 + 	struct block_device *bdev = lo->lo_device;
   4.170 + 
   4.171 +@@ -1036,6 +1069,7 @@ static int loop_clr_fd(struct loop_device *lo)
   4.172 + 
   4.173 + 	spin_lock_irq(&lo->lo_lock);
   4.174 + 	lo->lo_backing_file = NULL;
   4.175 ++	lo->lo_backing_virt_file = NULL;
   4.176 + 	spin_unlock_irq(&lo->lo_lock);
   4.177 + 
   4.178 + 	loop_release_xfer(lo);
   4.179 +@@ -1078,6 +1112,8 @@ static int loop_clr_fd(struct loop_device *lo)
   4.180 + 	 * bd_mutex which is usually taken before lo_ctl_mutex.
   4.181 + 	 */
   4.182 + 	fput(filp);
   4.183 ++	if (virt_filp)
   4.184 ++		fput(virt_filp);
   4.185 + 	return 0;
   4.186 + }
   4.187 + 
   4.188 +diff --git a/drivers/block/loop.h b/drivers/block/loop.h
   4.189 +index 90df5d6..cb91822 100644
   4.190 +--- a/drivers/block/loop.h
   4.191 ++++ b/drivers/block/loop.h
   4.192 +@@ -44,7 +44,7 @@ struct loop_device {
   4.193 + 	int		(*ioctl)(struct loop_device *, int cmd, 
   4.194 + 				 unsigned long arg); 
   4.195 + 
   4.196 +-	struct file *	lo_backing_file;
   4.197 ++	struct file *	lo_backing_file, *lo_backing_virt_file;
   4.198 + 	struct block_device *lo_device;
   4.199 + 	unsigned	lo_blocksize;
   4.200 + 	void		*key_data; 
   4.201 +diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
   4.202 +index 95ff59f..79cc7b6 100644
   4.203 +--- a/fs/aufs/f_op.c
   4.204 ++++ b/fs/aufs/f_op.c
   4.205 +@@ -398,7 +398,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos,
   4.206 + 	if (IS_ERR(h_file))
   4.207 + 		goto out;
   4.208 + 
   4.209 +-	if (au_test_loopback_kthread()) {
   4.210 ++	if (0 && au_test_loopback_kthread()) {
   4.211 + 		au_warn_loopback(h_file->f_dentry->d_sb);
   4.212 + 		if (file->f_mapping != h_file->f_mapping) {
   4.213 + 			file->f_mapping = h_file->f_mapping;
   4.214 +diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
   4.215 +index 2a3e245..e2ac602 100644
   4.216 +--- a/fs/aufs/loop.c
   4.217 ++++ b/fs/aufs/loop.c
   4.218 +@@ -130,3 +130,19 @@ void au_loopback_fin(void)
   4.219 + 	symbol_put(loop_backing_file);
   4.220 + 	kfree(au_warn_loopback_array);
   4.221 + }
   4.222 ++
   4.223 ++/* ---------------------------------------------------------------------- */
   4.224 ++
   4.225 ++/* support the loopback block device insude aufs */
   4.226 ++
   4.227 ++struct file *aufs_real_loop(struct file *file)
   4.228 ++{
   4.229 ++	struct file *f;
   4.230 ++
   4.231 ++	BUG_ON(!au_test_aufs(file->f_dentry->d_sb));
   4.232 ++	fi_read_lock(file);
   4.233 ++	f = au_hf_top(file);
   4.234 ++	fi_read_unlock(file);
   4.235 ++	AuDebugOn(!f);
   4.236 ++	return f;
   4.237 ++}
   4.238 +diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
   4.239 +index 6d9864d..3322557 100644
   4.240 +--- a/fs/aufs/loop.h
   4.241 ++++ b/fs/aufs/loop.h
   4.242 +@@ -25,7 +25,11 @@ void au_warn_loopback(struct super_block *h_sb);
   4.243 + 
   4.244 + int au_loopback_init(void);
   4.245 + void au_loopback_fin(void);
   4.246 ++
   4.247 ++struct file *aufs_real_loop(struct file *file);
   4.248 + #else
   4.249 ++AuStub(struct file *, loop_backing_file, return NULL)
   4.250 ++
   4.251 + AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
   4.252 + 	   struct dentry *h_adding)
   4.253 + AuStubInt0(au_test_loopback_kthread, void)
   4.254 +@@ -33,6 +37,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
   4.255 + 
   4.256 + AuStubInt0(au_loopback_init, void)
   4.257 + AuStubVoid(au_loopback_fin, void)
   4.258 ++
   4.259 ++AuStub(struct file *, aufs_real_loop, return NULL, struct file *file)
   4.260 + #endif /* BLK_DEV_LOOP */
   4.261 + 
   4.262 + #endif /* __KERNEL__ */
   4.263 +diff --git a/fs/aufs/super.c b/fs/aufs/super.c
   4.264 +index 52ee100..bd545df 100644
   4.265 +--- a/fs/aufs/super.c
   4.266 ++++ b/fs/aufs/super.c
   4.267 +@@ -810,7 +810,10 @@ static const struct super_operations aufs_sop = {
   4.268 + 	.statfs		= aufs_statfs,
   4.269 + 	.put_super	= aufs_put_super,
   4.270 + 	.sync_fs	= aufs_sync_fs,
   4.271 +-	.remount_fs	= aufs_remount_fs
   4.272 ++	.remount_fs	= aufs_remount_fs,
   4.273 ++#ifdef CONFIG_AUFS_BDEV_LOOP
   4.274 ++	.real_loop	= aufs_real_loop
   4.275 ++#endif
   4.276 + };
   4.277 + 
   4.278 + /* ---------------------------------------------------------------------- */
   4.279 +diff --git a/include/linux/fs.h b/include/linux/fs.h
   4.280 +index 2f32b35..f94f0e6 100644
   4.281 +--- a/include/linux/fs.h
   4.282 ++++ b/include/linux/fs.h
   4.283 +@@ -1561,6 +1561,10 @@ struct super_operations {
   4.284 + 	int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
   4.285 + 	long (*nr_cached_objects)(struct super_block *, int);
   4.286 + 	long (*free_cached_objects)(struct super_block *, long, int);
   4.287 ++#if defined(CONFIG_BLK_DEV_LOOP) ||  defined(CONFIG_BLK_DEV_LOOP_MODULE)
   4.288 ++	/* and aufs */
   4.289 ++	struct file *(*real_loop)(struct file *);
   4.290 ++#endif
   4.291 + };
   4.292 + 
   4.293 + /*
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/linux/stuff/aufs3-mmap.patch	Sun Nov 14 20:30:13 2021 +0000
     5.3 @@ -0,0 +1,420 @@
     5.4 +aufs3.16 mmap patch
     5.5 +
     5.6 +diff --git a/fs/buffer.c b/fs/buffer.c
     5.7 +index eba6e4f..31f0b2d 100644
     5.8 +--- a/fs/buffer.c
     5.9 ++++ b/fs/buffer.c
    5.10 +@@ -2460,7 +2460,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
    5.11 + 	 * Update file times before taking page lock. We may end up failing the
    5.12 + 	 * fault so this update may be superfluous but who really cares...
    5.13 + 	 */
    5.14 +-	file_update_time(vma->vm_file);
    5.15 ++	vma_file_update_time(vma);
    5.16 + 
    5.17 + 	ret = __block_page_mkwrite(vma, vmf, get_block);
    5.18 + 	sb_end_pagefault(sb);
    5.19 +diff --git a/fs/proc/base.c b/fs/proc/base.c
    5.20 +index 2d696b0..fb92686 100644
    5.21 +--- a/fs/proc/base.c
    5.22 ++++ b/fs/proc/base.c
    5.23 +@@ -1799,7 +1799,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
    5.24 + 	down_read(&mm->mmap_sem);
    5.25 + 	vma = find_exact_vma(mm, vm_start, vm_end);
    5.26 + 	if (vma && vma->vm_file) {
    5.27 +-		*path = vma->vm_file->f_path;
    5.28 ++		*path = vma_pr_or_file(vma)->f_path;
    5.29 + 		path_get(path);
    5.30 + 		rc = 0;
    5.31 + 	}
    5.32 +diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
    5.33 +index d4a3574..1397181 100644
    5.34 +--- a/fs/proc/nommu.c
    5.35 ++++ b/fs/proc/nommu.c
    5.36 +@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
    5.37 + 	file = region->vm_file;
    5.38 + 
    5.39 + 	if (file) {
    5.40 +-		struct inode *inode = file_inode(region->vm_file);
    5.41 ++		struct inode *inode;
    5.42 ++
    5.43 ++		file = vmr_pr_or_file(region);
    5.44 ++		inode = file_inode(file);
    5.45 + 		dev = inode->i_sb->s_dev;
    5.46 + 		ino = inode->i_ino;
    5.47 + 	}
    5.48 +diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
    5.49 +index cfa63ee..bf4919e 100644
    5.50 +--- a/fs/proc/task_mmu.c
    5.51 ++++ b/fs/proc/task_mmu.c
    5.52 +@@ -265,7 +265,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
    5.53 + 	const char *name = NULL;
    5.54 + 
    5.55 + 	if (file) {
    5.56 +-		struct inode *inode = file_inode(vma->vm_file);
    5.57 ++		struct inode *inode;
    5.58 ++
    5.59 ++		file = vma_pr_or_file(vma);
    5.60 ++		inode = file_inode(file);
    5.61 + 		dev = inode->i_sb->s_dev;
    5.62 + 		ino = inode->i_ino;
    5.63 + 		pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
    5.64 +@@ -1390,7 +1393,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
    5.65 + 	struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
    5.66 + 	struct vm_area_struct *vma = v;
    5.67 + 	struct numa_maps *md = &numa_priv->md;
    5.68 +-	struct file *file = vma->vm_file;
    5.69 ++	struct file *file = vma_pr_or_file(vma);
    5.70 + 	struct task_struct *task = proc_priv->task;
    5.71 + 	struct mm_struct *mm = vma->vm_mm;
    5.72 + 	struct mm_walk walk = {};
    5.73 +diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
    5.74 +index 678455d..ebd34ba 100644
    5.75 +--- a/fs/proc/task_nommu.c
    5.76 ++++ b/fs/proc/task_nommu.c
    5.77 +@@ -141,7 +141,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
    5.78 + 	file = vma->vm_file;
    5.79 + 
    5.80 + 	if (file) {
    5.81 +-		struct inode *inode = file_inode(vma->vm_file);
    5.82 ++		struct inode *inode;
    5.83 ++
    5.84 ++		file = vma_pr_or_file(vma);
    5.85 ++		inode = file_inode(file);
    5.86 + 		dev = inode->i_sb->s_dev;
    5.87 + 		ino = inode->i_ino;
    5.88 + 		pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
    5.89 +diff --git a/include/linux/mm.h b/include/linux/mm.h
    5.90 +index e03dd29..b576690 100644
    5.91 +--- a/include/linux/mm.h
    5.92 ++++ b/include/linux/mm.h
    5.93 +@@ -1184,6 +1184,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
    5.94 + }
    5.95 + #endif
    5.96 + 
    5.97 ++extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
    5.98 ++extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
    5.99 ++				      int);
   5.100 ++extern void vma_do_get_file(struct vm_area_struct *, const char[], int);
   5.101 ++extern void vma_do_fput(struct vm_area_struct *, const char[], int);
   5.102 ++
   5.103 ++#define vma_file_update_time(vma)	vma_do_file_update_time(vma, __func__, \
   5.104 ++								__LINE__)
   5.105 ++#define vma_pr_or_file(vma)		vma_do_pr_or_file(vma, __func__, \
   5.106 ++							  __LINE__)
   5.107 ++#define vma_get_file(vma)		vma_do_get_file(vma, __func__, __LINE__)
   5.108 ++#define vma_fput(vma)			vma_do_fput(vma, __func__, __LINE__)
   5.109 ++
   5.110 ++#ifndef CONFIG_MMU
   5.111 ++extern struct file *vmr_do_pr_or_file(struct vm_region *, const char[], int);
   5.112 ++extern void vmr_do_fput(struct vm_region *, const char[], int);
   5.113 ++
   5.114 ++#define vmr_pr_or_file(region)		vmr_do_pr_or_file(region, __func__, \
   5.115 ++							  __LINE__)
   5.116 ++#define vmr_fput(region)		vmr_do_fput(region, __func__, __LINE__)
   5.117 ++#endif /* !CONFIG_MMU */
   5.118 ++
   5.119 + extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
   5.120 + extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
   5.121 + 		void *buf, int len, int write);
   5.122 +diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
   5.123 +index 96c5750..a087ecd 100644
   5.124 +--- a/include/linux/mm_types.h
   5.125 ++++ b/include/linux/mm_types.h
   5.126 +@@ -232,6 +232,7 @@ struct vm_region {
   5.127 + 	unsigned long	vm_top;		/* region allocated to here */
   5.128 + 	unsigned long	vm_pgoff;	/* the offset in vm_file corresponding to vm_start */
   5.129 + 	struct file	*vm_file;	/* the backing file or NULL */
   5.130 ++	struct file	*vm_prfile;	/* the virtual backing file or NULL */
   5.131 + 
   5.132 + 	int		vm_usage;	/* region usage count (access under nommu_region_sem) */
   5.133 + 	bool		vm_icache_flushed : 1; /* true if the icache has been flushed for
   5.134 +@@ -300,6 +301,7 @@ struct vm_area_struct {
   5.135 + 	unsigned long vm_pgoff;		/* Offset (within vm_file) in PAGE_SIZE
   5.136 + 					   units, *not* PAGE_CACHE_SIZE */
   5.137 + 	struct file * vm_file;		/* File we map to (can be NULL). */
   5.138 ++	struct file *vm_prfile;		/* shadow of vm_file */
   5.139 + 	void * vm_private_data;		/* was vm_pte (shared mem) */
   5.140 + 
   5.141 + #ifndef CONFIG_MMU
   5.142 +diff --git a/kernel/fork.c b/kernel/fork.c
   5.143 +index 6a13c46..714302c 100644
   5.144 +--- a/kernel/fork.c
   5.145 ++++ b/kernel/fork.c
   5.146 +@@ -416,7 +416,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
   5.147 + 			struct inode *inode = file_inode(file);
   5.148 + 			struct address_space *mapping = file->f_mapping;
   5.149 + 
   5.150 +-			get_file(file);
   5.151 ++			vma_get_file(tmp);
   5.152 + 			if (tmp->vm_flags & VM_DENYWRITE)
   5.153 + 				atomic_dec(&inode->i_writecount);
   5.154 + 			mutex_lock(&mapping->i_mmap_mutex);
   5.155 +diff --git a/mm/Makefile b/mm/Makefile
   5.156 +index 4064f3e..0003fdf 100644
   5.157 +--- a/mm/Makefile
   5.158 ++++ b/mm/Makefile
   5.159 +@@ -18,7 +18,7 @@ obj-y			:= filemap.o mempool.o oom_kill.o fadvise.o \
   5.160 + 			   mm_init.o mmu_context.o percpu.o slab_common.o \
   5.161 + 			   compaction.o balloon_compaction.o vmacache.o \
   5.162 + 			   interval_tree.o list_lru.o workingset.o \
   5.163 +-			   iov_iter.o $(mmu-y)
   5.164 ++			   iov_iter.o prfile.o $(mmu-y)
   5.165 + 
   5.166 + obj-y += init-mm.o
   5.167 + 
   5.168 +diff --git a/mm/filemap.c b/mm/filemap.c
   5.169 +index 900edfa..f4dda0c 100644
   5.170 +--- a/mm/filemap.c
   5.171 ++++ b/mm/filemap.c
   5.172 +@@ -2040,7 +2040,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
   5.173 + 	int ret = VM_FAULT_LOCKED;
   5.174 + 
   5.175 + 	sb_start_pagefault(inode->i_sb);
   5.176 +-	file_update_time(vma->vm_file);
   5.177 ++	vma_file_update_time(vma);
   5.178 + 	lock_page(page);
   5.179 + 	if (page->mapping != inode->i_mapping) {
   5.180 + 		unlock_page(page);
   5.181 +diff --git a/mm/fremap.c b/mm/fremap.c
   5.182 +index 72b8fa3..a00bbf0 100644
   5.183 +--- a/mm/fremap.c
   5.184 ++++ b/mm/fremap.c
   5.185 +@@ -224,16 +224,28 @@ get_write_lock:
   5.186 + 		 */
   5.187 + 		if (mapping_cap_account_dirty(mapping)) {
   5.188 + 			unsigned long addr;
   5.189 +-			struct file *file = get_file(vma->vm_file);
   5.190 ++			struct file *file = vma->vm_file,
   5.191 ++				*prfile = vma->vm_prfile;
   5.192 ++
   5.193 + 			/* mmap_region may free vma; grab the info now */
   5.194 + 			vm_flags = vma->vm_flags;
   5.195 + 
   5.196 ++			vma_get_file(vma);
   5.197 + 			addr = mmap_region(file, start, size, vm_flags, pgoff);
   5.198 +-			fput(file);
   5.199 ++			vma_fput(vma);
   5.200 + 			if (IS_ERR_VALUE(addr)) {
   5.201 + 				err = addr;
   5.202 + 			} else {
   5.203 + 				BUG_ON(addr != start);
   5.204 ++				if (prfile) {
   5.205 ++					struct vm_area_struct *new_vma;
   5.206 ++
   5.207 ++					new_vma = find_vma(mm, addr);
   5.208 ++					if (!new_vma->vm_prfile)
   5.209 ++						new_vma->vm_prfile = prfile;
   5.210 ++					if (new_vma != vma)
   5.211 ++						get_file(prfile);
   5.212 ++				}
   5.213 + 				err = 0;
   5.214 + 			}
   5.215 + 			goto out_freed;
   5.216 +diff --git a/mm/memory.c b/mm/memory.c
   5.217 +index 8b44f76..69a72bf 100644
   5.218 +--- a/mm/memory.c
   5.219 ++++ b/mm/memory.c
   5.220 +@@ -2161,7 +2161,7 @@ reuse:
   5.221 + 			set_page_dirty_balance(dirty_page);
   5.222 + 			/* file_update_time outside page_lock */
   5.223 + 			if (vma->vm_file)
   5.224 +-				file_update_time(vma->vm_file);
   5.225 ++				vma_file_update_time(vma);
   5.226 + 		}
   5.227 + 		put_page(dirty_page);
   5.228 + 		if (page_mkwrite) {
   5.229 +diff --git a/mm/mmap.c b/mm/mmap.c
   5.230 +index 129b847..869d1d7 100644
   5.231 +--- a/mm/mmap.c
   5.232 ++++ b/mm/mmap.c
   5.233 +@@ -253,7 +253,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
   5.234 + 	if (vma->vm_ops && vma->vm_ops->close)
   5.235 + 		vma->vm_ops->close(vma);
   5.236 + 	if (vma->vm_file)
   5.237 +-		fput(vma->vm_file);
   5.238 ++		vma_fput(vma);
   5.239 + 	mpol_put(vma_policy(vma));
   5.240 + 	kmem_cache_free(vm_area_cachep, vma);
   5.241 + 	return next;
   5.242 +@@ -863,7 +863,7 @@ again:			remove_next = 1 + (end > next->vm_end);
   5.243 + 	if (remove_next) {
   5.244 + 		if (file) {
   5.245 + 			uprobe_munmap(next, next->vm_start, next->vm_end);
   5.246 +-			fput(file);
   5.247 ++			vma_fput(vma);
   5.248 + 		}
   5.249 + 		if (next->anon_vma)
   5.250 + 			anon_vma_merge(vma, next);
   5.251 +@@ -1643,8 +1643,8 @@ out:
   5.252 + unmap_and_free_vma:
   5.253 + 	if (vm_flags & VM_DENYWRITE)
   5.254 + 		allow_write_access(file);
   5.255 ++	vma_fput(vma);
   5.256 + 	vma->vm_file = NULL;
   5.257 +-	fput(file);
   5.258 + 
   5.259 + 	/* Undo any partial mapping done by a device driver. */
   5.260 + 	unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
   5.261 +@@ -2434,7 +2434,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
   5.262 + 		goto out_free_mpol;
   5.263 + 
   5.264 + 	if (new->vm_file)
   5.265 +-		get_file(new->vm_file);
   5.266 ++		vma_get_file(new);
   5.267 + 
   5.268 + 	if (new->vm_ops && new->vm_ops->open)
   5.269 + 		new->vm_ops->open(new);
   5.270 +@@ -2453,7 +2453,7 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
   5.271 + 	if (new->vm_ops && new->vm_ops->close)
   5.272 + 		new->vm_ops->close(new);
   5.273 + 	if (new->vm_file)
   5.274 +-		fput(new->vm_file);
   5.275 ++		vma_fput(new);
   5.276 + 	unlink_anon_vmas(new);
   5.277 +  out_free_mpol:
   5.278 + 	mpol_put(vma_policy(new));
   5.279 +@@ -2842,7 +2842,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
   5.280 + 			if (anon_vma_clone(new_vma, vma))
   5.281 + 				goto out_free_mempol;
   5.282 + 			if (new_vma->vm_file)
   5.283 +-				get_file(new_vma->vm_file);
   5.284 ++				vma_get_file(new_vma);
   5.285 + 			if (new_vma->vm_ops && new_vma->vm_ops->open)
   5.286 + 				new_vma->vm_ops->open(new_vma);
   5.287 + 			vma_link(mm, new_vma, prev, rb_link, rb_parent);
   5.288 +diff --git a/mm/nommu.c b/mm/nommu.c
   5.289 +index 4a852f6..b369644 100644
   5.290 +--- a/mm/nommu.c
   5.291 ++++ b/mm/nommu.c
   5.292 +@@ -658,7 +658,7 @@ static void __put_nommu_region(struct vm_region *region)
   5.293 + 		up_write(&nommu_region_sem);
   5.294 + 
   5.295 + 		if (region->vm_file)
   5.296 +-			fput(region->vm_file);
   5.297 ++			vmr_fput(region);
   5.298 + 
   5.299 + 		/* IO memory and memory shared directly out of the pagecache
   5.300 + 		 * from ramfs/tmpfs mustn't be released here */
   5.301 +@@ -823,7 +823,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
   5.302 + 	if (vma->vm_ops && vma->vm_ops->close)
   5.303 + 		vma->vm_ops->close(vma);
   5.304 + 	if (vma->vm_file)
   5.305 +-		fput(vma->vm_file);
   5.306 ++		vma_fput(vma);
   5.307 + 	put_nommu_region(vma->vm_region);
   5.308 + 	kmem_cache_free(vm_area_cachep, vma);
   5.309 + }
   5.310 +@@ -1385,7 +1385,7 @@ unsigned long do_mmap_pgoff(struct file *file,
   5.311 + 					goto error_just_free;
   5.312 + 				}
   5.313 + 			}
   5.314 +-			fput(region->vm_file);
   5.315 ++			vmr_fput(region);
   5.316 + 			kmem_cache_free(vm_region_jar, region);
   5.317 + 			region = pregion;
   5.318 + 			result = start;
   5.319 +@@ -1461,10 +1461,10 @@ error_just_free:
   5.320 + 	up_write(&nommu_region_sem);
   5.321 + error:
   5.322 + 	if (region->vm_file)
   5.323 +-		fput(region->vm_file);
   5.324 ++		vmr_fput(region);
   5.325 + 	kmem_cache_free(vm_region_jar, region);
   5.326 + 	if (vma->vm_file)
   5.327 +-		fput(vma->vm_file);
   5.328 ++		vma_fput(vma);
   5.329 + 	kmem_cache_free(vm_area_cachep, vma);
   5.330 + 	kleave(" = %d", ret);
   5.331 + 	return ret;
   5.332 +diff --git a/mm/prfile.c b/mm/prfile.c
   5.333 +new file mode 100644
   5.334 +index 0000000..532e518
   5.335 +--- /dev/null
   5.336 ++++ b/mm/prfile.c
   5.337 +@@ -0,0 +1,86 @@
   5.338 ++/*
   5.339 ++ * Mainly for aufs which mmap(2) diffrent file and wants to print different path
   5.340 ++ * in /proc/PID/maps.
   5.341 ++ * Call these functions via macros defined in linux/mm.h.
   5.342 ++ *
   5.343 ++ * See Documentation/filesystems/aufs/design/06mmap.txt
   5.344 ++ *
   5.345 ++ * Copyright (c) 2014 Junjro R. Okajima
   5.346 ++ * Copyright (c) 2014 Ian Campbell
   5.347 ++ */
   5.348 ++
   5.349 ++#include <linux/mm.h>
   5.350 ++#include <linux/file.h>
   5.351 ++#include <linux/fs.h>
   5.352 ++
   5.353 ++/* #define PRFILE_TRACE */
   5.354 ++static inline void prfile_trace(struct file *f, struct file *pr,
   5.355 ++			      const char func[], int line, const char func2[])
   5.356 ++{
   5.357 ++#ifdef PRFILE_TRACE
   5.358 ++	if (pr)
   5.359 ++		pr_info("%s:%d: %s, %s\n", func, line, func2,
   5.360 ++			f ? (char *)f->f_dentry->d_name.name : "(null)");
   5.361 ++#endif
   5.362 ++}
   5.363 ++
   5.364 ++void vma_do_file_update_time(struct vm_area_struct *vma, const char func[],
   5.365 ++			     int line)
   5.366 ++{
   5.367 ++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
   5.368 ++
   5.369 ++	prfile_trace(f, pr, func, line, __func__);
   5.370 ++	file_update_time(f);
   5.371 ++	if (f && pr)
   5.372 ++		file_update_time(pr);
   5.373 ++}
   5.374 ++
   5.375 ++struct file *vma_do_pr_or_file(struct vm_area_struct *vma, const char func[],
   5.376 ++			       int line)
   5.377 ++{
   5.378 ++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
   5.379 ++
   5.380 ++	prfile_trace(f, pr, func, line, __func__);
   5.381 ++	return (f && pr) ? pr : f;
   5.382 ++}
   5.383 ++
   5.384 ++void vma_do_get_file(struct vm_area_struct *vma, const char func[], int line)
   5.385 ++{
   5.386 ++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
   5.387 ++
   5.388 ++	prfile_trace(f, pr, func, line, __func__);
   5.389 ++	get_file(f);
   5.390 ++	if (f && pr)
   5.391 ++		get_file(pr);
   5.392 ++}
   5.393 ++
   5.394 ++void vma_do_fput(struct vm_area_struct *vma, const char func[], int line)
   5.395 ++{
   5.396 ++	struct file *f = vma->vm_file, *pr = vma->vm_prfile;
   5.397 ++
   5.398 ++	prfile_trace(f, pr, func, line, __func__);
   5.399 ++	fput(f);
   5.400 ++	if (f && pr)
   5.401 ++		fput(pr);
   5.402 ++}
   5.403 ++
   5.404 ++#ifndef CONFIG_MMU
   5.405 ++struct file *vmr_do_pr_or_file(struct vm_region *region, const char func[],
   5.406 ++			       int line)
   5.407 ++{
   5.408 ++	struct file *f = region->vm_file, *pr = region->vm_prfile;
   5.409 ++
   5.410 ++	prfile_trace(f, pr, func, line, __func__);
   5.411 ++	return (f && pr) ? pr : f;
   5.412 ++}
   5.413 ++
   5.414 ++void vmr_do_fput(struct vm_region *region, const char func[], int line)
   5.415 ++{
   5.416 ++	struct file *f = region->vm_file, *pr = region->vm_prfile;
   5.417 ++
   5.418 ++	prfile_trace(f, pr, func, line, __func__);
   5.419 ++	fput(f);
   5.420 ++	if (f && pr)
   5.421 ++		fput(pr);
   5.422 ++}
   5.423 ++#endif /* !CONFIG_MMU */
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/linux/stuff/aufs3-standalone.patch	Sun Nov 14 20:30:13 2021 +0000
     6.3 @@ -0,0 +1,326 @@
     6.4 +aufs3.16 standalone patch
     6.5 +
     6.6 +diff --git a/fs/dcache.c b/fs/dcache.c
     6.7 +index 0ea8c4a..2c22125 100644
     6.8 +--- a/fs/dcache.c
     6.9 ++++ b/fs/dcache.c
    6.10 +@@ -1161,6 +1161,7 @@ rename_retry:
    6.11 + 	seq = 1;
    6.12 + 	goto again;
    6.13 + }
    6.14 ++EXPORT_SYMBOL(d_walk);
    6.15 + 
    6.16 + /*
    6.17 +  * Search for at least 1 mount point in the dentry's subdirs.
    6.18 +diff --git a/fs/file_table.c b/fs/file_table.c
    6.19 +index 385bfd3..7d4ee57 100644
    6.20 +--- a/fs/file_table.c
    6.21 ++++ b/fs/file_table.c
    6.22 +@@ -147,6 +147,7 @@ over:
    6.23 + 	}
    6.24 + 	return ERR_PTR(-ENFILE);
    6.25 + }
    6.26 ++EXPORT_SYMBOL(get_empty_filp);
    6.27 + 
    6.28 + /**
    6.29 +  * alloc_file - allocate and initialize a 'struct file'
    6.30 +@@ -316,6 +317,7 @@ void put_filp(struct file *file)
    6.31 + 		file_free(file);
    6.32 + 	}
    6.33 + }
    6.34 ++EXPORT_SYMBOL(put_filp);
    6.35 + 
    6.36 + void __init files_init(unsigned long mempages)
    6.37 + { 
    6.38 +diff --git a/fs/inode.c b/fs/inode.c
    6.39 +index b225c0f..73259c8 100644
    6.40 +--- a/fs/inode.c
    6.41 ++++ b/fs/inode.c
    6.42 +@@ -57,6 +57,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
    6.43 + static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
    6.44 + 
    6.45 + __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
    6.46 ++EXPORT_SYMBOL(inode_sb_list_lock);
    6.47 + 
    6.48 + /*
    6.49 +  * Empty aops. Can be used for the cases where the user does not
    6.50 +@@ -1512,6 +1513,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags)
    6.51 + 	mark_inode_dirty_sync(inode);
    6.52 + 	return 0;
    6.53 + }
    6.54 ++EXPORT_SYMBOL(update_time);
    6.55 + 
    6.56 + /**
    6.57 +  *	touch_atime	-	update the access time
    6.58 +diff --git a/fs/namespace.c b/fs/namespace.c
    6.59 +index 182bc41..c88e101 100644
    6.60 +--- a/fs/namespace.c
    6.61 ++++ b/fs/namespace.c
    6.62 +@@ -453,6 +453,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
    6.63 + 	mnt_dec_writers(real_mount(mnt));
    6.64 + 	preempt_enable();
    6.65 + }
    6.66 ++EXPORT_SYMBOL_GPL(__mnt_drop_write);
    6.67 + 
    6.68 + /**
    6.69 +  * mnt_drop_write - give up write access to a mount
    6.70 +@@ -1564,6 +1565,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
    6.71 + 	}
    6.72 + 	return 0;
    6.73 + }
    6.74 ++EXPORT_SYMBOL(iterate_mounts);
    6.75 + 
    6.76 + static void cleanup_group_ids(struct mount *mnt, struct mount *end)
    6.77 + {
    6.78 +diff --git a/fs/notify/group.c b/fs/notify/group.c
    6.79 +index ad19959..adf290d 100644
    6.80 +--- a/fs/notify/group.c
    6.81 ++++ b/fs/notify/group.c
    6.82 +@@ -22,6 +22,7 @@
    6.83 + #include <linux/srcu.h>
    6.84 + #include <linux/rculist.h>
    6.85 + #include <linux/wait.h>
    6.86 ++#include <linux/module.h>
    6.87 + 
    6.88 + #include <linux/fsnotify_backend.h>
    6.89 + #include "fsnotify.h"
    6.90 +@@ -72,6 +73,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
    6.91 + {
    6.92 + 	atomic_inc(&group->refcnt);
    6.93 + }
    6.94 ++EXPORT_SYMBOL(fsnotify_get_group);
    6.95 + 
    6.96 + /*
    6.97 +  * Drop a reference to a group.  Free it if it's through.
    6.98 +@@ -81,6 +83,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
    6.99 + 	if (atomic_dec_and_test(&group->refcnt))
   6.100 + 		fsnotify_final_destroy_group(group);
   6.101 + }
   6.102 ++EXPORT_SYMBOL(fsnotify_put_group);
   6.103 + 
   6.104 + /*
   6.105 +  * Create a new fsnotify_group and hold a reference for the group returned.
   6.106 +@@ -109,6 +112,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
   6.107 + 
   6.108 + 	return group;
   6.109 + }
   6.110 ++EXPORT_SYMBOL(fsnotify_alloc_group);
   6.111 + 
   6.112 + int fsnotify_fasync(int fd, struct file *file, int on)
   6.113 + {
   6.114 +diff --git a/fs/notify/mark.c b/fs/notify/mark.c
   6.115 +index d90deaa..60b4239 100644
   6.116 +--- a/fs/notify/mark.c
   6.117 ++++ b/fs/notify/mark.c
   6.118 +@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
   6.119 + 		mark->free_mark(mark);
   6.120 + 	}
   6.121 + }
   6.122 ++EXPORT_SYMBOL(fsnotify_put_mark);
   6.123 + 
   6.124 + /*
   6.125 +  * Any time a mark is getting freed we end up here.
   6.126 +@@ -191,6 +192,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
   6.127 + 	fsnotify_destroy_mark_locked(mark, group);
   6.128 + 	mutex_unlock(&group->mark_mutex);
   6.129 + }
   6.130 ++EXPORT_SYMBOL(fsnotify_destroy_mark);
   6.131 + 
   6.132 + void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
   6.133 + {
   6.134 +@@ -275,6 +277,7 @@ err:
   6.135 + 
   6.136 + 	return ret;
   6.137 + }
   6.138 ++EXPORT_SYMBOL(fsnotify_add_mark);
   6.139 + 
   6.140 + int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
   6.141 + 		      struct inode *inode, struct vfsmount *mnt, int allow_dups)
   6.142 +@@ -336,6 +339,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
   6.143 + 	atomic_set(&mark->refcnt, 1);
   6.144 + 	mark->free_mark = free_mark;
   6.145 + }
   6.146 ++EXPORT_SYMBOL(fsnotify_init_mark);
   6.147 + 
   6.148 + static int fsnotify_mark_destroy(void *ignored)
   6.149 + {
   6.150 +diff --git a/fs/open.c b/fs/open.c
   6.151 +index d6fd3ac..5224633c 100644
   6.152 +--- a/fs/open.c
   6.153 ++++ b/fs/open.c
   6.154 +@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
   6.155 + 	mutex_unlock(&dentry->d_inode->i_mutex);
   6.156 + 	return ret;
   6.157 + }
   6.158 ++EXPORT_SYMBOL(do_truncate);
   6.159 + 
   6.160 + long vfs_truncate(struct path *path, loff_t length)
   6.161 + {
   6.162 +@@ -298,6 +299,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
   6.163 + 	sb_end_write(inode->i_sb);
   6.164 + 	return ret;
   6.165 + }
   6.166 ++EXPORT_SYMBOL(do_fallocate);
   6.167 + 
   6.168 + SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
   6.169 + {
   6.170 +@@ -663,6 +665,7 @@ int open_check_o_direct(struct file *f)
   6.171 + 	}
   6.172 + 	return 0;
   6.173 + }
   6.174 ++EXPORT_SYMBOL(open_check_o_direct);
   6.175 + 
   6.176 + static int do_dentry_open(struct file *f,
   6.177 + 			  int (*open)(struct inode *, struct file *),
   6.178 +diff --git a/fs/splice.c b/fs/splice.c
   6.179 +index 9ba380c..3419932 100644
   6.180 +--- a/fs/splice.c
   6.181 ++++ b/fs/splice.c
   6.182 +@@ -1127,6 +1127,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   6.183 + 
   6.184 + 	return splice_write(pipe, out, ppos, len, flags);
   6.185 + }
   6.186 ++EXPORT_SYMBOL(do_splice_from);
   6.187 + 
   6.188 + /*
   6.189 +  * Attempt to initiate a splice from a file to a pipe.
   6.190 +@@ -1153,6 +1154,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
   6.191 + 
   6.192 + 	return splice_read(in, ppos, pipe, len, flags);
   6.193 + }
   6.194 ++EXPORT_SYMBOL(do_splice_to);
   6.195 + 
   6.196 + /**
   6.197 +  * splice_direct_to_actor - splices data directly between two non-pipes
   6.198 +diff --git a/fs/xattr.c b/fs/xattr.c
   6.199 +index c69e6d4..3a7a8eb 100644
   6.200 +--- a/fs/xattr.c
   6.201 ++++ b/fs/xattr.c
   6.202 +@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
   6.203 + 	*xattr_value = value;
   6.204 + 	return error;
   6.205 + }
   6.206 ++EXPORT_SYMBOL(vfs_getxattr_alloc);
   6.207 + 
   6.208 + /* Compare an extended attribute value with the given value */
   6.209 + int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
   6.210 +diff --git a/security/commoncap.c b/security/commoncap.c
   6.211 +index b9d613e..ba3b618 100644
   6.212 +--- a/security/commoncap.c
   6.213 ++++ b/security/commoncap.c
   6.214 +@@ -988,9 +988,11 @@ int cap_mmap_addr(unsigned long addr)
   6.215 + 	}
   6.216 + 	return ret;
   6.217 + }
   6.218 ++EXPORT_SYMBOL(cap_mmap_addr);
   6.219 + 
   6.220 + int cap_mmap_file(struct file *file, unsigned long reqprot,
   6.221 + 		  unsigned long prot, unsigned long flags)
   6.222 + {
   6.223 + 	return 0;
   6.224 + }
   6.225 ++EXPORT_SYMBOL(cap_mmap_file);
   6.226 +diff --git a/security/device_cgroup.c b/security/device_cgroup.c
   6.227 +index d9d69e6..3f6f471 100644
   6.228 +--- a/security/device_cgroup.c
   6.229 ++++ b/security/device_cgroup.c
   6.230 +@@ -7,6 +7,7 @@
   6.231 + #include <linux/device_cgroup.h>
   6.232 + #include <linux/cgroup.h>
   6.233 + #include <linux/ctype.h>
   6.234 ++#include <linux/export.h>
   6.235 + #include <linux/list.h>
   6.236 + #include <linux/uaccess.h>
   6.237 + #include <linux/seq_file.h>
   6.238 +@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct inode *inode, int mask)
   6.239 + 	return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
   6.240 + 			access);
   6.241 + }
   6.242 ++EXPORT_SYMBOL(__devcgroup_inode_permission);
   6.243 + 
   6.244 + int devcgroup_inode_mknod(int mode, dev_t dev)
   6.245 + {
   6.246 +diff --git a/security/security.c b/security/security.c
   6.247 +index 31614e9..b223a66 100644
   6.248 +--- a/security/security.c
   6.249 ++++ b/security/security.c
   6.250 +@@ -407,6 +407,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
   6.251 + 		return 0;
   6.252 + 	return security_ops->path_rmdir(dir, dentry);
   6.253 + }
   6.254 ++EXPORT_SYMBOL(security_path_rmdir);
   6.255 + 
   6.256 + int security_path_unlink(struct path *dir, struct dentry *dentry)
   6.257 + {
   6.258 +@@ -423,6 +424,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
   6.259 + 		return 0;
   6.260 + 	return security_ops->path_symlink(dir, dentry, old_name);
   6.261 + }
   6.262 ++EXPORT_SYMBOL(security_path_symlink);
   6.263 + 
   6.264 + int security_path_link(struct dentry *old_dentry, struct path *new_dir,
   6.265 + 		       struct dentry *new_dentry)
   6.266 +@@ -431,6 +433,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
   6.267 + 		return 0;
   6.268 + 	return security_ops->path_link(old_dentry, new_dir, new_dentry);
   6.269 + }
   6.270 ++EXPORT_SYMBOL(security_path_link);
   6.271 + 
   6.272 + int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
   6.273 + 			 struct path *new_dir, struct dentry *new_dentry,
   6.274 +@@ -458,6 +461,7 @@ int security_path_truncate(struct path *path)
   6.275 + 		return 0;
   6.276 + 	return security_ops->path_truncate(path);
   6.277 + }
   6.278 ++EXPORT_SYMBOL(security_path_truncate);
   6.279 + 
   6.280 + int security_path_chmod(struct path *path, umode_t mode)
   6.281 + {
   6.282 +@@ -465,6 +469,7 @@ int security_path_chmod(struct path *path, umode_t mode)
   6.283 + 		return 0;
   6.284 + 	return security_ops->path_chmod(path, mode);
   6.285 + }
   6.286 ++EXPORT_SYMBOL(security_path_chmod);
   6.287 + 
   6.288 + int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
   6.289 + {
   6.290 +@@ -472,6 +477,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
   6.291 + 		return 0;
   6.292 + 	return security_ops->path_chown(path, uid, gid);
   6.293 + }
   6.294 ++EXPORT_SYMBOL(security_path_chown);
   6.295 + 
   6.296 + int security_path_chroot(struct path *path)
   6.297 + {
   6.298 +@@ -557,6 +563,7 @@ int security_inode_readlink(struct dentry *dentry)
   6.299 + 		return 0;
   6.300 + 	return security_ops->inode_readlink(dentry);
   6.301 + }
   6.302 ++EXPORT_SYMBOL(security_inode_readlink);
   6.303 + 
   6.304 + int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
   6.305 + {
   6.306 +@@ -571,6 +578,7 @@ int security_inode_permission(struct inode *inode, int mask)
   6.307 + 		return 0;
   6.308 + 	return security_ops->inode_permission(inode, mask);
   6.309 + }
   6.310 ++EXPORT_SYMBOL(security_inode_permission);
   6.311 + 
   6.312 + int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
   6.313 + {
   6.314 +@@ -693,6 +701,7 @@ int security_file_permission(struct file *file, int mask)
   6.315 + 
   6.316 + 	return fsnotify_perm(file, mask);
   6.317 + }
   6.318 ++EXPORT_SYMBOL(security_file_permission);
   6.319 + 
   6.320 + int security_file_alloc(struct file *file)
   6.321 + {
   6.322 +@@ -753,6 +762,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
   6.323 + 		return ret;
   6.324 + 	return ima_file_mmap(file, prot);
   6.325 + }
   6.326 ++EXPORT_SYMBOL(security_mmap_file);
   6.327 + 
   6.328 + int security_mmap_addr(unsigned long addr)
   6.329 + {
     7.1 --- a/linux/stuff/linux-slitaz.config	Fri Nov 12 11:11:24 2021 +0100
     7.2 +++ b/linux/stuff/linux-slitaz.config	Sun Nov 14 20:30:13 2021 +0000
     7.3 @@ -4941,7 +4941,9 @@
     7.4  CONFIG_RTL8192U=m
     7.5  # CONFIG_RTLLIB is not set
     7.6  CONFIG_R8712U=m
     7.7 -# CONFIG_R8188EU is not set
     7.8 +CONFIG_R8188EU=m
     7.9 +CONFIG_88EU_AP_MODE=y
    7.10 +CONFIG_88EU_P2P=y
    7.11  # CONFIG_R8192EE is not set
    7.12  # CONFIG_R8723AU is not set
    7.13  # CONFIG_R8821AE is not set
     8.1 --- a/linux/stuff/linux-slitaz.config64	Fri Nov 12 11:11:24 2021 +0100
     8.2 +++ b/linux/stuff/linux-slitaz.config64	Sun Nov 14 20:30:13 2021 +0000
     8.3 @@ -4265,7 +4265,7 @@
     8.4  # CONFIG_MMC_SDHCI_PXAV2 is not set
     8.5  CONFIG_MMC_WBSD=y
     8.6  CONFIG_MMC_TIFM_SD=y
     8.7 -CONFIG_MMC_SDRICOH_CS=y
     8.8 +CONFIG_MMC_SDRICOH_CS=m
     8.9  CONFIG_MMC_CB710=y
    8.10  CONFIG_MMC_VIA_SDMMC=y
    8.11  CONFIG_MMC_VUB300=y
    8.12 @@ -4289,6 +4289,8 @@
    8.13  CONFIG_MEMSTICK_TIFM_MS=m
    8.14  CONFIG_MEMSTICK_JMICRON_38X=m
    8.15  CONFIG_MEMSTICK_R592=m
    8.16 +# CONFIG_MEMSTICK_REALTEK_PCI is not set
    8.17 +# CONFIG_MEMSTICK_REALTEK_USB is not set
    8.18  CONFIG_NEW_LEDS=y
    8.19  CONFIG_LEDS_CLASS=y
    8.20  
    8.21 @@ -4466,7 +4468,9 @@
    8.22  CONFIG_RTL8192U=m
    8.23  # CONFIG_RTLLIB is not set
    8.24  CONFIG_R8712U=m
    8.25 -# CONFIG_R8188EU is not set
    8.26 +CONFIG_R8188EU=m
    8.27 +CONFIG_88EU_AP_MODE=y
    8.28 +CONFIG_88EU_P2P=y
    8.29  # CONFIG_R8192EE is not set
    8.30  # CONFIG_R8723AU is not set
    8.31  # CONFIG_R8821AE is not set
     9.1 --- a/linux64-wireless/receipt	Fri Nov 12 11:11:24 2021 +0100
     9.2 +++ b/linux64-wireless/receipt	Sun Nov 14 20:30:13 2021 +0000
     9.3 @@ -25,6 +25,7 @@
     9.4      
     9.5      $wanted_stuff/list_modules.sh drivers/net/wireless drivers/staging/wlan-ng \
     9.6      drivers/misc/echo drivers/leds net/wireless net/mac80211 \
     9.7 +    drivers/staging/rtl8188eu/r8188eu.ko.xz \
     9.8      drivers/staging/rtl8712/r8712u.ko.xz drivers/staging/rtl8192u/r8192u_usb.ko.xz \
     9.9  	drivers/staging/crystalhd/crystalhd.ko.xz | while read module; do
    9.10      	dir=$path/$(dirname $module)