wok-current annotate 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
rev   line source
shann@25728 1 SPDX-License-Identifier: GPL-2.0
shann@25728 2 aufs5.10.140 base patch
shann@25728 3
shann@25728 4 diff --git a/MAINTAINERS b/MAINTAINERS
shann@25728 5 index 4d10e79030a9..e49ee2cacd66 100644
shann@25728 6 --- a/MAINTAINERS
shann@25728 7 +++ b/MAINTAINERS
shann@25728 8 @@ -3009,6 +3009,19 @@ F: include/linux/audit.h
shann@25728 9 F: include/uapi/linux/audit.h
shann@25728 10 F: kernel/audit*
shann@25728 11
shann@25728 12 +AUFS (advanced multi layered unification filesystem) FILESYSTEM
shann@25728 13 +M: "J. R. Okajima" <hooanon05g@gmail.com>
shann@25728 14 +L: aufs-users@lists.sourceforge.net (members only)
shann@25728 15 +L: linux-unionfs@vger.kernel.org
shann@25728 16 +S: Supported
shann@25728 17 +W: http://aufs.sourceforge.net
shann@25728 18 +T: git://github.com/sfjro/aufs4-linux.git
shann@25728 19 +F: Documentation/ABI/testing/debugfs-aufs
shann@25728 20 +F: Documentation/ABI/testing/sysfs-aufs
shann@25728 21 +F: Documentation/filesystems/aufs/
shann@25728 22 +F: fs/aufs/
shann@25728 23 +F: include/uapi/linux/aufs_type.h
shann@25728 24 +
shann@25728 25 AUXILIARY DISPLAY DRIVERS
shann@25728 26 M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
shann@25728 27 S: Maintained
shann@25728 28 diff --git a/drivers/block/loop.c b/drivers/block/loop.c
shann@25728 29 index b10410585a74..c14f1fca3b1a 100644
shann@25728 30 --- a/drivers/block/loop.c
shann@25728 31 +++ b/drivers/block/loop.c
shann@25728 32 @@ -752,6 +752,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
shann@25728 33 return error;
shann@25728 34 }
shann@25728 35
shann@25728 36 +/*
shann@25728 37 + * for AUFS
shann@25728 38 + * no get/put for file.
shann@25728 39 + */
shann@25728 40 +struct file *loop_backing_file(struct super_block *sb)
shann@25728 41 +{
shann@25728 42 + struct file *ret;
shann@25728 43 + struct loop_device *l;
shann@25728 44 +
shann@25728 45 + ret = NULL;
shann@25728 46 + if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
shann@25728 47 + l = sb->s_bdev->bd_disk->private_data;
shann@25728 48 + ret = l->lo_backing_file;
shann@25728 49 + }
shann@25728 50 + return ret;
shann@25728 51 +}
shann@25728 52 +EXPORT_SYMBOL_GPL(loop_backing_file);
shann@25728 53 +
shann@25728 54 /* loop sysfs attributes */
shann@25728 55
shann@25728 56 static ssize_t loop_attr_show(struct device *dev, char *page,
shann@25728 57 diff --git a/fs/dcache.c b/fs/dcache.c
shann@25728 58 index ea0485861d93..ddca6240e0db 100644
shann@25728 59 --- a/fs/dcache.c
shann@25728 60 +++ b/fs/dcache.c
shann@25728 61 @@ -1285,7 +1285,7 @@ enum d_walk_ret {
shann@25728 62 *
shann@25728 63 * The @enter() callbacks are called with d_lock held.
shann@25728 64 */
shann@25728 65 -static void d_walk(struct dentry *parent, void *data,
shann@25728 66 +void d_walk(struct dentry *parent, void *data,
shann@25728 67 enum d_walk_ret (*enter)(void *, struct dentry *))
shann@25728 68 {
shann@25728 69 struct dentry *this_parent;
shann@25728 70 diff --git a/fs/fcntl.c b/fs/fcntl.c
shann@25728 71 index 71b43538fa44..7cd57fb4e864 100644
shann@25728 72 --- a/fs/fcntl.c
shann@25728 73 +++ b/fs/fcntl.c
shann@25728 74 @@ -32,7 +32,7 @@
shann@25728 75
shann@25728 76 #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
shann@25728 77
shann@25728 78 -static int setfl(int fd, struct file * filp, unsigned long arg)
shann@25728 79 +int setfl(int fd, struct file *filp, unsigned long arg)
shann@25728 80 {
shann@25728 81 struct inode * inode = file_inode(filp);
shann@25728 82 int error = 0;
shann@25728 83 @@ -63,6 +63,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
shann@25728 84
shann@25728 85 if (filp->f_op->check_flags)
shann@25728 86 error = filp->f_op->check_flags(arg);
shann@25728 87 + if (!error && filp->f_op->setfl)
shann@25728 88 + error = filp->f_op->setfl(filp, arg);
shann@25728 89 if (error)
shann@25728 90 return error;
shann@25728 91
shann@25728 92 diff --git a/fs/namespace.c b/fs/namespace.c
shann@25728 93 index 046b084136c5..a256f0f9c6c0 100644
shann@25728 94 --- a/fs/namespace.c
shann@25728 95 +++ b/fs/namespace.c
shann@25728 96 @@ -792,6 +792,12 @@ static inline int check_mnt(struct mount *mnt)
shann@25728 97 return mnt->mnt_ns == current->nsproxy->mnt_ns;
shann@25728 98 }
shann@25728 99
shann@25728 100 +/* for aufs, CONFIG_AUFS_BR_FUSE */
shann@25728 101 +int is_current_mnt_ns(struct vfsmount *mnt)
shann@25728 102 +{
shann@25728 103 + return check_mnt(real_mount(mnt));
shann@25728 104 +}
shann@25728 105 +
shann@25728 106 /*
shann@25728 107 * vfsmount lock must be held for write
shann@25728 108 */
shann@25728 109 diff --git a/fs/splice.c b/fs/splice.c
shann@25728 110 index 6610e55c0e2a..5ac28e2b14a7 100644
shann@25728 111 --- a/fs/splice.c
shann@25728 112 +++ b/fs/splice.c
shann@25728 113 @@ -756,8 +756,8 @@ static int warn_unsupported(struct file *file, const char *op)
shann@25728 114 /*
shann@25728 115 * Attempt to initiate a splice from pipe to file.
shann@25728 116 */
shann@25728 117 -static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
shann@25728 118 - loff_t *ppos, size_t len, unsigned int flags)
shann@25728 119 +long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
shann@25728 120 + loff_t *ppos, size_t len, unsigned int flags)
shann@25728 121 {
shann@25728 122 if (unlikely(!out->f_op->splice_write))
shann@25728 123 return warn_unsupported(out, "write");
shann@25728 124 @@ -767,9 +767,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
shann@25728 125 /*
shann@25728 126 * Attempt to initiate a splice from a file to a pipe.
shann@25728 127 */
shann@25728 128 -static long do_splice_to(struct file *in, loff_t *ppos,
shann@25728 129 - struct pipe_inode_info *pipe, size_t len,
shann@25728 130 - unsigned int flags)
shann@25728 131 +long do_splice_to(struct file *in, loff_t *ppos,
shann@25728 132 + struct pipe_inode_info *pipe, size_t len,
shann@25728 133 + unsigned int flags)
shann@25728 134 {
shann@25728 135 int ret;
shann@25728 136
shann@25728 137 diff --git a/include/linux/fs.h b/include/linux/fs.h
shann@25728 138 index 42d246a94228..2cc1a02e444c 100644
shann@25728 139 --- a/include/linux/fs.h
shann@25728 140 +++ b/include/linux/fs.h
shann@25728 141 @@ -1332,6 +1332,7 @@ extern void fasync_free(struct fasync_struct *);
shann@25728 142 /* can be called from interrupts */
shann@25728 143 extern void kill_fasync(struct fasync_struct **, int, int);
shann@25728 144
shann@25728 145 +extern int setfl(int fd, struct file *filp, unsigned long arg);
shann@25728 146 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
shann@25728 147 extern int f_setown(struct file *filp, unsigned long arg, int force);
shann@25728 148 extern void f_delown(struct file *filp);
shann@25728 149 @@ -1843,6 +1844,7 @@ struct file_operations {
shann@25728 150 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
shann@25728 151 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
shann@25728 152 int (*check_flags)(int);
shann@25728 153 + int (*setfl)(struct file *, unsigned long);
shann@25728 154 int (*flock) (struct file *, int, struct file_lock *);
shann@25728 155 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
shann@25728 156 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
shann@25728 157 @@ -2330,6 +2332,7 @@ extern int current_umask(void);
shann@25728 158 extern void ihold(struct inode * inode);
shann@25728 159 extern void iput(struct inode *);
shann@25728 160 extern int generic_update_time(struct inode *, struct timespec64 *, int);
shann@25728 161 +extern int update_time(struct inode *, struct timespec64 *, int);
shann@25728 162
shann@25728 163 /* /sys/fs */
shann@25728 164 extern struct kobject *fs_kobj;
shann@25728 165 @@ -2566,6 +2569,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
shann@25728 166 }
shann@25728 167
shann@25728 168 void emergency_thaw_all(void);
shann@25728 169 +extern int __sync_filesystem(struct super_block *, int);
shann@25728 170 extern int sync_filesystem(struct super_block *);
shann@25728 171 extern const struct file_operations def_blk_fops;
shann@25728 172 extern const struct file_operations def_chr_fops;
shann@25728 173 diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
shann@25728 174 index 2c2586312b44..02dab569a2a0 100644
shann@25728 175 --- a/include/linux/lockdep.h
shann@25728 176 +++ b/include/linux/lockdep.h
shann@25728 177 @@ -252,6 +252,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
shann@25728 178 return lock->key == key;
shann@25728 179 }
shann@25728 180
shann@25728 181 +struct lock_class *lockdep_hlock_class(struct held_lock *hlock);
shann@25728 182 +
shann@25728 183 /*
shann@25728 184 * Acquire a lock.
shann@25728 185 *
shann@25728 186 @@ -388,6 +390,7 @@ static inline void lockdep_unregister_key(struct lock_class_key *key)
shann@25728 187
shann@25728 188 #define lockdep_depth(tsk) (0)
shann@25728 189
shann@25728 190 +#define lockdep_is_held(lock) (1)
shann@25728 191 #define lockdep_is_held_type(l, r) (1)
shann@25728 192
shann@25728 193 #define lockdep_assert_held(l) do { (void)(l); } while (0)
shann@25728 194 diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
shann@25728 195 index 8f882f5881e8..6b9808f09843 100644
shann@25728 196 --- a/include/linux/mnt_namespace.h
shann@25728 197 +++ b/include/linux/mnt_namespace.h
shann@25728 198 @@ -7,12 +7,15 @@ struct mnt_namespace;
shann@25728 199 struct fs_struct;
shann@25728 200 struct user_namespace;
shann@25728 201 struct ns_common;
shann@25728 202 +struct vfsmount;
shann@25728 203
shann@25728 204 extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
shann@25728 205 struct user_namespace *, struct fs_struct *);
shann@25728 206 extern void put_mnt_ns(struct mnt_namespace *ns);
shann@25728 207 extern struct ns_common *from_mnt_ns(struct mnt_namespace *);
shann@25728 208
shann@25728 209 +extern int is_current_mnt_ns(struct vfsmount *mnt);
shann@25728 210 +
shann@25728 211 extern const struct file_operations proc_mounts_operations;
shann@25728 212 extern const struct file_operations proc_mountinfo_operations;
shann@25728 213 extern const struct file_operations proc_mountstats_operations;
shann@25728 214 diff --git a/include/linux/splice.h b/include/linux/splice.h
shann@25728 215 index a55179fd60fc..8e21c53cf883 100644
shann@25728 216 --- a/include/linux/splice.h
shann@25728 217 +++ b/include/linux/splice.h
shann@25728 218 @@ -93,4 +93,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
shann@25728 219
shann@25728 220 extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
shann@25728 221 extern const struct pipe_buf_operations default_pipe_buf_ops;
shann@25728 222 +
shann@25728 223 +extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
shann@25728 224 + loff_t *ppos, size_t len, unsigned int flags);
shann@25728 225 +extern long do_splice_to(struct file *in, loff_t *ppos,
shann@25728 226 + struct pipe_inode_info *pipe, size_t len,
shann@25728 227 + unsigned int flags);
shann@25728 228 #endif
shann@25728 229 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
shann@25728 230 index 6cbd2b444476..52483df4b7f9 100644
shann@25728 231 --- a/kernel/locking/lockdep.c
shann@25728 232 +++ b/kernel/locking/lockdep.c
shann@25728 233 @@ -186,7 +186,7 @@ unsigned long max_lock_class_idx;
shann@25728 234 struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
shann@25728 235 DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
shann@25728 236
shann@25728 237 -static inline struct lock_class *hlock_class(struct held_lock *hlock)
shann@25728 238 +inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
shann@25728 239 {
shann@25728 240 unsigned int class_idx = hlock->class_idx;
shann@25728 241
shann@25728 242 @@ -207,6 +207,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
shann@25728 243 */
shann@25728 244 return lock_classes + class_idx;
shann@25728 245 }
shann@25728 246 +#define hlock_class(hlock) lockdep_hlock_class(hlock)
shann@25728 247
shann@25728 248 #ifdef CONFIG_LOCK_STAT
shann@25728 249 static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);