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