wok-current diff linux/stuff/aufs5-base.patch @ rev 25728

Merge wok for both arch and few updates
author Stanislas Leduc <shann@slitaz.org>
date Thu Dec 05 08:39:45 2024 +0000 (9 months ago)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux/stuff/aufs5-base.patch	Thu Dec 05 08:39:45 2024 +0000
     1.3 @@ -0,0 +1,249 @@
     1.4 +SPDX-License-Identifier: GPL-2.0
     1.5 +aufs5.10.140 base patch
     1.6 +
     1.7 +diff --git a/MAINTAINERS b/MAINTAINERS
     1.8 +index 4d10e79030a9..e49ee2cacd66 100644
     1.9 +--- a/MAINTAINERS
    1.10 ++++ b/MAINTAINERS
    1.11 +@@ -3009,6 +3009,19 @@ F:	include/linux/audit.h
    1.12 + F:	include/uapi/linux/audit.h
    1.13 + F:	kernel/audit*
    1.14 + 
    1.15 ++AUFS (advanced multi layered unification filesystem) FILESYSTEM
    1.16 ++M:	"J. R. Okajima" <hooanon05g@gmail.com>
    1.17 ++L:	aufs-users@lists.sourceforge.net (members only)
    1.18 ++L:	linux-unionfs@vger.kernel.org
    1.19 ++S:	Supported
    1.20 ++W:	http://aufs.sourceforge.net
    1.21 ++T:	git://github.com/sfjro/aufs4-linux.git
    1.22 ++F:	Documentation/ABI/testing/debugfs-aufs
    1.23 ++F:	Documentation/ABI/testing/sysfs-aufs
    1.24 ++F:	Documentation/filesystems/aufs/
    1.25 ++F:	fs/aufs/
    1.26 ++F:	include/uapi/linux/aufs_type.h
    1.27 ++
    1.28 + AUXILIARY DISPLAY DRIVERS
    1.29 + M:	Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
    1.30 + S:	Maintained
    1.31 +diff --git a/drivers/block/loop.c b/drivers/block/loop.c
    1.32 +index b10410585a74..c14f1fca3b1a 100644
    1.33 +--- a/drivers/block/loop.c
    1.34 ++++ b/drivers/block/loop.c
    1.35 +@@ -752,6 +752,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
    1.36 + 	return error;
    1.37 + }
    1.38 + 
    1.39 ++/*
    1.40 ++ * for AUFS
    1.41 ++ * no get/put for file.
    1.42 ++ */
    1.43 ++struct file *loop_backing_file(struct super_block *sb)
    1.44 ++{
    1.45 ++	struct file *ret;
    1.46 ++	struct loop_device *l;
    1.47 ++
    1.48 ++	ret = NULL;
    1.49 ++	if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
    1.50 ++		l = sb->s_bdev->bd_disk->private_data;
    1.51 ++		ret = l->lo_backing_file;
    1.52 ++	}
    1.53 ++	return ret;
    1.54 ++}
    1.55 ++EXPORT_SYMBOL_GPL(loop_backing_file);
    1.56 ++
    1.57 + /* loop sysfs attributes */
    1.58 + 
    1.59 + static ssize_t loop_attr_show(struct device *dev, char *page,
    1.60 +diff --git a/fs/dcache.c b/fs/dcache.c
    1.61 +index ea0485861d93..ddca6240e0db 100644
    1.62 +--- a/fs/dcache.c
    1.63 ++++ b/fs/dcache.c
    1.64 +@@ -1285,7 +1285,7 @@ enum d_walk_ret {
    1.65 +  *
    1.66 +  * The @enter() callbacks are called with d_lock held.
    1.67 +  */
    1.68 +-static void d_walk(struct dentry *parent, void *data,
    1.69 ++void d_walk(struct dentry *parent, void *data,
    1.70 + 		   enum d_walk_ret (*enter)(void *, struct dentry *))
    1.71 + {
    1.72 + 	struct dentry *this_parent;
    1.73 +diff --git a/fs/fcntl.c b/fs/fcntl.c
    1.74 +index 71b43538fa44..7cd57fb4e864 100644
    1.75 +--- a/fs/fcntl.c
    1.76 ++++ b/fs/fcntl.c
    1.77 +@@ -32,7 +32,7 @@
    1.78 + 
    1.79 + #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
    1.80 + 
    1.81 +-static int setfl(int fd, struct file * filp, unsigned long arg)
    1.82 ++int setfl(int fd, struct file *filp, unsigned long arg)
    1.83 + {
    1.84 + 	struct inode * inode = file_inode(filp);
    1.85 + 	int error = 0;
    1.86 +@@ -63,6 +63,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
    1.87 + 
    1.88 + 	if (filp->f_op->check_flags)
    1.89 + 		error = filp->f_op->check_flags(arg);
    1.90 ++	if (!error && filp->f_op->setfl)
    1.91 ++		error = filp->f_op->setfl(filp, arg);
    1.92 + 	if (error)
    1.93 + 		return error;
    1.94 + 
    1.95 +diff --git a/fs/namespace.c b/fs/namespace.c
    1.96 +index 046b084136c5..a256f0f9c6c0 100644
    1.97 +--- a/fs/namespace.c
    1.98 ++++ b/fs/namespace.c
    1.99 +@@ -792,6 +792,12 @@ static inline int check_mnt(struct mount *mnt)
   1.100 + 	return mnt->mnt_ns == current->nsproxy->mnt_ns;
   1.101 + }
   1.102 + 
   1.103 ++/* for aufs, CONFIG_AUFS_BR_FUSE */
   1.104 ++int is_current_mnt_ns(struct vfsmount *mnt)
   1.105 ++{
   1.106 ++	return check_mnt(real_mount(mnt));
   1.107 ++}
   1.108 ++
   1.109 + /*
   1.110 +  * vfsmount lock must be held for write
   1.111 +  */
   1.112 +diff --git a/fs/splice.c b/fs/splice.c
   1.113 +index 6610e55c0e2a..5ac28e2b14a7 100644
   1.114 +--- a/fs/splice.c
   1.115 ++++ b/fs/splice.c
   1.116 +@@ -756,8 +756,8 @@ static int warn_unsupported(struct file *file, const char *op)
   1.117 + /*
   1.118 +  * Attempt to initiate a splice from pipe to file.
   1.119 +  */
   1.120 +-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   1.121 +-			   loff_t *ppos, size_t len, unsigned int flags)
   1.122 ++long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   1.123 ++		    loff_t *ppos, size_t len, unsigned int flags)
   1.124 + {
   1.125 + 	if (unlikely(!out->f_op->splice_write))
   1.126 + 		return warn_unsupported(out, "write");
   1.127 +@@ -767,9 +767,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   1.128 + /*
   1.129 +  * Attempt to initiate a splice from a file to a pipe.
   1.130 +  */
   1.131 +-static long do_splice_to(struct file *in, loff_t *ppos,
   1.132 +-			 struct pipe_inode_info *pipe, size_t len,
   1.133 +-			 unsigned int flags)
   1.134 ++long do_splice_to(struct file *in, loff_t *ppos,
   1.135 ++		  struct pipe_inode_info *pipe, size_t len,
   1.136 ++		  unsigned int flags)
   1.137 + {
   1.138 + 	int ret;
   1.139 + 
   1.140 +diff --git a/include/linux/fs.h b/include/linux/fs.h
   1.141 +index 42d246a94228..2cc1a02e444c 100644
   1.142 +--- a/include/linux/fs.h
   1.143 ++++ b/include/linux/fs.h
   1.144 +@@ -1332,6 +1332,7 @@ extern void fasync_free(struct fasync_struct *);
   1.145 + /* can be called from interrupts */
   1.146 + extern void kill_fasync(struct fasync_struct **, int, int);
   1.147 + 
   1.148 ++extern int setfl(int fd, struct file *filp, unsigned long arg);
   1.149 + extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
   1.150 + extern int f_setown(struct file *filp, unsigned long arg, int force);
   1.151 + extern void f_delown(struct file *filp);
   1.152 +@@ -1843,6 +1844,7 @@ struct file_operations {
   1.153 + 	ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
   1.154 + 	unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
   1.155 + 	int (*check_flags)(int);
   1.156 ++	int (*setfl)(struct file *, unsigned long);
   1.157 + 	int (*flock) (struct file *, int, struct file_lock *);
   1.158 + 	ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
   1.159 + 	ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
   1.160 +@@ -2330,6 +2332,7 @@ extern int current_umask(void);
   1.161 + extern void ihold(struct inode * inode);
   1.162 + extern void iput(struct inode *);
   1.163 + extern int generic_update_time(struct inode *, struct timespec64 *, int);
   1.164 ++extern int update_time(struct inode *, struct timespec64 *, int);
   1.165 + 
   1.166 + /* /sys/fs */
   1.167 + extern struct kobject *fs_kobj;
   1.168 +@@ -2566,6 +2569,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
   1.169 + }
   1.170 + 
   1.171 + void emergency_thaw_all(void);
   1.172 ++extern int __sync_filesystem(struct super_block *, int);
   1.173 + extern int sync_filesystem(struct super_block *);
   1.174 + extern const struct file_operations def_blk_fops;
   1.175 + extern const struct file_operations def_chr_fops;
   1.176 +diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
   1.177 +index 2c2586312b44..02dab569a2a0 100644
   1.178 +--- a/include/linux/lockdep.h
   1.179 ++++ b/include/linux/lockdep.h
   1.180 +@@ -252,6 +252,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
   1.181 + 	return lock->key == key;
   1.182 + }
   1.183 + 
   1.184 ++struct lock_class *lockdep_hlock_class(struct held_lock *hlock);
   1.185 ++
   1.186 + /*
   1.187 +  * Acquire a lock.
   1.188 +  *
   1.189 +@@ -388,6 +390,7 @@ static inline void lockdep_unregister_key(struct lock_class_key *key)
   1.190 + 
   1.191 + #define lockdep_depth(tsk)	(0)
   1.192 + 
   1.193 ++#define lockdep_is_held(lock)			(1)
   1.194 + #define lockdep_is_held_type(l, r)		(1)
   1.195 + 
   1.196 + #define lockdep_assert_held(l)			do { (void)(l); } while (0)
   1.197 +diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
   1.198 +index 8f882f5881e8..6b9808f09843 100644
   1.199 +--- a/include/linux/mnt_namespace.h
   1.200 ++++ b/include/linux/mnt_namespace.h
   1.201 +@@ -7,12 +7,15 @@ struct mnt_namespace;
   1.202 + struct fs_struct;
   1.203 + struct user_namespace;
   1.204 + struct ns_common;
   1.205 ++struct vfsmount;
   1.206 + 
   1.207 + extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
   1.208 + 		struct user_namespace *, struct fs_struct *);
   1.209 + extern void put_mnt_ns(struct mnt_namespace *ns);
   1.210 + extern struct ns_common *from_mnt_ns(struct mnt_namespace *);
   1.211 + 
   1.212 ++extern int is_current_mnt_ns(struct vfsmount *mnt);
   1.213 ++
   1.214 + extern const struct file_operations proc_mounts_operations;
   1.215 + extern const struct file_operations proc_mountinfo_operations;
   1.216 + extern const struct file_operations proc_mountstats_operations;
   1.217 +diff --git a/include/linux/splice.h b/include/linux/splice.h
   1.218 +index a55179fd60fc..8e21c53cf883 100644
   1.219 +--- a/include/linux/splice.h
   1.220 ++++ b/include/linux/splice.h
   1.221 +@@ -93,4 +93,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
   1.222 + 
   1.223 + extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
   1.224 + extern const struct pipe_buf_operations default_pipe_buf_ops;
   1.225 ++
   1.226 ++extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
   1.227 ++			   loff_t *ppos, size_t len, unsigned int flags);
   1.228 ++extern long do_splice_to(struct file *in, loff_t *ppos,
   1.229 ++			 struct pipe_inode_info *pipe, size_t len,
   1.230 ++			 unsigned int flags);
   1.231 + #endif
   1.232 +diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
   1.233 +index 6cbd2b444476..52483df4b7f9 100644
   1.234 +--- a/kernel/locking/lockdep.c
   1.235 ++++ b/kernel/locking/lockdep.c
   1.236 +@@ -186,7 +186,7 @@ unsigned long max_lock_class_idx;
   1.237 + struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
   1.238 + DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
   1.239 + 
   1.240 +-static inline struct lock_class *hlock_class(struct held_lock *hlock)
   1.241 ++inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
   1.242 + {
   1.243 + 	unsigned int class_idx = hlock->class_idx;
   1.244 + 
   1.245 +@@ -207,6 +207,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
   1.246 + 	 */
   1.247 + 	return lock_classes + class_idx;
   1.248 + }
   1.249 ++#define hlock_class(hlock) lockdep_hlock_class(hlock)
   1.250 + 
   1.251 + #ifdef CONFIG_LOCK_STAT
   1.252 + static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);