Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Aufs5 Standalone
Commits
44f84f55
Commit
44f84f55
authored
Dec 27, 2020
by
J. R. Okajima
Browse files
5.x-rcN 20210104
Signed-off-by:
J. R. Okajima
<
hooanon05g@gmail.com
>
parent
aa452891
Changes
9
Hide whitespace changes
Inline
Side-by-side
aufs5-base.patch
View file @
44f84f55
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN base patch
aufs5.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
diff --git a/MAINTAINERS b/MAINTAINERS
index
50659d76976b7..80f67140e4f70
100644
index
281de213ef478..ffc3c1c539ea2
100644
--- a/MAINTAINERS
--- a/MAINTAINERS
+++ b/MAINTAINERS
+++ b/MAINTAINERS
@@ -
2946,6 +2946
,19 @@
F: include/linux/audit.h
@@ -
3009,6 +3009
,19 @@
F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
F: kernel/audit*
...
@@ -13,12 +13,12 @@ index 50659d76976b7..80f67140e4f70 100644
...
@@ -13,12 +13,12 @@ index 50659d76976b7..80f67140e4f70 100644
+M: "J. R. Okajima" <hooanon05g@gmail.com>
+M: "J. R. Okajima" <hooanon05g@gmail.com>
+L: aufs-users@lists.sourceforge.net (members only)
+L: aufs-users@lists.sourceforge.net (members only)
+L: linux-unionfs@vger.kernel.org
+L: linux-unionfs@vger.kernel.org
+S: Supported
+W: http://aufs.sourceforge.net
+W: http://aufs.sourceforge.net
+T: git://github.com/sfjro/aufs4-linux.git
+T: git://github.com/sfjro/aufs4-linux.git
+S: Supported
+F: Documentation/filesystems/aufs/
+F: Documentation/ABI/testing/debugfs-aufs
+F: Documentation/ABI/testing/debugfs-aufs
+F: Documentation/ABI/testing/sysfs-aufs
+F: Documentation/ABI/testing/sysfs-aufs
+F: Documentation/filesystems/aufs/
+F: fs/aufs/
+F: fs/aufs/
+F: include/uapi/linux/aufs_type.h
+F: include/uapi/linux/aufs_type.h
+
+
...
@@ -26,10 +26,10 @@ index 50659d76976b7..80f67140e4f70 100644
...
@@ -26,10 +26,10 @@ index 50659d76976b7..80f67140e4f70 100644
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
S: Maintained
S: Maintained
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index
da693e6a834e5..0479902a0cd50
100644
index
a58084c2ed7ce..7be7ca3f54547
100644
--- a/drivers/block/loop.c
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -75
3
,6 +75
3
,24 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -7
6
5,6 +7
6
5,24 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
return error;
return error;
}
}
...
@@ -55,10 +55,10 @@ index da693e6a834e5..0479902a0cd50 100644
...
@@ -55,10 +55,10 @@ index da693e6a834e5..0479902a0cd50 100644
static ssize_t loop_attr_show(struct device *dev, char *page,
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
diff --git a/fs/dcache.c b/fs/dcache.c
index
b280e07e162b1..046000653e4d8
100644
index
ea0485861d937..ddca6240e0db4
100644
--- a/fs/dcache.c
--- a/fs/dcache.c
+++ b/fs/dcache.c
+++ b/fs/dcache.c
@@ -12
66
,7 +12
66
,7 @@
enum d_walk_ret {
@@ -12
85
,7 +12
85
,7 @@
enum d_walk_ret {
*
*
* The @enter() callbacks are called with d_lock held.
* The @enter() callbacks are called with d_lock held.
*/
*/
...
@@ -68,7 +68,7 @@ index b280e07e162b1..046000653e4d8 100644
...
@@ -68,7 +68,7 @@ index b280e07e162b1..046000653e4d8 100644
{
{
struct dentry *this_parent;
struct dentry *this_parent;
diff --git a/fs/fcntl.c b/fs/fcntl.c
diff --git a/fs/fcntl.c b/fs/fcntl.c
index
2e4c0fa2074b0..0b28a37f7e505
100644
index
19ac5baad50fd..073ca6af500f3
100644
--- a/fs/fcntl.c
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -32,7 +32,7 @@
@@ -32,7 +32,7 @@
...
@@ -90,10 +90,10 @@ index 2e4c0fa2074b0..0b28a37f7e505 100644
...
@@ -90,10 +90,10 @@ index 2e4c0fa2074b0..0b28a37f7e505 100644
return error;
return error;
diff --git a/fs/inode.c b/fs/inode.c
diff --git a/fs/inode.c b/fs/inode.c
index 9
3d9252a00ab4..7700c5e4783b9
100644
index 9
d78c37b00b81..e7f0c614a58f3
100644
--- a/fs/inode.c
--- a/fs/inode.c
+++ b/fs/inode.c
+++ b/fs/inode.c
@@ -1
688
,7 +1
688
,7 @@
EXPORT_SYMBOL(generic_update_time);
@@ -1
770
,7 +1
770
,7 @@
EXPORT_SYMBOL(generic_update_time);
* This does the actual work of updating an inodes time or version. Must have
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
* had called mnt_want_write() before calling this.
*/
*/
...
@@ -103,10 +103,10 @@ index 93d9252a00ab4..7700c5e4783b9 100644
...
@@ -103,10 +103,10 @@ index 93d9252a00ab4..7700c5e4783b9 100644
if (inode->i_op->update_time)
if (inode->i_op->update_time)
return inode->i_op->update_time(inode, time, flags);
return inode->i_op->update_time(inode, time, flags);
diff --git a/fs/namespace.c b/fs/namespace.c
diff --git a/fs/namespace.c b/fs/namespace.c
index
a28e4db075ede..12e725e34c6c
a 100644
index
cebaa3e817940..451dee24a546
a 100644
--- a/fs/namespace.c
--- a/fs/namespace.c
+++ b/fs/namespace.c
+++ b/fs/namespace.c
@@ -7
76
,6 +7
76
,12 @@
static inline int check_mnt(struct mount *mnt)
@@ -7
92
,6 +7
92
,12 @@
static inline int check_mnt(struct mount *mnt)
return mnt->mnt_ns == current->nsproxy->mnt_ns;
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}
}
...
@@ -119,44 +119,11 @@ index a28e4db075ede..12e725e34c6ca 100644
...
@@ -119,44 +119,11 @@ index a28e4db075ede..12e725e34c6ca 100644
/*
/*
* vfsmount lock must be held for write
* vfsmount lock must be held for write
*/
*/
diff --git a/fs/read_write.c b/fs/read_write.c
index bbfa9b12b15eb..5d684d7d29207 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -499,6 +499,28 @@
static ssize_t __vfs_write(struct file *file, const char __user *p,
return -EINVAL;
}
+vfs_readf_t vfs_readf(struct file *file)
+{
+ const struct file_operations *fop = file->f_op;
+
+ if (fop->read)
+ return fop->read;
+ if (fop->read_iter)
+ return new_sync_read;
+ return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */
+}
+
+vfs_writef_t vfs_writef(struct file *file)
+{
+ const struct file_operations *fop = file->f_op;
+
+ if (fop->write)
+ return fop->write;
+ if (fop->write_iter)
+ return new_sync_write;
+ return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */
+}
+
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
diff --git a/fs/splice.c b/fs/splice.c
index
4e53efbd621db..9f230ee854e20
100644
index
866d5c2367b23..55b5356262085
100644
--- a/fs/splice.c
--- a/fs/splice.c
+++ b/fs/splice.c
+++ b/fs/splice.c
@@ -
849
,8 +
849
,8 @@
EXPORT_SYMBOL(generic_splice_sendpage);
@@ -
756
,8 +
756
,8 @@
static int warn_unsupported(struct file *file, const char *op)
/*
/*
* Attempt to initiate a splice from pipe to file.
* Attempt to initiate a splice from pipe to file.
*/
*/
...
@@ -165,9 +132,9 @@ index 4e53efbd621db..9f230ee854e20 100644
...
@@ -165,9 +132,9 @@ index 4e53efbd621db..9f230ee854e20 100644
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags)
+ loff_t *ppos, size_t len, unsigned int flags)
{
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
if (unlikely(!out->f_op->splice_write))
loff_t *, size_t, unsigned int
);
return warn_unsupported(out, "write"
);
@@ -
866
,9 +
866
,9 @@
static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -
767
,9 +
767
,9 @@
static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
/*
* Attempt to initiate a splice from a file to a pipe.
* Attempt to initiate a splice from a file to a pipe.
*/
*/
...
@@ -178,10 +145,10 @@ index 4e53efbd621db..9f230ee854e20 100644
...
@@ -178,10 +145,10 @@ index 4e53efbd621db..9f230ee854e20 100644
+ struct pipe_inode_info *pipe, size_t len,
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags)
+ unsigned int flags)
{
{
ssize_t (*splice_read)(struct file *, loff_t *,
int ret;
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/fs/sync.c b/fs/sync.c
diff --git a/fs/sync.c b/fs/sync.c
index
4d1ff010bc5af..457f4e4a5cc1
f 100644
index
1373a610dc784..b7b5a0a0df6f
f 100644
--- a/fs/sync.c
--- a/fs/sync.c
+++ b/fs/sync.c
+++ b/fs/sync.c
@@ -28,7 +28,7 @@
@@ -28,7 +28,7 @@
...
@@ -194,10 +161,10 @@ index 4d1ff010bc5af..457f4e4a5cc1f 100644
...
@@ -194,10 +161,10 @@ index 4d1ff010bc5af..457f4e4a5cc1f 100644
if (wait)
if (wait)
sync_inodes_sb(sb);
sync_inodes_sb(sb);
diff --git a/include/linux/fs.h b/include/linux/fs.h
diff --git a/include/linux/fs.h b/include/linux/fs.h
index
45cc10cdf6ddd..916efd7e612b3
100644
index
8667d0cdc71e7..837dd6e727e45
100644
--- a/include/linux/fs.h
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -13
55
,6 +13
55
,7 @@
extern void fasync_free(struct fasync_struct *);
@@ -13
32
,6 +13
32
,7 @@
extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
extern void kill_fasync(struct fasync_struct **, int, int);
...
@@ -205,7 +172,7 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
...
@@ -205,7 +172,7 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
extern void f_delown(struct file *filp);
@@ -184
7
,6 +184
8
,7 @@
struct file_operations {
@@ -184
3
,6 +184
4
,7 @@
struct file_operations {
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
int (*check_flags)(int);
int (*check_flags)(int);
...
@@ -213,20 +180,7 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
...
@@ -213,20 +180,7 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
int (*flock) (struct file *, int, struct file_lock *);
int (*flock) (struct file *, int, struct file_lock *);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
@@ -1917,6 +1919,12 @@
ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
@@ -2328,6 +2330,7 @@
extern int current_umask(void);
struct iovec *fast_pointer,
struct iovec **ret_pointer);
+typedef ssize_t (*vfs_readf_t)(struct file *, char __user *, size_t, loff_t *);
+typedef ssize_t (*vfs_writef_t)(struct file *, const char __user *, size_t,
+ loff_t *);
+vfs_readf_t vfs_readf(struct file *file);
+vfs_writef_t vfs_writef(struct file *file);
+
extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *);
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
@@ -2349,6 +2357,7 @@
extern int current_umask(void);
extern void ihold(struct inode * inode);
extern void ihold(struct inode * inode);
extern void iput(struct inode *);
extern void iput(struct inode *);
extern int generic_update_time(struct inode *, struct timespec64 *, int);
extern int generic_update_time(struct inode *, struct timespec64 *, int);
...
@@ -234,19 +188,19 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
...
@@ -234,19 +188,19 @@ index 45cc10cdf6ddd..916efd7e612b3 100644
/* /sys/fs */
/* /sys/fs */
extern struct kobject *fs_kobj;
extern struct kobject *fs_kobj;
@@ -2633,6 +2642,7 @@
static inline bool sb_is_blkdev_sb(struct super_block *sb)
@@ -2564,6 +2567,7 @@
static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false;
}
}
#endif
void emergency_thaw_all(void);
+extern int __sync_filesystem(struct super_block *, int);
+extern int __sync_filesystem(struct super_block *, int);
extern int sync_filesystem(struct super_block *);
extern int sync_filesystem(struct super_block *);
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_chr_fops;
extern const struct file_operations def_chr_fops;
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index
206774ac69460..e5eda5226fbc7
100644
index
f5594879175a6..93bb861981675
100644
--- a/include/linux/lockdep.h
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -
376
,6 +
376
,8 @@
static inline int lockdep_match_key(struct lockdep_map *lock,
@@ -
241
,6 +
241
,8 @@
static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
return lock->key == key;
}
}
...
@@ -255,7 +209,7 @@ index 206774ac69460..e5eda5226fbc7 100644
...
@@ -255,7 +209,7 @@ index 206774ac69460..e5eda5226fbc7 100644
/*
/*
* Acquire a lock.
* Acquire a lock.
*
*
@@ -
521
,6 +
523
,7 @@
st
ruct lockdep_map { };
@@ -
375
,6 +
377
,7 @@
st
atic inline void lockdep_unregister_key(struct lock_class_key *key)
#define lockdep_depth(tsk) (0)
#define lockdep_depth(tsk) (0)
...
@@ -264,18 +218,19 @@ index 206774ac69460..e5eda5226fbc7 100644
...
@@ -264,18 +218,19 @@ index 206774ac69460..e5eda5226fbc7 100644
#define lockdep_assert_held(l) do { (void)(l); } while (0)
#define lockdep_assert_held(l) do { (void)(l); } while (0)
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index
35942084cd40d..24f5fd1a789de
100644
index
8f882f5881e87..6b9808f098435
100644
--- a/include/linux/mnt_namespace.h
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -6,11 +6,14 @@
@@ -7,12 +7,15 @@
struct mnt_namespace;
struct mnt_namespace;
struct fs_struct;
struct fs_struct;
struct user_namespace;
struct user_namespace;
struct ns_common;
+struct vfsmount;
+struct vfsmount;
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct user_namespace *, struct fs_struct *);
struct user_namespace *, struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns);
extern void put_mnt_ns(struct mnt_namespace *ns);
extern struct ns_common *from_mnt_ns(struct mnt_namespace *);
+extern int is_current_mnt_ns(struct vfsmount *mnt);
+extern int is_current_mnt_ns(struct vfsmount *mnt);
+
+
...
@@ -283,10 +238,10 @@ index 35942084cd40d..24f5fd1a789de 100644
...
@@ -283,10 +238,10 @@ index 35942084cd40d..24f5fd1a789de 100644
extern const struct file_operations proc_mountinfo_operations;
extern const struct file_operations proc_mountinfo_operations;
extern const struct file_operations proc_mountstats_operations;
extern const struct file_operations proc_mountstats_operations;
diff --git a/include/linux/splice.h b/include/linux/splice.h
diff --git a/include/linux/splice.h b/include/linux/splice.h
index
ebbbfea48aa0b..d68d5742502
83 100644
index
a55179fd60fc3..8e21c53cf8
83
1
100644
--- a/include/linux/splice.h
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -9
0
,4 +9
0
,10 @@
extern void splice_shrink_spd(struct splice_pipe_desc *);
@@ -9
3
,4 +9
3
,10 @@
extern void splice_shrink_spd(struct splice_pipe_desc *);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
extern const struct pipe_buf_operations default_pipe_buf_ops;
extern const struct pipe_buf_operations default_pipe_buf_ops;
...
@@ -298,10 +253,10 @@ index ebbbfea48aa0b..d68d574250283 100644
...
@@ -298,10 +253,10 @@ index ebbbfea48aa0b..d68d574250283 100644
+ unsigned int flags);
+ unsigned int flags);
#endif
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index
a
c1
0db66cc63f..837a3358e77ca
100644
index c1
418b47f625a..7f006a47790cf
100644
--- a/kernel/locking/lockdep.c
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -1
69
,7 +1
69
,7 @@
static
@@ -1
88
,7 +1
88
,7 @@
static
struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
static DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
static DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
...
@@ -310,7 +265,7 @@ index ac10db66cc63f..837a3358e77ca 100644
...
@@ -310,7 +265,7 @@ index ac10db66cc63f..837a3358e77ca 100644
{
{
unsigned int class_idx = hlock->class_idx;
unsigned int class_idx = hlock->class_idx;
@@ -
190
,6 +
190
,7 @@
static inline struct lock_class *hlock_class(struct held_lock *hlock)
@@ -
209
,6 +
209
,7 @@
static inline struct lock_class *hlock_class(struct held_lock *hlock)
*/
*/
return lock_classes + class_idx;
return lock_classes + class_idx;
}
}
...
...
aufs5-kbuild.patch
View file @
44f84f55
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN kbuild patch
aufs5.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
diff --git a/fs/Kconfig b/fs/Kconfig
index
f08fbbfafd9a0..1c597cddc351c
100644
index
aa4c122823018..b29bad13b2491
100644
--- a/fs/Kconfig
--- a/fs/Kconfig
+++ b/fs/Kconfig
+++ b/fs/Kconfig
@@ -2
67
,6 +2
67
,7 @@
source "fs/sysv/Kconfig"
@@ -2
88
,6 +2
88
,7 @@
source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/ufs/Kconfig"
source "fs/erofs/Kconfig"
source "fs/erofs/Kconfig"
source "fs/vboxsf/Kconfig"
source "fs/vboxsf/Kconfig"
...
@@ -14,7 +14,7 @@ index f08fbbfafd9a0..1c597cddc351c 100644
...
@@ -14,7 +14,7 @@ index f08fbbfafd9a0..1c597cddc351c 100644
endif # MISC_FILESYSTEMS
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
diff --git a/fs/Makefile b/fs/Makefile
index
2ce5112b02c86..d9b4a51985538
100644
index
999d1a23f036c..0cd76857ca764
100644
--- a/fs/Makefile
--- a/fs/Makefile
+++ b/fs/Makefile
+++ b/fs/Makefile
@@ -136,3 +136,4 @@
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
@@ -136,3 +136,4 @@
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
...
...
aufs5-loopback.patch
View file @
44f84f55
...
@@ -2,11 +2,11 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,11 +2,11 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN loopback patch
aufs5.x-rcN loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index
0479902a0cd50..758c8ee4d4e6b
100644
index
7be7ca3f54547..a163aeade6148
100644
--- a/drivers/block/loop.c
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -6
38
,6 +6
38
,15 @@
static inline void loop_update_dio(struct loop_device *lo)
@@ -6
50
,6 +6
50
,15 @@
static inline void loop_update_dio(struct loop_device *lo)
lo->use_dio);
lo->use_dio);
}
}
+static struct file *loop_real_file(struct file *file)
+static struct file *loop_real_file(struct file *file)
...
@@ -21,7 +21,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -21,7 +21,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
static void loop_reread_partitions(struct loop_device *lo,
static void loop_reread_partitions(struct loop_device *lo,
struct block_device *bdev)
struct block_device *bdev)
{
{
@@ -
693
,6 +7
02
,7 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -
705
,6 +7
14
,7 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
unsigned int arg)
{
{
struct file *file = NULL, *old_file;
struct file *file = NULL, *old_file;
...
@@ -29,7 +29,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -29,7 +29,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
int error;
int error;
bool partscan;
bool partscan;
@@ -7
1
2,12 +7
22
,19 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -72
4
,12 +7
34
,19 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
file = fget(arg);
if (!file)
if (!file)
goto out_err;
goto out_err;
...
@@ -49,7 +49,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -49,7 +49,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
error = -EINVAL;
error = -EINVAL;
@@ -7
29
,6 +7
46
,7 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -7
41
,6 +7
58
,7 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
blk_mq_freeze_queue(lo->lo_queue);
blk_mq_freeze_queue(lo->lo_queue);
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
lo->lo_backing_file = file;
...
@@ -57,7 +57,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -57,7 +57,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
mapping_set_gfp_mask(file->f_mapping,
mapping_set_gfp_mask(file->f_mapping,
lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
@@ -74
2
,6 +7
60
,8 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -7
5
4,6 +7
72
,8 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
* dependency.
* dependency.
*/
*/
fput(old_file);
fput(old_file);
...
@@ -66,7 +66,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -66,7 +66,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
if (partscan)
if (partscan)
loop_reread_partitions(lo, bdev);
loop_reread_partitions(lo, bdev);
return 0;
return 0;
@@ -7
50
,6 +7
70
,8 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
@@ -7
62
,6 +7
82
,8 @@
static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
mutex_unlock(&loop_ctl_mutex);
mutex_unlock(&loop_ctl_mutex);
if (file)
if (file)
fput(file);
fput(file);
...
@@ -75,17 +75,17 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -75,17 +75,17 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
return error;
return error;
}
}
@@ -
973,7 +995
,7 @@
static
void
loop_
update_rotational
(struct loop_device *lo
)
@@ -
1090,7 +1112
,7 @@
static
int
loop_
configure
(struct loop_device *lo
, fmode_t mode,
static int loop_set_fd(
struct lo
op
_device *
lo, fmode_t mode
,
struct
b
lo
ck
_device *
bdev
,
struct
b
lo
ck_device *bdev, unsigned int ar
g)
const
struct lo
op_config *confi
g)
{
{
- struct file *file;
- struct file *file;
+ struct file *file, *f, *virt_file = NULL;
+ struct file *file, *f, *virt_file = NULL;
struct inode *inode;
struct inode *inode;
struct address_space *mapping;
struct address_space *mapping;
struct block_device *claimed_bdev = NULL;
struct block_device *claimed_bdev = NULL;
@@ -
989
,6 +1
011
,12 @@
static int loop_
set_fd
(struct loop_device *lo, fmode_t mode,
@@ -
1106
,6 +1
128
,12 @@
static int loop_
configure
(struct loop_device *lo, fmode_t mode,
file = fget(
arg
);
file = fget(
config->fd
);
if (!file)
if (!file)
goto out;
goto out;
+ f = loop_real_file(file);
+ f = loop_real_file(file);
...
@@ -97,16 +97,16 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -97,16 +97,16 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
/*
/*
* If we don't hold exclusive handle for the device, upgrade to it
* If we don't hold exclusive handle for the device, upgrade to it
@@ -1037,6 +1065,7 @@
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
@@ -1161,6 +1189,7 @@
static int loop_configure(struct loop_device *lo, fmode_t mode,
lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO;
lo->lo_device = bdev;
lo->lo_device = bdev;
lo->lo_flags = lo_flags;
lo->lo_backing_file = file;
lo->lo_backing_file = file;
+ lo->lo_backing_virt_file = virt_file;
+ lo->lo_backing_virt_file = virt_file;
lo->
transfer = NULL
;
lo->
old_gfp_mask = mapping_gfp_mask(mapping)
;
lo->ioctl = NULL
;
mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS))
;
lo->lo_sizelimit = 0;
@@ -1
090
,6 +1
119
,8 @@
static int loop_
set_fd
(struct loop_device *lo, fmode_t mode,
@@ -1
214
,6 +1
243
,8 @@
static int loop_
configure
(struct loop_device *lo, fmode_t mode,
bd_abort_claiming(bdev, claimed_bdev, loop_
set_fd
);
bd_abort_claiming(bdev, claimed_bdev, loop_
configure
);
out_putf:
out_putf:
fput(file);
fput(file);
+ if (virt_file)
+ if (virt_file)
...
@@ -114,7 +114,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -114,7 +114,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
out:
out:
/* This is safe: open() is still holding a reference. */
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
module_put(THIS_MODULE);
@@ -1
136
,6 +1
167
,7 @@
loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer
,
@@ -1
223
,6 +1
254
,7 @@
static int loop_configure(struct loop_device *lo, fmode_t mode
,
static int __loop_clr_fd(struct loop_device *lo, bool release)
static int __loop_clr_fd(struct loop_device *lo, bool release)
{
{
struct file *filp = NULL;
struct file *filp = NULL;
...
@@ -122,7 +122,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -122,7 +122,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
gfp_t gfp = lo->old_gfp_mask;
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
struct block_device *bdev = lo->lo_device;
int err = 0;
int err = 0;
@@ -1
159
,6 +1
191
,7 @@
static int __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1
246
,6 +1
278
,7 @@
static int __loop_clr_fd(struct loop_device *lo, bool release)
spin_lock_irq(&lo->lo_lock);
spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
lo->lo_backing_file = NULL;
...
@@ -130,7 +130,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
...
@@ -130,7 +130,7 @@ index 0479902a0cd50..758c8ee4d4e6b 100644
spin_unlock_irq(&lo->lo_lock);
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
loop_release_xfer(lo);
@@ -1
242
,6 +1
275
,8 @@
static int __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1
329
,6 +1
362
,8 @@
static int __loop_clr_fd(struct loop_device *lo, bool release)
*/
*/
if (filp)
if (filp)
fput(filp);
fput(filp);
...
@@ -153,10 +153,10 @@ index af75a5ee40944..1d847cb194ff6 100644
...
@@ -153,10 +153,10 @@ index af75a5ee40944..1d847cb194ff6 100644
void *key_data;
void *key_data;
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index
6fb4a4ed8cc7f..ba9a959f2db27
100644
index
5ef279a59bb14..6447c37f98756
100644
--- a/fs/aufs/f_op.c
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -3
59
,7 +3
59
,7 @@
static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
@@ -3
04
,7 +3
04
,7 @@
static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
if (IS_ERR(h_file))
if (IS_ERR(h_file))
goto out;
goto out;
...
@@ -228,10 +228,10 @@ index 589dd01220201..801e0a7faec59 100644
...
@@ -228,10 +228,10 @@ index 589dd01220201..801e0a7faec59 100644
/* ---------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
diff --git a/include/linux/fs.h b/include/linux/fs.h
index
916efd7e612b3..68f536f42b2a0
100644
index
837dd6e727e45..0a05534f8582f
100644
--- a/include/linux/fs.h
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -19
85
,6 +19
85
,10 @@
struct super_operations {
@@ -19
67
,6 +19
67
,10 @@
struct super_operations {
struct shrink_control *);
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
struct shrink_control *);
...
...
aufs5-mmap.patch
View file @
44f84f55
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN mmap patch
aufs5.x-rcN mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
diff --git a/fs/proc/base.c b/fs/proc/base.c
index
eb2255e95f62b..92f6062423c0c
100644
index
b362523a9829a..669448bb8a738
100644
--- a/fs/proc/base.c
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -21
62
,7 +21
62
,7 @@
static int map_files_get_link(struct dentry *dentry, struct path *path)
@@ -21
84
,7 +21
84
,7 @@
static int map_files_get_link(struct dentry *dentry, struct path *path)
rc = -ENOENT;
rc = -ENOENT;
vma = find_exact_vma(mm, vm_start, vm_end);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
if (vma && vma->vm_file) {
...
@@ -15,10 +15,10 @@ index eb2255e95f62b..92f6062423c0c 100644
...
@@ -15,10 +15,10 @@ index eb2255e95f62b..92f6062423c0c 100644
rc = 0;
rc = 0;
}
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index 1
4c2badb8fd93..65afe5287e43e
100644
index 1
3452b32e2bd5..38acccfef9d49
100644
--- a/fs/proc/nommu.c
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -4
1
,7 +4
1
,10 @@
static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -4
0
,7 +4
0
,10 @@
static int nommu_region_show(struct seq_file *m, struct vm_region *region)
file = region->vm_file;
file = region->vm_file;
if (file) {
if (file) {
...
@@ -31,7 +31,7 @@ index 14c2badb8fd93..65afe5287e43e 100644
...
@@ -31,7 +31,7 @@ index 14c2badb8fd93..65afe5287e43e 100644
ino = inode->i_ino;
ino = inode->i_ino;
}
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index
8d382d4ec0672..93a768f754c91
100644
index
ee5a235b30562..80a46dcede7be
100644
--- a/fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c
+++ b/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)
@@ -280,7 +280,10 @@
show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
...
@@ -46,7 +46,7 @@ index 8d382d4ec0672..93a768f754c91 100644
...
@@ -46,7 +46,7 @@ index 8d382d4ec0672..93a768f754c91 100644
dev = inode->i_sb->s_dev;
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1
787
,7 +1
790
,7 @@
static int show_numa_map(struct seq_file *m, void *v)
@@ -1
855
,7 +1
858
,7 @@
static int show_numa_map(struct seq_file *m, void *v)
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct vm_area_struct *vma = v;
struct vm_area_struct *vma = v;
struct numa_maps *md = &numa_priv->md;
struct numa_maps *md = &numa_priv->md;
...
@@ -56,7 +56,7 @@ index 8d382d4ec0672..93a768f754c91 100644
...
@@ -56,7 +56,7 @@ index 8d382d4ec0672..93a768f754c91 100644
struct mempolicy *pol;
struct mempolicy *pol;
char buffer[64];
char buffer[64];
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index
7907e6419e572..d17209cf52bc3
100644
index
a6d21fc0033c6..02c2de31196e0
100644
--- a/fs/proc/task_nommu.c
--- a/fs/proc/task_nommu.c
+++ b/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)
@@ -155,7 +155,10 @@
static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
...
@@ -72,10 +72,10 @@ index 7907e6419e572..d17209cf52bc3 100644
...
@@ -72,10 +72,10 @@ index 7907e6419e572..d17209cf52bc3 100644
ino = inode->i_ino;
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
diff --git a/include/linux/mm.h b/include/linux/mm.h
index
f3fe7371855ce..a5b9751a5b331
100644
index
db6ae4d3fb4ed..1a632192d9d9f
100644
--- a/include/linux/mm.h
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1
688
,6 +1
688
,28 @@
static inline void unmap_shared_mapping_range(struct address_space *mapping,
@@ -1
712
,6 +1
712
,28 @@
static inline void unmap_shared_mapping_range(struct address_space *mapping,
unmap_mapping_range(mapping, holebegin, holelen, 0);
unmap_mapping_range(mapping, holebegin, holelen, 0);
}
}
...
@@ -105,10 +105,10 @@ index f3fe7371855ce..a5b9751a5b331 100644
...
@@ -105,10 +105,10 @@ index f3fe7371855ce..a5b9751a5b331 100644
void *buf, int len, unsigned int gup_flags);
void *buf, int len, unsigned int gup_flags);
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
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
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index
4aba6c0c2ba80..974802987f69d
100644
index
5a9238f6caad9..ad387c3cb14fc
100644
--- a/include/linux/mm_types.h
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -2
72
,6 +2
72
,7 @@
struct vm_region {
@@ -2
80
,6 +2
80
,7 @@
struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
struct file *vm_file; /* the backing file or NULL */
...
@@ -116,7 +116,7 @@ index 4aba6c0c2ba80..974802987f69d 100644
...
@@ -116,7 +116,7 @@ index 4aba6c0c2ba80..974802987f69d 100644
int vm_usage; /* region usage count (access under nommu_region_sem) */
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -35
1
,6 +3
52
,7 @@
struct vm_area_struct {
@@ -35
9
,6 +3
60
,7 @@
struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units */
units */
struct file * vm_file; /* File we map to (can be NULL). */
struct file * vm_file; /* File we map to (can be NULL). */
...
@@ -125,24 +125,24 @@ index 4aba6c0c2ba80..974802987f69d 100644
...
@@ -125,24 +125,24 @@ index 4aba6c0c2ba80..974802987f69d 100644
#ifdef CONFIG_SWAP
#ifdef CONFIG_SWAP
diff --git a/kernel/fork.c b/kernel/fork.c
diff --git a/kernel/fork.c b/kernel/fork.c
index
48ed22774efaa..d7439388c1c52
100644
index
6d266388d3804..dd7f13c3bee7d
100644
--- a/kernel/fork.c
--- a/kernel/fork.c
+++ b/kernel/fork.c
+++ b/kernel/fork.c
@@ -5
68
,7 +5
68
,7 @@
static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -5
54
,7 +5
54
,7 @@
static __latent_entropy int dup_mmap(struct mm_struct *mm,
struct inode *inode = file_inode(file);
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
struct address_space *mapping = file->f_mapping;
- get_file(file);
- get_file(file);
+ vma_get_file(tmp);
+ vma_get_file(tmp);
if (tmp->vm_flags & VM_DENYWRITE)
if (tmp->vm_flags & VM_DENYWRITE)
atomic_dec(&inode->i_writecount
);
put_write_access(inode
);
i_mmap_lock_write(mapping);
i_mmap_lock_write(mapping);
diff --git a/mm/Makefile b/mm/Makefile
diff --git a/mm/Makefile b/mm/Makefile
index
fccd3756b25f0..51485ceec650a
100644
index
d73aed0fc99c1..93076a66ad6a5
100644
--- a/mm/Makefile
--- a/mm/Makefile
+++ b/mm/Makefile
+++ b/mm/Makefile
@@ -
44
,7 +
44
,7 @@
obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
@@ -
52
,7 +
52
,7 @@
obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
mm_init.o
mmu_context.o
percpu.o slab_common.o \
mm_init.o percpu.o slab_common.o \
compaction.o vmacache.o \
compaction.o vmacache.o \
interval_tree.o list_lru.o workingset.o \
interval_tree.o list_lru.o workingset.o \
- debug.o gup.o $(mmu-y)
- debug.o gup.o $(mmu-y)
...
@@ -151,10 +151,10 @@ index fccd3756b25f0..51485ceec650a 100644
...
@@ -151,10 +151,10 @@ index fccd3756b25f0..51485ceec650a 100644
# Give 'page_alloc' its own module-parameter namespace
# Give 'page_alloc' its own module-parameter namespace
page-alloc-y := page_alloc.o
page-alloc-y := page_alloc.o
diff --git a/mm/filemap.c b/mm/filemap.c
diff --git a/mm/filemap.c b/mm/filemap.c
index
23a051a7ef0fb..e2fe9132feb21
100644
index
0b2067b3c3283..3334207431c79
100644
--- a/mm/filemap.c
--- a/mm/filemap.c
+++ b/mm/filemap.c
+++ b/mm/filemap.c
@@ -2
660
,7 +2
660
,7 @@
vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
@@ -2
909
,7 +2
909
,7 @@
vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
vm_fault_t ret = VM_FAULT_LOCKED;
vm_fault_t ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
sb_start_pagefault(inode->i_sb);
...
@@ -164,7 +164,7 @@ index 23a051a7ef0fb..e2fe9132feb21 100644
...
@@ -164,7 +164,7 @@ index 23a051a7ef0fb..e2fe9132feb21 100644
if (page->mapping != inode->i_mapping) {
if (page->mapping != inode->i_mapping) {
unlock_page(page);
unlock_page(page);
diff --git a/mm/mmap.c b/mm/mmap.c
diff --git a/mm/mmap.c b/mm/mmap.c
index
f609e9ec4a253..d554b349c653c
100644
index
5c8b4485860de..59f2f758d77e5
100644
--- a/mm/mmap.c
--- a/mm/mmap.c
+++ b/mm/mmap.c
+++ b/mm/mmap.c
@@ -179,7 +179,7 @@
static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
@@ -179,7 +179,7 @@
static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
...
@@ -176,7 +176,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -176,7 +176,7 @@ index f609e9ec4a253..d554b349c653c 100644
mpol_put(vma_policy(vma));
mpol_put(vma_policy(vma));
vm_area_free(vma);
vm_area_free(vma);
return next;
return next;
@@ -91
0
,7 +91
0
,7 @@
int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
@@ -9
5
1,7 +9
5
1,7 @@
int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
if (remove_next) {
if (remove_next) {
if (file) {
if (file) {
uprobe_munmap(next, next->vm_start, next->vm_end);
uprobe_munmap(next, next->vm_start, next->vm_end);
...
@@ -185,7 +185,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -185,7 +185,7 @@ index f609e9ec4a253..d554b349c653c 100644
}
}
if (next->anon_vma)
if (next->anon_vma)
anon_vma_merge(vma, next);
anon_vma_merge(vma, next);
@@ -18
31
,8 +18
31
,8 @@
unsigned long mmap_region(struct file *file, unsigned long addr,
@@ -18
97
,8 +18
97
,8 @@
unsigned long mmap_region(struct file *file, unsigned long addr,
return addr;
return addr;
unmap_and_free_vma:
unmap_and_free_vma:
...
@@ -195,7 +195,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -195,7 +195,7 @@ index f609e9ec4a253..d554b349c653c 100644
/* Undo any partial mapping done by a device driver. */
/* Undo any partial mapping done by a device driver. */
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
@@ -2
683
,7 +2
683
,7 @@
int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2
757
,7 +2
757
,7 @@
int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
goto out_free_mpol;
if (new->vm_file)
if (new->vm_file)
...
@@ -204,7 +204,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -204,7 +204,7 @@ index f609e9ec4a253..d554b349c653c 100644
if (new->vm_ops && new->vm_ops->open)
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
new->vm_ops->open(new);
@@ -27
02
,7 +27
02
,7 @@
int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -27
76
,7 +27
76
,7 @@
int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
if (new->vm_ops && new->vm_ops->close)
if (new->vm_ops && new->vm_ops->close)
new->vm_ops->close(new);
new->vm_ops->close(new);
if (new->vm_file)
if (new->vm_file)
...
@@ -213,7 +213,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -213,7 +213,7 @@ index f609e9ec4a253..d554b349c653c 100644
unlink_anon_vmas(new);
unlink_anon_vmas(new);
out_free_mpol:
out_free_mpol:
mpol_put(vma_policy(new));
mpol_put(vma_policy(new));
@@ -2
894
,7 +2
894
,7 @@
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -2
969
,7 +2
969
,7 @@
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
struct vm_area_struct *vma;
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
unsigned long ret = -EINVAL;
...
@@ -222,7 +222,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -222,7 +222,7 @@ index f609e9ec4a253..d554b349c653c 100644
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
current->comm, current->pid);
current->comm, current->pid);
@@ -
2969
,10 +
2969
,27 @@
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -
3044
,10 +
3044
,27 @@
SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
}
}
...
@@ -230,7 +230,7 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -230,7 +230,7 @@ index f609e9ec4a253..d554b349c653c 100644
+ vma_get_file(vma);
+ vma_get_file(vma);
+ file = vma->vm_file;
+ file = vma->vm_file;
+ prfile = vma->vm_prfile;
+ prfile = vma->vm_prfile;
ret = do_mmap
_pgoff
(vma->vm_file, start, size,
ret = do_mmap(vma->vm_file, start, size,
prot, flags, pgoff, &populate, NULL);
prot, flags, pgoff, &populate, NULL);
+ if (!IS_ERR_VALUE(ret) && file && prfile) {
+ if (!IS_ERR_VALUE(ret) && file && prfile) {
+ struct vm_area_struct *new_vma;
+ struct vm_area_struct *new_vma;
...
@@ -249,9 +249,9 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -249,9 +249,9 @@ index f609e9ec4a253..d554b349c653c 100644
+ if (prfile)
+ if (prfile)
+ fput(prfile);
+ fput(prfile);
out:
out:
u
p_write
(&mm->mmap_se
m);
mma
p_write
_unlock(m
m);
if (populate)
if (populate)
@@ -3
263
,7 +3
280
,7 @@
struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
@@ -3
334
,7 +3
351
,7 @@
struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (anon_vma_clone(new_vma, vma))
if (anon_vma_clone(new_vma, vma))
goto out_free_mempol;
goto out_free_mempol;
if (new_vma->vm_file)
if (new_vma->vm_file)
...
@@ -261,10 +261,10 @@ index f609e9ec4a253..d554b349c653c 100644
...
@@ -261,10 +261,10 @@ index f609e9ec4a253..d554b349c653c 100644
new_vma->vm_ops->open(new_vma);
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
diff --git a/mm/nommu.c b/mm/nommu.c
diff --git a/mm/nommu.c b/mm/nommu.c
index
318df4e236c99..7f051e86ea1dd
100644
index
0faf39b32cdb9..78ecad7204c86
100644
--- a/mm/nommu.c
--- a/mm/nommu.c
+++ b/mm/nommu.c
+++ b/mm/nommu.c
@@ -5
67
,7 +5
67
,7 @@
static void __put_nommu_region(struct vm_region *region)
@@ -5
33
,7 +5
33
,7 @@
static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
up_write(&nommu_region_sem);
if (region->vm_file)
if (region->vm_file)
...
@@ -273,7 +273,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
...
@@ -273,7 +273,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
/* IO memory and memory shared directly out of the pagecache
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
* from ramfs/tmpfs mustn't be released here */
@@ -6
99
,7 +6
99
,7 @@
static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
@@ -6
65
,7 +6
65
,7 @@
static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
vma->vm_ops->close(vma);
if (vma->vm_file)
if (vma->vm_file)
...
@@ -282,7 +282,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
...
@@ -282,7 +282,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
put_nommu_region(vma->vm_region);
put_nommu_region(vma->vm_region);
vm_area_free(vma);
vm_area_free(vma);
}
}
@@ -1
222
,7 +1
222
,7 @@
unsigned long do_mmap(struct file *file,
@@ -1
188
,7 +1
188
,7 @@
unsigned long do_mmap(struct file *file,
goto error_just_free;
goto error_just_free;
}
}
}
}
...
@@ -291,7 +291,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
...
@@ -291,7 +291,7 @@ index 318df4e236c99..7f051e86ea1dd 100644
kmem_cache_free(vm_region_jar, region);
kmem_cache_free(vm_region_jar, region);
region = pregion;
region = pregion;
result = start;
result = start;
@@ -12
99
,10 +12
99
,10 @@
unsigned long do_mmap(struct file *file,
@@ -12
65
,10 +12
65
,10 @@
unsigned long do_mmap(struct file *file,
up_write(&nommu_region_sem);
up_write(&nommu_region_sem);
error:
error:
if (region->vm_file)
if (region->vm_file)
...
...
aufs5-standalone.patch
View file @
44f84f55
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN standalone patch
aufs5.x-rcN standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
diff --git a/fs/dcache.c b/fs/dcache.c
index
046000653e4d8..15aa871d1b450
100644
index
ddca6240e0db4..30dec552278dc
100644
--- a/fs/dcache.c
--- a/fs/dcache.c
+++ b/fs/dcache.c
+++ b/fs/dcache.c
@@ -13
71
,6 +13
71
,7 @@
void d_walk(struct dentry *parent, void *data,
@@ -13
90
,6 +13
90
,7 @@
void d_walk(struct dentry *parent, void *data,
seq = 1;
seq = 1;
goto again;
goto again;
}
}
...
@@ -13,7 +13,7 @@ index 046000653e4d8..15aa871d1b450 100644
...
@@ -13,7 +13,7 @@ index 046000653e4d8..15aa871d1b450 100644
struct check_mount {
struct check_mount {
struct vfsmount *mnt;
struct vfsmount *mnt;
@@ -29
16
,6 +29
17
,7 @@
void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
@@ -29
35
,6 +29
36
,7 @@
void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock);
write_sequnlock(&rename_lock);
}
}
...
@@ -22,10 +22,10 @@ index 046000653e4d8..15aa871d1b450 100644
...
@@ -22,10 +22,10 @@ index 046000653e4d8..15aa871d1b450 100644
/**
/**
* d_ancestor - search for an ancestor
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
diff --git a/fs/exec.c b/fs/exec.c
index
2c465119affcc..239bcb8906e7
8 100644
index
547a2390baf54..18d51d0face6
8 100644
--- a/fs/exec.c
--- a/fs/exec.c
+++ b/fs/exec.c
+++ b/fs/exec.c
@@ -1
09
,6 +1
09
,7 @@
bool path_noexec(const struct path *path)
@@ -1
13
,6 +1
13
,7 @@
bool path_noexec(const struct path *path)
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}
}
...
@@ -34,7 +34,7 @@ index 2c465119affcc..239bcb8906e78 100644
...
@@ -34,7 +34,7 @@ index 2c465119affcc..239bcb8906e78 100644
#ifdef CONFIG_USELIB
#ifdef CONFIG_USELIB
/*
/*
diff --git a/fs/fcntl.c b/fs/fcntl.c
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 0
b28a37f7e505..f2c90a416b751
100644
index 0
73ca6af500f3..b18afdf81e762
100644
--- a/fs/fcntl.c
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -85,6 +85,7 @@
int setfl(int fd, struct file *filp, unsigned long arg)
@@ -85,6 +85,7 @@
int setfl(int fd, struct file *filp, unsigned long arg)
...
@@ -46,7 +46,7 @@ index 0b28a37f7e505..f2c90a416b751 100644
...
@@ -46,7 +46,7 @@ index 0b28a37f7e505..f2c90a416b751 100644
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
int force)
diff --git a/fs/file_table.c b/fs/file_table.c
diff --git a/fs/file_table.c b/fs/file_table.c
index
30d55c9a1744a..34b9bbf4c5566
100644
index
709ada3151da5..27a3e3c9f2a82
100644
--- a/fs/file_table.c
--- a/fs/file_table.c
+++ b/fs/file_table.c
+++ b/fs/file_table.c
@@ -162,6 +162,7 @@
struct file *alloc_empty_file(int flags, const struct cred *cred)
@@ -162,6 +162,7 @@
struct file *alloc_empty_file(int flags, const struct cred *cred)
...
@@ -57,7 +57,7 @@ index 30d55c9a1744a..34b9bbf4c5566 100644
...
@@ -57,7 +57,7 @@ index 30d55c9a1744a..34b9bbf4c5566 100644
/*
/*
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
@@ -37
5
,6 +37
6
,7 @@
void __fput_sync(struct file *file)
@@ -37
6
,6 +37
7
,7 @@
void __fput_sync(struct file *file)
}
}
EXPORT_SYMBOL(fput);
EXPORT_SYMBOL(fput);
...
@@ -66,10 +66,10 @@ index 30d55c9a1744a..34b9bbf4c5566 100644
...
@@ -66,10 +66,10 @@ index 30d55c9a1744a..34b9bbf4c5566 100644
void __init files_init(void)
void __init files_init(void)
{
{
diff --git a/fs/inode.c b/fs/inode.c
diff --git a/fs/inode.c b/fs/inode.c
index
7700c5e4783b9..6284b41fcf3f0
100644
index
e7f0c614a58f3..6fe0a92a4c93c
100644
--- a/fs/inode.c
--- a/fs/inode.c
+++ b/fs/inode.c
+++ b/fs/inode.c
@@ -1
694
,6 +1
694
,7 @@
int update_time(struct inode *inode, struct timespec64 *time, int flags)
@@ -1
776
,6 +1
776
,7 @@
int update_time(struct inode *inode, struct timespec64 *time, int flags)
return inode->i_op->update_time(inode, time, flags);
return inode->i_op->update_time(inode, time, flags);
return generic_update_time(inode, time, flags);
return generic_update_time(inode, time, flags);
}
}
...
@@ -78,7 +78,7 @@ index 7700c5e4783b9..6284b41fcf3f0 100644
...
@@ -78,7 +78,7 @@ index 7700c5e4783b9..6284b41fcf3f0 100644
/**
/**
* touch_atime - update the access time
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
diff --git a/fs/namespace.c b/fs/namespace.c
index
12e725e34c6ca..fa17b9d5926ba
100644
index
451dee24a546a..38078cbede431
100644
--- a/fs/namespace.c
--- a/fs/namespace.c
+++ b/fs/namespace.c
+++ b/fs/namespace.c
@@ -431,6 +431,7 @@
void __mnt_drop_write(struct vfsmount *mnt)
@@ -431,6 +431,7 @@
void __mnt_drop_write(struct vfsmount *mnt)
...
@@ -89,7 +89,7 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
...
@@ -89,7 +89,7 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
/**
/**
* mnt_drop_write - give up write access to a mount
* mnt_drop_write - give up write access to a mount
@@ -7
81
,6 +78
2
,7 @@
int is_current_mnt_ns(struct vfsmount *mnt)
@@ -7
97
,6 +7
9
8,7 @@
int is_current_mnt_ns(struct vfsmount *mnt)
{
{
return check_mnt(real_mount(mnt));
return check_mnt(real_mount(mnt));
}
}
...
@@ -97,7 +97,7 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
...
@@ -97,7 +97,7 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
/*
/*
* vfsmount lock must be held for write
* vfsmount lock must be held for write
@@ -19
03
,6 +19
05
,7 @@
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -19
61
,6 +19
63
,7 @@
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
}
return 0;
return 0;
}
}
...
@@ -106,10 +106,10 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
...
@@ -106,10 +106,10 @@ index 12e725e34c6ca..fa17b9d5926ba 100644
static void lock_mnt_tree(struct mount *mnt)
static void lock_mnt_tree(struct mount *mnt)
{
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
diff --git a/fs/notify/group.c b/fs/notify/group.c
index
133f723aca070..0b9f7f6d8390f
100644
index
a4a4b1c64d32a..86dc2efb1850c
100644
--- a/fs/notify/group.c
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -
99
,6 +
99
,7 @@
void fsnotify_get_group(struct fsnotify_group *group)
@@ -
100
,6 +
100
,7 @@
void fsnotify_get_group(struct fsnotify_group *group)
{
{
refcount_inc(&group->refcnt);
refcount_inc(&group->refcnt);
}
}
...
@@ -118,7 +118,7 @@ index 133f723aca070..0b9f7f6d8390f 100644
...
@@ -118,7 +118,7 @@ index 133f723aca070..0b9f7f6d8390f 100644
/*
/*
* Drop a reference to a group. Free it if it's through.
* Drop a reference to a group. Free it if it's through.
diff --git a/fs/open.c b/fs/open.c
diff --git a/fs/open.c b/fs/open.c
index
719b320ede52b..f88ce55c1c998
100644
index
9af548fb841b0..2ff09b709f7bf
100644
--- a/fs/open.c
--- a/fs/open.c
+++ b/fs/open.c
+++ b/fs/open.c
@@ -65,6 +65,7 @@
int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
@@ -65,6 +65,7 @@
int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
...
@@ -130,35 +130,19 @@ index 719b320ede52b..f88ce55c1c998 100644
...
@@ -130,35 +130,19 @@ index 719b320ede52b..f88ce55c1c998 100644
long vfs_truncate(const struct path *path, loff_t length)
long vfs_truncate(const struct path *path, loff_t length)
{
{
diff --git a/fs/read_write.c b/fs/read_write.c
diff --git a/fs/read_write.c b/fs/read_write.c
index
5d684d7d29207..6f61c0b6aa664
100644
index
75f764b434184..7582bb3fb634b
100644
--- a/fs/read_write.c
--- a/fs/read_write.c
+++ b/fs/read_write.c
+++ b/fs/read_write.c
@@ -
469
,6 +
469
,7 @@
ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
@@ -
503
,6 +
503
,7 @@
ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
inc_syscr(current);
return ret;
return ret;
}
}
+EXPORT_SYMBOL_GPL(vfs_read);
+EXPORT_SYMBOL_GPL(vfs_read);
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
{
{
@@ -509,6 +510,7 @@
vfs_readf_t vfs_readf(struct file *file)
@@ -613,6 +614,7 @@
ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
return new_sync_read;
file_end_write(file);
return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */
}
+EXPORT_SYMBOL_GPL(vfs_readf);
vfs_writef_t vfs_writef(struct file *file)
{
@@ -520,6 +522,7 @@
vfs_writef_t vfs_writef(struct file *file)
return new_sync_write;
return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */
}
+EXPORT_SYMBOL_GPL(vfs_writef);
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{
@@ -589,6 +592,7 @@
ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
return ret;
return ret;
}
}
+EXPORT_SYMBOL_GPL(vfs_write);
+EXPORT_SYMBOL_GPL(vfs_write);
...
@@ -166,27 +150,27 @@ index 5d684d7d29207..6f61c0b6aa664 100644
...
@@ -166,27 +150,27 @@ index 5d684d7d29207..6f61c0b6aa664 100644
/* file_ppos returns &file->f_pos or NULL if file is stream */
/* file_ppos returns &file->f_pos or NULL if file is stream */
static inline loff_t *file_ppos(struct file *file)
static inline loff_t *file_ppos(struct file *file)
diff --git a/fs/splice.c b/fs/splice.c
diff --git a/fs/splice.c b/fs/splice.c
index
9f230ee854e20..a6bd05004433c
100644
index
55b5356262085..c13ac0fbac318
100644
--- a/fs/splice.c
--- a/fs/splice.c
+++ b/fs/splice.c
+++ b/fs/splice.c
@@ -
862
,6 +
862
,7 @@
long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -
763
,6 +
763
,7 @@
long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return warn_unsupported(out, "write");
return splice_write(pipe, out, ppos, len, flags);
return
out->f_op->
splice_write(pipe, out, ppos, len, flags);
}
}
+EXPORT_SYMBOL_GPL(do_splice_from);
+EXPORT_SYMBOL_GPL(do_splice_from);
/*
/*
* Attempt to initiate a splice from a file to a pipe.
* Attempt to initiate a splice from a file to a pipe.
@@ -
891
,6 +
892
,7 @@
long do_splice_to(struct file *in, loff_t *ppos,
@@ -
787
,6 +
788
,7 @@
long do_splice_to(struct file *in, loff_t *ppos,
return warn_unsupported(in, "read");
return splice_read(in, ppos, pipe, len, flags);
return
in->f_op->
splice_read(in, ppos, pipe, len, flags);
}
}
+EXPORT_SYMBOL_GPL(do_splice_to);
+EXPORT_SYMBOL_GPL(do_splice_to);
/**
/**
* splice_direct_to_actor - splices data directly between two non-pipes
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/fs/sync.c b/fs/sync.c
diff --git a/fs/sync.c b/fs/sync.c
index
457f4e4a5cc1f..67c66358f3fe4
100644
index
b7b5a0a0df6ff..fa5c7fba7f1ba
100644
--- a/fs/sync.c
--- a/fs/sync.c
+++ b/fs/sync.c
+++ b/fs/sync.c
@@ -39,6 +39,7 @@
int __sync_filesystem(struct super_block *sb, int wait)
@@ -39,6 +39,7 @@
int __sync_filesystem(struct super_block *sb, int wait)
...
@@ -198,10 +182,10 @@ index 457f4e4a5cc1f..67c66358f3fe4 100644
...
@@ -198,10 +182,10 @@ index 457f4e4a5cc1f..67c66358f3fe4 100644
/*
/*
* Write out and wait upon all dirty data associated with this
* Write out and wait upon all dirty data associated with this
diff --git a/fs/xattr.c b/fs/xattr.c
diff --git a/fs/xattr.c b/fs/xattr.c
index
91608d9bfc6aa..02d19ab3ba540
100644
index
cd7a563e8bcd4..7d989d57b0f0d
100644
--- a/fs/xattr.c
--- a/fs/xattr.c
+++ b/fs/xattr.c
+++ b/fs/xattr.c
@@ -
296
,6 +
296
,7 @@
vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
@@ -
360
,6 +
360
,7 @@
vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
*xattr_value = value;
*xattr_value = value;
return error;
return error;
}
}
...
@@ -210,10 +194,10 @@ index 91608d9bfc6aa..02d19ab3ba540 100644
...
@@ -210,10 +194,10 @@ index 91608d9bfc6aa..02d19ab3ba540 100644
ssize_t
ssize_t
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index
837a3358e77ca..715ba9c1b91ae
100644
index
7f006a47790cf..be002c3a30833
100644
--- a/kernel/locking/lockdep.c
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -
190
,6 +
190
,7 @@
inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
@@ -
209
,6 +
209
,7 @@
inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
*/
*/
return lock_classes + class_idx;
return lock_classes + class_idx;
}
}
...
@@ -222,19 +206,19 @@ index 837a3358e77ca..715ba9c1b91ae 100644
...
@@ -222,19 +206,19 @@ index 837a3358e77ca..715ba9c1b91ae 100644
#ifdef CONFIG_LOCK_STAT
#ifdef CONFIG_LOCK_STAT
diff --git a/kernel/task_work.c b/kernel/task_work.c
diff --git a/kernel/task_work.c b/kernel/task_work.c
index 8
25f28259a19a..b77593b29c1a5
100644
index 8
d6e1217c451c..0e73637adda86
100644
--- a/kernel/task_work.c
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -1
26
,3 +1
26
,4 @@
void task_work_run(void)
@@ -1
54
,3 +1
54
,4 @@
void task_work_run(void)
} while (work);
} while (work);
}
}
}
}
+EXPORT_SYMBOL_GPL(task_work_run);
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/security.c b/security/security.c
diff --git a/security/security.c b/security/security.c
index
51de970fbb1ed..b21f1ffd90051
100644
index
a28045dc9e7f6..310cf38efeec7
100644
--- a/security/security.c
--- a/security/security.c
+++ b/security/security.c
+++ b/security/security.c
@@ -10
87
,6 +10
87
,7 @@
int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -10
93
,6 +10
93
,7 @@
int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
return call_int_hook(path_rmdir, 0, dir, dentry);
}
}
...
@@ -242,7 +226,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -242,7 +226,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_unlink(const struct path *dir, struct dentry *dentry)
int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
{
@@ -110
3
,6 +110
4
,7 @@
int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -110
9
,6 +11
1
0,7 @@
int security_path_symlink(const struct path *dir, struct dentry *dentry,
return 0;
return 0;
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
}
}
...
@@ -250,7 +234,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -250,7 +234,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
struct dentry *new_dentry)
@@ -111
1
,6 +111
3
,7 @@
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -111
7
,6 +111
9
,7 @@
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
return 0;
return 0;
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
}
}
...
@@ -258,7 +242,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -258,7 +242,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
const struct path *new_dir, struct dentry *new_dentry,
@@ -11
38
,6 +114
1
,7 @@
int security_path_truncate(const struct path *path)
@@ -11
44
,6 +114
7
,7 @@
int security_path_truncate(const struct path *path)
return 0;
return 0;
return call_int_hook(path_truncate, 0, path);
return call_int_hook(path_truncate, 0, path);
}
}
...
@@ -266,7 +250,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -266,7 +250,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_chmod(const struct path *path, umode_t mode)
int security_path_chmod(const struct path *path, umode_t mode)
{
{
@@ -11
4
5,6 +11
49
,7 @@
int security_path_chmod(const struct path *path, umode_t mode)
@@ -115
1
,6 +11
55
,7 @@
int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return 0;
return call_int_hook(path_chmod, 0, path, mode);
return call_int_hook(path_chmod, 0, path, mode);
}
}
...
@@ -274,7 +258,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -274,7 +258,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
{
@@ -115
2
,6 +11
57
,7 @@
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -115
8
,6 +11
63
,7 @@
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
return 0;
return 0;
return call_int_hook(path_chown, 0, path, uid, gid);
return call_int_hook(path_chown, 0, path, uid, gid);
}
}
...
@@ -282,7 +266,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -282,7 +266,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_path_chroot(const struct path *path)
int security_path_chroot(const struct path *path)
{
{
@@ -125
2
,6 +12
58
,7 @@
int security_inode_permission(struct inode *inode, int mask)
@@ -125
8
,6 +12
64
,7 @@
int security_inode_permission(struct inode *inode, int mask)
return 0;
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
return call_int_hook(inode_permission, 0, inode, mask);
}
}
...
@@ -290,7 +274,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
...
@@ -290,7 +274,7 @@ index 51de970fbb1ed..b21f1ffd90051 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
{
@@ -14
29
,6 +14
36
,7 @@
int security_file_permission(struct file *file, int mask)
@@ -14
50
,6 +14
57
,7 @@
int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
return fsnotify_perm(file, mask);
}
}
...
...
include/uapi/linux/aufs_type.h
View file @
44f84f55
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include <limits.h>
#include <limits.h>
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#define AUFS_VERSION "5.x-rcN-202
00622
"
#define AUFS_VERSION "5.x-rcN-202
10104
"
/* todo? move this to linux-2.6.19/include/magic.h */
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
...
...
lockdep-debug.patch
View file @
44f84f55
...
@@ -2,27 +2,18 @@ SPDX-License-Identifier: GPL-2.0
...
@@ -2,27 +2,18 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN lockdep patch
aufs5.x-rcN lockdep patch
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index
e5eda5226fbc7..761f87256a9f1
100644
index
93bb861981675..acde7be2848cf
100644
--- a/include/linux/lockdep.h
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -17,7 +17,7 @@
struct lockdep_map;
extern int prove_locking;
extern int lock_stat;
-#define MAX_LOCKDEP_SUBCLASSES 8UL
+#define MAX_LOCKDEP_SUBCLASSES (8UL + 4)
#include <linux/types.h>
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index
715ba9c1b91ae..9caea35fb9579
100644
index
be002c3a30833..38e997d6c0474
100644
--- a/kernel/locking/lockdep.c
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index
baca699b94e91..11ebf13738f40
100644
index
de49f9e1c11ba..df5b79a3122b9
100644
--- a/kernel/locking/lockdep_internals.h
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -9
4
,15 +9
4
,15 @@
static const unsigned long LOCKF_USED_IN_IRQ_READ =
@@ -9
9
,15 +9
9
,15 @@
static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_STACK_TRACE_ENTRIES 262144UL
#define MAX_STACK_TRACE_ENTRIES 262144UL
#define STACK_TRACE_HASH_SIZE 8192
#define STACK_TRACE_HASH_SIZE 8192
#else
#else
...
...
tmpfs-idr.patch
View file @
44f84f55
SPDX-License-Identifier: GPL-2.0
SPDX-License-Identifier: GPL-2.0
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index
7a35a6901221..b7af7d8bfa48
100644
index
a5a5d1d4d7b1..390c6fc194a9
100644
--- a/include/linux/shmem_fs.h
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -27,10 +27,13 @@
struct shmem_inode_info {
@@ -27,10 +27,13 @@
struct shmem_inode_info {
...
@@ -21,10 +21,10 @@ index 7a35a6901221..b7af7d8bfa48 100644
...
@@ -21,10 +21,10 @@ index 7a35a6901221..b7af7d8bfa48 100644
umode_t mode; /* Mount mode for root directory */
umode_t mode; /* Mount mode for root directory */
unsigned char huge; /* Whether to try for hugepages */
unsigned char huge; /* Whether to try for hugepages */
diff --git a/mm/shmem.c b/mm/shmem.c
diff --git a/mm/shmem.c b/mm/shmem.c
index
bd8840082c94..7f29f8cb3921
100644
index
537c137698f8..705b3029a000
100644
--- a/mm/shmem.c
--- a/mm/shmem.c
+++ b/mm/shmem.c
+++ b/mm/shmem.c
@@ -1
1
0,7 +1
1
0,7 @@
struct shmem_falloc {
@@ -10
9
,7 +10
9
,7 @@
struct shmem_falloc {
struct shmem_options {
struct shmem_options {
unsigned long long blocks;
unsigned long long blocks;
...
@@ -33,7 +33,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -33,7 +33,7 @@ index bd8840082c94..7f29f8cb3921 100644
struct mempolicy *mpol;
struct mempolicy *mpol;
kuid_t uid;
kuid_t uid;
kgid_t gid;
kgid_t gid;
@@ -12
8
,11 +12
8
,14 @@
static unsigned long shmem_default_max_blocks(void)
@@ -12
9
,11 +12
9
,14 @@
static unsigned long shmem_default_max_blocks(void)
return totalram_pages() / 2;
return totalram_pages() / 2;
}
}
...
@@ -50,7 +50,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -50,7 +50,7 @@ index bd8840082c94..7f29f8cb3921 100644
}
}
#endif
#endif
@@ -11
00
,6 +11
03
,11 @@
static void shmem_evict_inode(struct inode *inode)
@@ -11
78
,6 +11
81
,11 @@
static void shmem_evict_inode(struct inode *inode)
simple_xattrs_free(&info->xattrs);
simple_xattrs_free(&info->xattrs);
WARN_ON(inode->i_blocks);
WARN_ON(inode->i_blocks);
...
@@ -62,22 +62,15 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -62,22 +62,15 @@ index bd8840082c94..7f29f8cb3921 100644
shmem_free_inode(inode->i_sb);
shmem_free_inode(inode->i_sb);
clear_inode(inode);
clear_inode(inode);
}
}
@@ -2240,13 +2248,13 @@
static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2302,7 +2310,6 @@
static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
struct inode *inode;
struct shmem_inode_info *info;
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
+ int ino;
if (shmem_reserve_inode(sb))
return NULL;
inode = new_inode(sb);
inode = new_inode(sb);
if (inode) {
if (inode) {
- inode->i_ino =
get_next_
ino
()
;
- inode->i_ino = ino;
inode_init_owner(inode, dir, mode);
inode_init_owner(inode, dir, mode);
inode->i_blocks = 0;
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
@@ -2
290
,6 +2
298
,25 @@
static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2
346
,6 +2
353
,25 @@
static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
break;
break;
}
}
...
@@ -98,12 +91,12 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -98,12 +91,12 @@ index bd8840082c94..7f29f8cb3921 100644
+ inode = NULL;
+ inode = NULL;
+ }
+ }
+ } else
+ } else
+ inode->i_ino =
get_next_
ino
()
;
+ inode->i_ino = ino;
+
+
lockdep_annotate_inode_mutex_key(inode);
lockdep_annotate_inode_mutex_key(inode);
} else
} else
shmem_free_inode(sb);
shmem_free_inode(sb);
@@ -3
292
,8 +33
19
,7 @@
static struct dentry *shmem_get_parent(struct dentry *child)
@@ -3
339
,8 +33
65
,7 @@
static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
static int shmem_match(struct inode *ino, void *vfh)
{
{
__u32 *fh = vfh;
__u32 *fh = vfh;
...
@@ -113,7 +106,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -113,7 +106,7 @@ index bd8840082c94..7f29f8cb3921 100644
return ino->i_ino == inum && fh[0] == ino->i_generation;
return ino->i_ino == inum && fh[0] == ino->i_generation;
}
}
@@ -33
13
,14 +33
39
,11 @@
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -33
60
,14 +33
85
,11 @@
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
struct dentry *dentry = NULL;
u64 inum;
u64 inum;
...
@@ -131,7 +124,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -131,7 +124,7 @@ index bd8840082c94..7f29f8cb3921 100644
if (inode) {
if (inode) {
dentry = shmem_find_alias(inode);
dentry = shmem_find_alias(inode);
iput(inode);
iput(inode);
@@ -33
32
,30 +3
355
,15 @@
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -33
79
,30 +3
401
,15 @@
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
struct inode *parent)
{
{
...
@@ -165,7 +158,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -165,7 +158,7 @@ index bd8840082c94..7f29f8cb3921 100644
return 1;
return 1;
}
}
@@ -34
30
,7 +34
3
8,7 @@
static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
@@ -34
81
,7 +34
8
8,7 @@
static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
break;
break;
case Opt_nr_inodes:
case Opt_nr_inodes:
ctx->inodes = memparse(param->string, &rest);
ctx->inodes = memparse(param->string, &rest);
...
@@ -174,7 +167,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -174,7 +167,7 @@ index bd8840082c94..7f29f8cb3921 100644
goto bad_value;
goto bad_value;
ctx->seen |= SHMEM_SEEN_INODES;
ctx->seen |= SHMEM_SEEN_INODES;
break;
break;
@@ -35
28
,7 +35
36
,7 @@
static int shmem_reconfigure(struct fs_context *fc)
@@ -35
91
,7 +35
98
,7 @@
static int shmem_reconfigure(struct fs_context *fc)
{
{
struct shmem_options *ctx = fc->fs_private;
struct shmem_options *ctx = fc->fs_private;
struct shmem_sb_info *sbinfo = SHMEM_SB(fc->root->d_sb);
struct shmem_sb_info *sbinfo = SHMEM_SB(fc->root->d_sb);
...
@@ -183,7 +176,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -183,7 +176,7 @@ index bd8840082c94..7f29f8cb3921 100644
const char *err;
const char *err;
spin_lock(&sbinfo->stat_lock);
spin_lock(&sbinfo->stat_lock);
@@ -358
7
,7 +3
59
5,7 @@
static int shmem_show_options(struct seq_file *seq, struct dentry *root)
@@ -3
6
58,7 +3
66
5,7 @@
static int shmem_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",size=%luk",
seq_printf(seq, ",size=%luk",
sbinfo->max_blocks << (PAGE_SHIFT - 10));
sbinfo->max_blocks << (PAGE_SHIFT - 10));
if (sbinfo->max_inodes != shmem_default_max_inodes())
if (sbinfo->max_inodes != shmem_default_max_inodes())
...
@@ -192,16 +185,16 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -192,16 +185,16 @@ index bd8840082c94..7f29f8cb3921 100644
if (sbinfo->mode != (0777 | S_ISVTX))
if (sbinfo->mode != (0777 | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -3
611
,6 +3
619
,8 @@
static void shmem_put_super(struct super_block *sb)
@@ -3
705
,6 +3
712
,8 @@
static void shmem_put_super(struct super_block *sb)
{
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
+ if (!sbinfo->idr_nouse)
+ if (!sbinfo->idr_nouse)
+ idr_destroy(&sbinfo->idr);
+ idr_destroy(&sbinfo->idr);
free_percpu(sbinfo->ino_batch);
percpu_counter_destroy(&sbinfo->used_blocks);
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
mpol_put(sbinfo->mpol);
kfree(sbinfo);
@@ -3748,6 +3757,8 @@
static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
@@ -3651,6 +3661,8 @@
static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
#else
#else
sb->s_flags |= SB_NOUSER;
sb->s_flags |= SB_NOUSER;
#endif
#endif
...
@@ -209,8 +202,8 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -209,8 +202,8 @@ index bd8840082c94..7f29f8cb3921 100644
+ idr_init(&sbinfo->idr);
+ idr_init(&sbinfo->idr);
sbinfo->max_blocks = ctx->blocks;
sbinfo->max_blocks = ctx->blocks;
sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
sbinfo->uid = ctx->uid;
if (sb->s_flags & SB_KERNMOUNT) {
@@ -3
762
,6 +3
774
,15 @@
static void shmem_destroy_inodecache(void)
@@ -3
865
,6 +3
876
,15 @@
static void shmem_destroy_inodecache(void)
kmem_cache_destroy(shmem_inode_cachep);
kmem_cache_destroy(shmem_inode_cachep);
}
}
...
@@ -226,7 +219,7 @@ index bd8840082c94..7f29f8cb3921 100644
...
@@ -226,7 +219,7 @@ index bd8840082c94..7f29f8cb3921 100644
static const struct address_space_operations shmem_aops = {
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.writepage = shmem_writepage,
.set_page_dirty = __set_page_dirty_no_writeback,
.set_page_dirty = __set_page_dirty_no_writeback,
@@ -
3902,6 +3923
,7 @@
int __init shmem_init(void)
@@ -
4005,6 +4025
,7 @@
int __init shmem_init(void)
pr_err("Could not kern_mount tmpfs\n");
pr_err("Could not kern_mount tmpfs\n");
goto out1;
goto out1;
}
}
...
...
vfs-ino.patch
View file @
44f84f55
SPDX-License-Identifier: GPL-2.0
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/inode.c b/fs/inode.c
diff --git a/fs/inode.c b/fs/inode.c
index 9
3d9252a00ab..325fbc77b91
a 100644
index 9
d78c37b00b8..8e81cd8ab4a
a 100644
--- a/fs/inode.c
--- a/fs/inode.c
+++ b/fs/inode.c
+++ b/fs/inode.c
@@ -89
4
,6 +89
4
,8 @@
unsigned int get_next_ino(void)
@@ -89
6
,6 +89
6
,8 @@
unsigned int get_next_ino(void)
unsigned int *p = &get_cpu_var(last_ino);
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
unsigned int res = *p;
...
@@ -13,7 +13,7 @@ index 93d9252a00ab..325fbc77b91a 100644
...
@@ -13,7 +13,7 @@ index 93d9252a00ab..325fbc77b91a 100644
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
static atomic_t shared_last_ino;
@@ -90
6
,7 +90
8
,7 @@
unsigned int get_next_ino(void)
@@ -90
8
,7 +9
1
0,7 @@
unsigned int get_next_ino(void)
res++;
res++;
/* get_next_ino should not provide a 0 inode number */
/* get_next_ino should not provide a 0 inode number */
if (unlikely(!res))
if (unlikely(!res))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment