Commit 171af168 authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs5.x-rcN 20190603


Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
parent 8fef72dc
...@@ -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 2c2fce72e694..f5be2663b01e 100644 index 429c6c624861..382d5a5edd7e 100644
--- a/MAINTAINERS --- a/MAINTAINERS
+++ b/MAINTAINERS +++ b/MAINTAINERS
@@ -2699,6 +2699,19 @@ F: include/linux/audit.h @@ -2758,6 +2758,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h F: include/uapi/linux/audit.h
F: kernel/audit* F: kernel/audit*
...@@ -26,10 +26,10 @@ index 2c2fce72e694..f5be2663b01e 100644 ...@@ -26,10 +26,10 @@ index 2c2fce72e694..f5be2663b01e 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 bf1c61cab8eb..7e18c8c72dcc 100644 index 102d79575895..0d62fd56648d 100644
--- a/drivers/block/loop.c --- a/drivers/block/loop.c
+++ b/drivers/block/loop.c +++ b/drivers/block/loop.c
@@ -738,6 +738,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -746,6 +746,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
return error; return error;
} }
...@@ -55,7 +55,7 @@ index bf1c61cab8eb..7e18c8c72dcc 100644 ...@@ -55,7 +55,7 @@ index bf1c61cab8eb..7e18c8c72dcc 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 aac41adf4743..fc18967c2522 100644 index c435398f2c81..a688a042d022 100644
--- a/fs/dcache.c --- a/fs/dcache.c
+++ b/fs/dcache.c +++ b/fs/dcache.c
@@ -1247,7 +1247,7 @@ enum d_walk_ret { @@ -1247,7 +1247,7 @@ enum d_walk_ret {
...@@ -68,7 +68,7 @@ index aac41adf4743..fc18967c2522 100644 ...@@ -68,7 +68,7 @@ index aac41adf4743..fc18967c2522 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 083185174c6d..78234ee16784 100644 index 3d40771e8e7c..d62303c5472a 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 083185174c6d..78234ee16784 100644 ...@@ -90,10 +90,10 @@ index 083185174c6d..78234ee16784 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 9a453f3637f8..ee4434cea572 100644 index df6542ec3b88..407d7b45e2ee 100644
--- a/fs/inode.c --- a/fs/inode.c
+++ b/fs/inode.c +++ b/fs/inode.c
@@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(generic_update_time); @@ -1670,7 +1670,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 9a453f3637f8..ee4434cea572 100644 ...@@ -103,10 +103,10 @@ index 9a453f3637f8..ee4434cea572 100644
int (*update_time)(struct inode *, struct timespec64 *, int); int (*update_time)(struct inode *, struct timespec64 *, int);
diff --git a/fs/namespace.c b/fs/namespace.c diff --git a/fs/namespace.c b/fs/namespace.c
index c9cab307fa77..e56de0b2bee0 100644 index ffb13f0562b0..4a9b8c3a70d2 100644
--- a/fs/namespace.c --- a/fs/namespace.c
+++ b/fs/namespace.c +++ b/fs/namespace.c
@@ -769,6 +769,12 @@ static inline int check_mnt(struct mount *mnt) @@ -770,6 +770,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;
} }
...@@ -120,10 +120,10 @@ index c9cab307fa77..e56de0b2bee0 100644 ...@@ -120,10 +120,10 @@ index c9cab307fa77..e56de0b2bee0 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 diff --git a/fs/read_write.c b/fs/read_write.c
index 61b43ad7608e..8979e01e9bf0 100644 index c543d965e288..35ab54e0a994 100644
--- a/fs/read_write.c --- a/fs/read_write.c
+++ b/fs/read_write.c +++ b/fs/read_write.c
@@ -489,6 +489,28 @@ static ssize_t __vfs_write(struct file *file, const char __user *p, @@ -498,6 +498,28 @@ static ssize_t __vfs_write(struct file *file, const char __user *p,
return -EINVAL; return -EINVAL;
} }
...@@ -153,10 +153,10 @@ index 61b43ad7608e..8979e01e9bf0 100644 ...@@ -153,10 +153,10 @@ index 61b43ad7608e..8979e01e9bf0 100644
{ {
mm_segment_t old_fs; 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 25212dcca2df..9629564ee8f2 100644 index 14cb602d9a2f..58d2692c5f30 100644
--- a/fs/splice.c --- a/fs/splice.c
+++ b/fs/splice.c +++ b/fs/splice.c
@@ -833,8 +833,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -834,8 +834,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/* /*
* Attempt to initiate a splice from pipe to file. * Attempt to initiate a splice from pipe to file.
*/ */
...@@ -167,7 +167,7 @@ index 25212dcca2df..9629564ee8f2 100644 ...@@ -167,7 +167,7 @@ index 25212dcca2df..9629564ee8f2 100644
{ {
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int); loff_t *, size_t, unsigned int);
@@ -850,9 +850,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, @@ -851,9 +851,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.
*/ */
...@@ -181,7 +181,7 @@ index 25212dcca2df..9629564ee8f2 100644 ...@@ -181,7 +181,7 @@ index 25212dcca2df..9629564ee8f2 100644
ssize_t (*splice_read)(struct file *, loff_t *, ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int); 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 b54e0541ad89..28607828e96f 100644 index 4d1ff010bc5a..457f4e4a5cc1 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 +194,10 @@ index b54e0541ad89..28607828e96f 100644 ...@@ -194,10 +194,10 @@ index b54e0541ad89..28607828e96f 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 dd28e7679089..77933034b50a 100644 index f7fdfe93e25d..28593b894e7b 100644
--- a/include/linux/fs.h --- a/include/linux/fs.h
+++ b/include/linux/fs.h +++ b/include/linux/fs.h
@@ -1327,6 +1327,7 @@ extern void fasync_free(struct fasync_struct *); @@ -1333,6 +1333,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 +205,7 @@ index dd28e7679089..77933034b50a 100644 ...@@ -205,7 +205,7 @@ index dd28e7679089..77933034b50a 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);
@@ -1806,6 +1807,7 @@ struct file_operations { @@ -1812,6 +1813,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,7 +213,7 @@ index dd28e7679089..77933034b50a 100644 ...@@ -213,7 +213,7 @@ index dd28e7679089..77933034b50a 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);
@@ -1876,6 +1878,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, @@ -1882,6 +1884,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer, struct iovec *fast_pointer,
struct iovec **ret_pointer); struct iovec **ret_pointer);
...@@ -226,7 +226,7 @@ index dd28e7679089..77933034b50a 100644 ...@@ -226,7 +226,7 @@ index dd28e7679089..77933034b50a 100644
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_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 *); extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
@@ -2306,6 +2314,7 @@ extern int current_umask(void); @@ -2315,6 +2323,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,7 +234,7 @@ index dd28e7679089..77933034b50a 100644 ...@@ -234,7 +234,7 @@ index dd28e7679089..77933034b50a 100644
/* /sys/fs */ /* /sys/fs */
extern struct kobject *fs_kobj; extern struct kobject *fs_kobj;
@@ -2594,6 +2603,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) @@ -2603,6 +2612,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false; return false;
} }
#endif #endif
...@@ -243,10 +243,10 @@ index dd28e7679089..77933034b50a 100644 ...@@ -243,10 +243,10 @@ index dd28e7679089..77933034b50a 100644
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 79c3873d58ac..470795d9f4a2 100644 index 6e2377e6c1d6..5a945d18a72a 100644
--- a/include/linux/lockdep.h --- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h +++ b/include/linux/lockdep.h
@@ -320,6 +320,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock, @@ -325,6 +325,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key; return lock->key == key;
} }
...@@ -255,7 +255,7 @@ index 79c3873d58ac..470795d9f4a2 100644 ...@@ -255,7 +255,7 @@ index 79c3873d58ac..470795d9f4a2 100644
/* /*
* Acquire a lock. * Acquire a lock.
* *
@@ -458,6 +460,7 @@ struct lockdep_map { }; @@ -463,6 +465,7 @@ struct lockdep_map { };
#define lockdep_depth(tsk) (0) #define lockdep_depth(tsk) (0)
...@@ -298,10 +298,10 @@ index 74b4911ac16d..19789fbea567 100644 ...@@ -298,10 +298,10 @@ index 74b4911ac16d..19789fbea567 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 e221be724fe8..c738ac7c3a46 100644 index c47788fa85f9..3c35a1059890 100644
--- a/kernel/locking/lockdep.c --- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c
@@ -151,7 +151,7 @@ static @@ -152,7 +152,7 @@ static
#endif #endif
struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
...@@ -310,7 +310,7 @@ index e221be724fe8..c738ac7c3a46 100644 ...@@ -310,7 +310,7 @@ index e221be724fe8..c738ac7c3a46 100644
{ {
if (!hlock->class_idx) { if (!hlock->class_idx) {
/* /*
@@ -162,6 +162,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock) @@ -163,6 +163,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
} }
return lock_classes + hlock->class_idx - 1; return lock_classes + hlock->class_idx - 1;
} }
......
...@@ -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 3e6d3101f3ff..8b099435d01d 100644 index f1046cf6ad85..95c957c2e2c3 100644
--- a/fs/Kconfig --- a/fs/Kconfig
+++ b/fs/Kconfig +++ b/fs/Kconfig
@@ -261,6 +261,7 @@ source "fs/romfs/Kconfig" @@ -262,6 +262,7 @@ source "fs/romfs/Kconfig"
source "fs/pstore/Kconfig" source "fs/pstore/Kconfig"
source "fs/sysv/Kconfig" source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig" source "fs/ufs/Kconfig"
...@@ -14,10 +14,10 @@ index 3e6d3101f3ff..8b099435d01d 100644 ...@@ -14,10 +14,10 @@ index 3e6d3101f3ff..8b099435d01d 100644
endif # MISC_FILESYSTEMS endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile diff --git a/fs/Makefile b/fs/Makefile
index 427fec226fae..e5ec0a044931 100644 index c9aea23aba56..57c6f47b0185 100644
--- a/fs/Makefile --- a/fs/Makefile
+++ b/fs/Makefile +++ b/fs/Makefile
@@ -129,3 +129,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/ @@ -130,3 +130,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/
obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/ obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/ obj-$(CONFIG_EFIVAR_FS) += efivarfs/
......
...@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0 ...@@ -2,10 +2,10 @@ 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 7e18c8c72dcc..33f8813e97d6 100644 index 0d62fd56648d..c5543376c6b2 100644
--- a/drivers/block/loop.c --- a/drivers/block/loop.c
+++ b/drivers/block/loop.c +++ b/drivers/block/loop.c
@@ -625,6 +625,15 @@ static inline void loop_update_dio(struct loop_device *lo) @@ -633,6 +633,15 @@ static inline void loop_update_dio(struct loop_device *lo)
lo->use_dio); lo->use_dio);
} }
...@@ -21,7 +21,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -21,7 +21,7 @@ index 7e18c8c72dcc..33f8813e97d6 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)
{ {
@@ -678,6 +687,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -686,6 +695,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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -29,7 +29,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
int error; int error;
bool partscan; bool partscan;
@@ -697,12 +707,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -705,12 +715,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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -49,7 +49,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
error = -EINVAL; error = -EINVAL;
@@ -714,6 +731,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -722,6 +739,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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -57,7 +57,7 @@ index 7e18c8c72dcc..33f8813e97d6 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));
@@ -727,6 +745,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -735,6 +753,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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -66,7 +66,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
if (partscan) if (partscan)
loop_reread_partitions(lo, bdev); loop_reread_partitions(lo, bdev);
return 0; return 0;
@@ -735,6 +755,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, @@ -743,6 +763,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,7 +75,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -75,7 +75,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
return error; return error;
} }
@@ -921,7 +943,7 @@ static int loop_prepare_queue(struct loop_device *lo) @@ -947,7 +969,7 @@ static void loop_update_rotational(struct loop_device *lo)
static int loop_set_fd(struct loop_device *lo, fmode_t mode, static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg) struct block_device *bdev, unsigned int arg)
{ {
...@@ -84,7 +84,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -84,7 +84,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
struct inode *inode; struct inode *inode;
struct address_space *mapping; struct address_space *mapping;
int lo_flags = 0; int lo_flags = 0;
@@ -936,6 +958,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, @@ -962,6 +984,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg); file = fget(arg);
if (!file) if (!file)
goto out; goto out;
...@@ -97,7 +97,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -97,7 +97,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
error = mutex_lock_killable(&loop_ctl_mutex); error = mutex_lock_killable(&loop_ctl_mutex);
if (error) if (error)
@@ -972,6 +1000,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, @@ -998,6 +1026,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
lo->lo_device = bdev; lo->lo_device = bdev;
lo->lo_flags = lo_flags; lo->lo_flags = lo_flags;
lo->lo_backing_file = file; lo->lo_backing_file = file;
...@@ -105,7 +105,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -105,7 +105,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
lo->transfer = NULL; lo->transfer = NULL;
lo->ioctl = NULL; lo->ioctl = NULL;
lo->lo_sizelimit = 0; lo->lo_sizelimit = 0;
@@ -1009,6 +1038,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, @@ -1036,6 +1065,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
mutex_unlock(&loop_ctl_mutex); mutex_unlock(&loop_ctl_mutex);
out_putf: out_putf:
fput(file); fput(file);
...@@ -114,7 +114,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -114,7 +114,7 @@ index 7e18c8c72dcc..33f8813e97d6 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);
@@ -1055,6 +1086,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer, @@ -1082,6 +1113,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -122,7 +122,7 @@ index 7e18c8c72dcc..33f8813e97d6 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;
@@ -1078,6 +1110,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) @@ -1105,6 +1137,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 7e18c8c72dcc..33f8813e97d6 100644 ...@@ -130,7 +130,7 @@ index 7e18c8c72dcc..33f8813e97d6 100644
spin_unlock_irq(&lo->lo_lock); spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo); loop_release_xfer(lo);
@@ -1160,6 +1193,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) @@ -1187,6 +1220,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
*/ */
if (filp) if (filp)
fput(filp); fput(filp);
...@@ -190,7 +190,7 @@ index 9ba35a878ecd..4ed0ff03d5ab 100644 ...@@ -190,7 +190,7 @@ index 9ba35a878ecd..4ed0ff03d5ab 100644
+ return f; + return f;
+} +}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
index c42cbe71ed4b..255e2d3763e7 100644 index f31e40aff267..e13fb1a0717a 100644
--- a/fs/aufs/loop.h --- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h +++ b/fs/aufs/loop.h
@@ -26,6 +26,8 @@ void au_warn_loopback(struct super_block *h_sb); @@ -26,6 +26,8 @@ void au_warn_loopback(struct super_block *h_sb);
...@@ -200,7 +200,7 @@ index c42cbe71ed4b..255e2d3763e7 100644 ...@@ -200,7 +200,7 @@ index c42cbe71ed4b..255e2d3763e7 100644
+ +
+struct file *aufs_real_loop(struct file *file); +struct file *aufs_real_loop(struct file *file);
#else #else
AuStub(struct file *, loop_backing_file, return NULL) AuStub(struct file *, loop_backing_file, return NULL, struct super_block *sb)
@@ -36,6 +38,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb) @@ -36,6 +38,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
...@@ -212,10 +212,10 @@ index c42cbe71ed4b..255e2d3763e7 100644 ...@@ -212,10 +212,10 @@ index c42cbe71ed4b..255e2d3763e7 100644
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index 73255f63b80c..f04e211cbf89 100644 index a97e2921cb09..f74eb6962684 100644
--- a/fs/aufs/super.c --- a/fs/aufs/super.c
+++ b/fs/aufs/super.c +++ b/fs/aufs/super.c
@@ -846,7 +846,10 @@ static const struct super_operations aufs_sop = { @@ -844,7 +844,10 @@ static const struct super_operations aufs_sop = {
.statfs = aufs_statfs, .statfs = aufs_statfs,
.put_super = aufs_put_super, .put_super = aufs_put_super,
.sync_fs = aufs_sync_fs, .sync_fs = aufs_sync_fs,
...@@ -228,10 +228,10 @@ index 73255f63b80c..f04e211cbf89 100644 ...@@ -228,10 +228,10 @@ index 73255f63b80c..f04e211cbf89 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 77933034b50a..9a9b195fb847 100644 index 28593b894e7b..bdc2611787df 100644
--- a/include/linux/fs.h --- a/include/linux/fs.h
+++ b/include/linux/fs.h +++ b/include/linux/fs.h
@@ -1940,6 +1940,10 @@ struct super_operations { @@ -1947,6 +1947,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 *);
......
...@@ -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 6a803a0b75df..a51f41a1b4dd 100644 index 9c8ca6cd3ce4..2ae2c94aceca 100644
--- a/fs/proc/base.c --- a/fs/proc/base.c
+++ b/fs/proc/base.c +++ b/fs/proc/base.c
@@ -2019,7 +2019,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) @@ -2014,7 +2014,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
down_read(&mm->mmap_sem); down_read(&mm->mmap_sem);
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) {
...@@ -31,7 +31,7 @@ index 3b63be64e436..fb9913bf3d10 100644 ...@@ -31,7 +31,7 @@ index 3b63be64e436..fb9913bf3d10 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 95ca1fe7283c..914d9fa7c596 100644 index 01d4eb0e6bd1..fedfaa012768 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
@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma) @@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
...@@ -46,7 +46,7 @@ index 95ca1fe7283c..914d9fa7c596 100644 ...@@ -46,7 +46,7 @@ index 95ca1fe7283c..914d9fa7c596 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;
@@ -1760,7 +1763,7 @@ static int show_numa_map(struct seq_file *m, void *v) @@ -1761,7 +1764,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;
...@@ -72,10 +72,10 @@ index 36bf0f2e102e..8df6cbc58756 100644 ...@@ -72,10 +72,10 @@ index 36bf0f2e102e..8df6cbc58756 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 6b10c21630f5..5951915df163 100644 index 0e8834ac32b7..b3f42f01aaf0 100644
--- a/include/linux/mm.h --- a/include/linux/mm.h
+++ b/include/linux/mm.h +++ b/include/linux/mm.h
@@ -1486,6 +1486,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, @@ -1542,6 +1542,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 6b10c21630f5..5951915df163 100644 ...@@ -105,10 +105,10 @@ index 6b10c21630f5..5951915df163 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 4ef4bbe78a1d..8cac6e0bc1a8 100644 index 8ec38b11b361..d3f5492a2611 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
@@ -250,6 +250,7 @@ struct vm_region { @@ -253,6 +253,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 4ef4bbe78a1d..8cac6e0bc1a8 100644 ...@@ -116,7 +116,7 @@ index 4ef4bbe78a1d..8cac6e0bc1a8 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
@@ -324,6 +325,7 @@ struct vm_area_struct { @@ -327,6 +328,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,10 +125,10 @@ index 4ef4bbe78a1d..8cac6e0bc1a8 100644 ...@@ -125,10 +125,10 @@ index 4ef4bbe78a1d..8cac6e0bc1a8 100644
atomic_long_t swap_readahead_info; atomic_long_t swap_readahead_info;
diff --git a/kernel/fork.c b/kernel/fork.c diff --git a/kernel/fork.c b/kernel/fork.c
index 9dcd18aa210b..cf478ebb6926 100644 index b2b87d450b80..c97d53f7c49a 100644
--- a/kernel/fork.c --- a/kernel/fork.c
+++ b/kernel/fork.c +++ b/kernel/fork.c
@@ -546,7 +546,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, @@ -549,7 +549,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;
...@@ -138,7 +138,7 @@ index 9dcd18aa210b..cf478ebb6926 100644 ...@@ -138,7 +138,7 @@ index 9dcd18aa210b..cf478ebb6926 100644
atomic_dec(&inode->i_writecount); atomic_dec(&inode->i_writecount);
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 d210cc9d6f80..e77e80ce7298 100644 index ac5e5ba78874..5decb22d13a0 100644
--- a/mm/Makefile --- a/mm/Makefile
+++ b/mm/Makefile +++ b/mm/Makefile
@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ @@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
...@@ -148,13 +148,13 @@ index d210cc9d6f80..e77e80ce7298 100644 ...@@ -148,13 +148,13 @@ index d210cc9d6f80..e77e80ce7298 100644
- debug.o $(mmu-y) - debug.o $(mmu-y)
+ prfile.o debug.o $(mmu-y) + prfile.o debug.o $(mmu-y)
obj-y += init-mm.o # Give 'page_alloc' its own module-parameter namespace
obj-y += memblock.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 d78f577baef2..7dcd21948a79 100644 index df2006ba0cfa..d5221dedfe56 100644
--- a/mm/filemap.c --- a/mm/filemap.c
+++ b/mm/filemap.c +++ b/mm/filemap.c
@@ -2764,7 +2764,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) @@ -2671,7 +2671,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,10 +164,10 @@ index d78f577baef2..7dcd21948a79 100644 ...@@ -164,10 +164,10 @@ index d78f577baef2..7dcd21948a79 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 bd7b9f293b39..f3fd32a1df36 100644 index 7e8c3e8ae75f..d8a903f61262 100644
--- a/mm/mmap.c --- a/mm/mmap.c
+++ b/mm/mmap.c +++ b/mm/mmap.c
@@ -181,7 +181,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) @@ -182,7 +182,7 @@ static struct vm_area_struct *remove_vma(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)
...@@ -176,7 +176,7 @@ index bd7b9f293b39..f3fd32a1df36 100644 ...@@ -176,7 +176,7 @@ index bd7b9f293b39..f3fd32a1df36 100644
mpol_put(vma_policy(vma)); mpol_put(vma_policy(vma));
vm_area_free(vma); vm_area_free(vma);
return next; return next;
@@ -930,7 +930,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, @@ -931,7 +931,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -185,7 +185,7 @@ index bd7b9f293b39..f3fd32a1df36 100644
} }
if (next->anon_vma) if (next->anon_vma)
anon_vma_merge(vma, next); anon_vma_merge(vma, next);
@@ -1846,8 +1846,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, @@ -1847,8 +1847,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -195,7 +195,7 @@ index bd7b9f293b39..f3fd32a1df36 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);
@@ -2679,7 +2679,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, @@ -2680,7 +2680,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -204,7 +204,7 @@ index bd7b9f293b39..f3fd32a1df36 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);
@@ -2698,7 +2698,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, @@ -2699,7 +2699,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -213,7 +213,7 @@ index bd7b9f293b39..f3fd32a1df36 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));
@@ -2888,7 +2888,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, @@ -2890,7 +2890,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -222,7 +222,7 @@ index bd7b9f293b39..f3fd32a1df36 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);
@@ -2963,10 +2963,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, @@ -2965,10 +2965,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
} }
} }
...@@ -251,7 +251,7 @@ index bd7b9f293b39..f3fd32a1df36 100644 ...@@ -251,7 +251,7 @@ index bd7b9f293b39..f3fd32a1df36 100644
out: out:
up_write(&mm->mmap_sem); up_write(&mm->mmap_sem);
if (populate) if (populate)
@@ -3256,7 +3273,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, @@ -3258,7 +3275,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 bd7b9f293b39..f3fd32a1df36 100644 ...@@ -261,10 +261,10 @@ index bd7b9f293b39..f3fd32a1df36 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 749276beb109..c7957f06fbc4 100644 index d8c02fbe03b5..22dae8b7216a 100644
--- a/mm/nommu.c --- a/mm/nommu.c
+++ b/mm/nommu.c +++ b/mm/nommu.c
@@ -625,7 +625,7 @@ static void __put_nommu_region(struct vm_region *region) @@ -640,7 +640,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 749276beb109..c7957f06fbc4 100644 ...@@ -273,7 +273,7 @@ index 749276beb109..c7957f06fbc4 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 */
@@ -763,7 +763,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) @@ -778,7 +778,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 749276beb109..c7957f06fbc4 100644 ...@@ -282,7 +282,7 @@ index 749276beb109..c7957f06fbc4 100644
put_nommu_region(vma->vm_region); put_nommu_region(vma->vm_region);
vm_area_free(vma); vm_area_free(vma);
} }
@@ -1286,7 +1286,7 @@ unsigned long do_mmap(struct file *file, @@ -1301,7 +1301,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free; goto error_just_free;
} }
} }
...@@ -291,7 +291,7 @@ index 749276beb109..c7957f06fbc4 100644 ...@@ -291,7 +291,7 @@ index 749276beb109..c7957f06fbc4 100644
kmem_cache_free(vm_region_jar, region); kmem_cache_free(vm_region_jar, region);
region = pregion; region = pregion;
result = start; result = start;
@@ -1361,10 +1361,10 @@ unsigned long do_mmap(struct file *file, @@ -1376,10 +1376,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)
......
...@@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-2.0 ...@@ -2,7 +2,7 @@ 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 fc18967c2522..50eb587c1253 100644 index a688a042d022..3fc74e471924 100644
--- a/fs/dcache.c --- a/fs/dcache.c
+++ b/fs/dcache.c +++ b/fs/dcache.c
@@ -1352,6 +1352,7 @@ void d_walk(struct dentry *parent, void *data, @@ -1352,6 +1352,7 @@ void d_walk(struct dentry *parent, void *data,
...@@ -13,7 +13,7 @@ index fc18967c2522..50eb587c1253 100644 ...@@ -13,7 +13,7 @@ index fc18967c2522..50eb587c1253 100644
struct check_mount { struct check_mount {
struct vfsmount *mnt; struct vfsmount *mnt;
@@ -2845,6 +2846,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) @@ -2850,6 +2851,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock); write_sequnlock(&rename_lock);
} }
...@@ -22,10 +22,10 @@ index fc18967c2522..50eb587c1253 100644 ...@@ -22,10 +22,10 @@ index fc18967c2522..50eb587c1253 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 2e0033348d8e..bd946a5b9b1e 100644 index 89a500bb897a..1a722915ed77 100644
--- a/fs/exec.c --- a/fs/exec.c
+++ b/fs/exec.c +++ b/fs/exec.c
@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path) @@ -110,6 +110,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 2e0033348d8e..bd946a5b9b1e 100644 ...@@ -34,7 +34,7 @@ index 2e0033348d8e..bd946a5b9b1e 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 78234ee16784..2072f690b121 100644 index d62303c5472a..d4ad34463848 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,10 +46,10 @@ index 78234ee16784..2072f690b121 100644 ...@@ -46,10 +46,10 @@ index 78234ee16784..2072f690b121 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 155d7514a094..eefcbb908038 100644 index b07b53f24ff5..34b9bbf4c556 100644
--- a/fs/file_table.c --- a/fs/file_table.c
+++ b/fs/file_table.c +++ b/fs/file_table.c
@@ -161,6 +161,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)
} }
return ERR_PTR(-ENFILE); return ERR_PTR(-ENFILE);
} }
...@@ -57,7 +57,7 @@ index 155d7514a094..eefcbb908038 100644 ...@@ -57,7 +57,7 @@ index 155d7514a094..eefcbb908038 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.
@@ -323,6 +324,7 @@ void flush_delayed_fput(void) @@ -327,6 +328,7 @@ void flush_delayed_fput(void)
{ {
delayed_fput(NULL); delayed_fput(NULL);
} }
...@@ -65,7 +65,7 @@ index 155d7514a094..eefcbb908038 100644 ...@@ -65,7 +65,7 @@ index 155d7514a094..eefcbb908038 100644
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput); static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
@@ -370,6 +372,7 @@ void __fput_sync(struct file *file) @@ -374,6 +376,7 @@ void __fput_sync(struct file *file)
} }
EXPORT_SYMBOL(fput); EXPORT_SYMBOL(fput);
...@@ -74,10 +74,10 @@ index 155d7514a094..eefcbb908038 100644 ...@@ -74,10 +74,10 @@ index 155d7514a094..eefcbb908038 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 ee4434cea572..78b9f5631976 100644 index 407d7b45e2ee..b4d3e100abd0 100644
--- a/fs/inode.c --- a/fs/inode.c
+++ b/fs/inode.c +++ b/fs/inode.c
@@ -1666,6 +1666,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags) @@ -1679,6 +1679,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
return update_time(inode, time, flags); return update_time(inode, time, flags);
} }
...@@ -86,10 +86,10 @@ index ee4434cea572..78b9f5631976 100644 ...@@ -86,10 +86,10 @@ index ee4434cea572..78b9f5631976 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 e56de0b2bee0..f63c51204a41 100644 index 4a9b8c3a70d2..64e82b22d55e 100644
--- a/fs/namespace.c --- a/fs/namespace.c
+++ b/fs/namespace.c +++ b/fs/namespace.c
@@ -435,6 +435,7 @@ void __mnt_drop_write(struct vfsmount *mnt) @@ -436,6 +436,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt)); mnt_dec_writers(real_mount(mnt));
preempt_enable(); preempt_enable();
} }
...@@ -97,7 +97,7 @@ index e56de0b2bee0..f63c51204a41 100644 ...@@ -97,7 +97,7 @@ index e56de0b2bee0..f63c51204a41 100644
/** /**
* mnt_drop_write - give up write access to a mount * mnt_drop_write - give up write access to a mount
@@ -774,6 +775,7 @@ int is_current_mnt_ns(struct vfsmount *mnt) @@ -775,6 +776,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{ {
return check_mnt(real_mount(mnt)); return check_mnt(real_mount(mnt));
} }
...@@ -105,7 +105,7 @@ index e56de0b2bee0..f63c51204a41 100644 ...@@ -105,7 +105,7 @@ index e56de0b2bee0..f63c51204a41 100644
/* /*
* vfsmount lock must be held for write * vfsmount lock must be held for write
@@ -1886,6 +1888,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, @@ -1908,6 +1910,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
} }
return 0; return 0;
} }
...@@ -114,10 +114,10 @@ index e56de0b2bee0..f63c51204a41 100644 ...@@ -114,10 +114,10 @@ index e56de0b2bee0..f63c51204a41 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 c03b83662876..94d210ca384a 100644 index 0391190305cc..0b9f7f6d8390 100644
--- a/fs/notify/group.c --- a/fs/notify/group.c
+++ b/fs/notify/group.c +++ b/fs/notify/group.c
@@ -112,6 +112,7 @@ void fsnotify_get_group(struct fsnotify_group *group) @@ -99,6 +99,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
{ {
refcount_inc(&group->refcnt); refcount_inc(&group->refcnt);
} }
...@@ -125,7 +125,7 @@ index c03b83662876..94d210ca384a 100644 ...@@ -125,7 +125,7 @@ index c03b83662876..94d210ca384a 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.
@@ -121,6 +122,7 @@ void fsnotify_put_group(struct fsnotify_group *group) @@ -108,6 +109,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (refcount_dec_and_test(&group->refcnt)) if (refcount_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group); fsnotify_final_destroy_group(group);
} }
...@@ -133,7 +133,7 @@ index c03b83662876..94d210ca384a 100644 ...@@ -133,7 +133,7 @@ index c03b83662876..94d210ca384a 100644
/* /*
* Create a new fsnotify_group and hold a reference for the group returned. * Create a new fsnotify_group and hold a reference for the group returned.
@@ -150,6 +152,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) @@ -137,6 +139,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group; return group;
} }
...@@ -142,10 +142,10 @@ index c03b83662876..94d210ca384a 100644 ...@@ -142,10 +142,10 @@ index c03b83662876..94d210ca384a 100644
int fsnotify_fasync(int fd, struct file *file, int on) int fsnotify_fasync(int fd, struct file *file, int on)
{ {
diff --git a/fs/notify/mark.c b/fs/notify/mark.c diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 22acb0a79b53..a38381e57490 100644 index 25eb247ea85a..6a2a2f722eae 100644
--- a/fs/notify/mark.c --- a/fs/notify/mark.c
+++ b/fs/notify/mark.c +++ b/fs/notify/mark.c
@@ -289,6 +289,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) @@ -276,6 +276,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
queue_delayed_work(system_unbound_wq, &reaper_work, queue_delayed_work(system_unbound_wq, &reaper_work,
FSNOTIFY_REAPER_DELAY); FSNOTIFY_REAPER_DELAY);
} }
...@@ -153,7 +153,7 @@ index 22acb0a79b53..a38381e57490 100644 ...@@ -153,7 +153,7 @@ index 22acb0a79b53..a38381e57490 100644
/* /*
* Get mark reference when we found the mark via lockless traversal of object * Get mark reference when we found the mark via lockless traversal of object
@@ -443,6 +444,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark, @@ -430,6 +431,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
mutex_unlock(&group->mark_mutex); mutex_unlock(&group->mark_mutex);
fsnotify_free_mark(mark); fsnotify_free_mark(mark);
} }
...@@ -161,7 +161,7 @@ index 22acb0a79b53..a38381e57490 100644 ...@@ -161,7 +161,7 @@ index 22acb0a79b53..a38381e57490 100644
/* /*
* Sorting function for lists of fsnotify marks. * Sorting function for lists of fsnotify marks.
@@ -685,6 +687,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp, @@ -677,6 +679,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp,
mutex_unlock(&group->mark_mutex); mutex_unlock(&group->mark_mutex);
return ret; return ret;
} }
...@@ -169,7 +169,7 @@ index 22acb0a79b53..a38381e57490 100644 ...@@ -169,7 +169,7 @@ index 22acb0a79b53..a38381e57490 100644
/* /*
* Given a list of marks, find the mark associated with given group. If found * Given a list of marks, find the mark associated with given group. If found
@@ -809,6 +812,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, @@ -801,6 +804,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
mark->group = group; mark->group = group;
WRITE_ONCE(mark->connector, NULL); WRITE_ONCE(mark->connector, NULL);
} }
...@@ -178,10 +178,10 @@ index 22acb0a79b53..a38381e57490 100644 ...@@ -178,10 +178,10 @@ index 22acb0a79b53..a38381e57490 100644
/* /*
* Destroy all marks in destroy_list, waits for SRCU period to finish before * Destroy all marks in destroy_list, waits for SRCU period to finish before
diff --git a/fs/open.c b/fs/open.c diff --git a/fs/open.c b/fs/open.c
index a00350018a47..fc17a6a34071 100644 index b5b80469b93d..eb818f6b9519 100644
--- a/fs/open.c --- a/fs/open.c
+++ b/fs/open.c +++ b/fs/open.c
@@ -64,6 +64,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,
inode_unlock(dentry->d_inode); inode_unlock(dentry->d_inode);
return ret; return ret;
} }
...@@ -190,10 +190,10 @@ index a00350018a47..fc17a6a34071 100644 ...@@ -190,10 +190,10 @@ index a00350018a47..fc17a6a34071 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 8979e01e9bf0..50fb9b2d1418 100644 index 35ab54e0a994..9da238d64ea4 100644
--- a/fs/read_write.c --- a/fs/read_write.c
+++ b/fs/read_write.c +++ b/fs/read_write.c
@@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) @@ -468,6 +468,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
return ret; return ret;
} }
...@@ -201,7 +201,7 @@ index 8979e01e9bf0..50fb9b2d1418 100644 ...@@ -201,7 +201,7 @@ index 8979e01e9bf0..50fb9b2d1418 100644
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)
{ {
@@ -499,6 +500,7 @@ vfs_readf_t vfs_readf(struct file *file) @@ -508,6 +509,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read; return new_sync_read;
return ERR_PTR(-ENOSYS); return ERR_PTR(-ENOSYS);
} }
...@@ -209,7 +209,7 @@ index 8979e01e9bf0..50fb9b2d1418 100644 ...@@ -209,7 +209,7 @@ index 8979e01e9bf0..50fb9b2d1418 100644
vfs_writef_t vfs_writef(struct file *file) vfs_writef_t vfs_writef(struct file *file)
{ {
@@ -510,6 +512,7 @@ vfs_writef_t vfs_writef(struct file *file) @@ -519,6 +521,7 @@ vfs_writef_t vfs_writef(struct file *file)
return new_sync_write; return new_sync_write;
return ERR_PTR(-ENOSYS); return ERR_PTR(-ENOSYS);
} }
...@@ -217,19 +217,19 @@ index 8979e01e9bf0..50fb9b2d1418 100644 ...@@ -217,19 +217,19 @@ index 8979e01e9bf0..50fb9b2d1418 100644
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{ {
@@ -579,6 +582,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ @@ -588,6 +591,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);
static inline loff_t file_pos_read(struct file *file) /* file_ppos returns &file->f_pos or NULL if file is stream */
{ 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 9629564ee8f2..f277bda5f717 100644 index 58d2692c5f30..4fe4afa7f6b1 100644
--- a/fs/splice.c --- a/fs/splice.c
+++ b/fs/splice.c +++ b/fs/splice.c
@@ -846,6 +846,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out, @@ -847,6 +847,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags); return splice_write(pipe, out, ppos, len, flags);
} }
...@@ -237,7 +237,7 @@ index 9629564ee8f2..f277bda5f717 100644 ...@@ -237,7 +237,7 @@ index 9629564ee8f2..f277bda5f717 100644
/* /*
* Attempt to initiate a splice from a file to a pipe. * Attempt to initiate a splice from a file to a pipe.
@@ -875,6 +876,7 @@ long do_splice_to(struct file *in, loff_t *ppos, @@ -876,6 +877,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags); return splice_read(in, ppos, pipe, len, flags);
} }
...@@ -246,7 +246,7 @@ index 9629564ee8f2..f277bda5f717 100644 ...@@ -246,7 +246,7 @@ index 9629564ee8f2..f277bda5f717 100644
/** /**
* 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 28607828e96f..ffd7ea43831e 100644 index 457f4e4a5cc1..67c66358f3fe 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)
...@@ -258,10 +258,10 @@ index 28607828e96f..ffd7ea43831e 100644 ...@@ -258,10 +258,10 @@ index 28607828e96f..ffd7ea43831e 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 0d6a6a4af861..7ce4701b7289 100644 index 90dd78f0eb27..40b01dd1b14a 100644
--- a/fs/xattr.c --- a/fs/xattr.c
+++ b/fs/xattr.c +++ b/fs/xattr.c
@@ -295,6 +295,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, @@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
*xattr_value = value; *xattr_value = value;
return error; return error;
} }
...@@ -270,10 +270,10 @@ index 0d6a6a4af861..7ce4701b7289 100644 ...@@ -270,10 +270,10 @@ index 0d6a6a4af861..7ce4701b7289 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 c738ac7c3a46..92de98d9c634 100644 index 3c35a1059890..67dccde036a2 100644
--- a/kernel/locking/lockdep.c --- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c
@@ -162,6 +162,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock) @@ -163,6 +163,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
} }
return lock_classes + hlock->class_idx - 1; return lock_classes + hlock->class_idx - 1;
} }
...@@ -300,10 +300,10 @@ index dc28914fa72e..c2ddfea2b280 100644 ...@@ -300,10 +300,10 @@ index dc28914fa72e..c2ddfea2b280 100644
} }
+EXPORT_SYMBOL_GPL(__devcgroup_check_permission); +EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
diff --git a/security/security.c b/security/security.c diff --git a/security/security.c b/security/security.c
index 23cbb1a295a3..72b2c47ef649 100644 index 613a5c00e602..7ebb58f218a0 100644
--- a/security/security.c --- a/security/security.c
+++ b/security/security.c +++ b/security/security.c
@@ -992,6 +992,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) @@ -997,6 +997,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);
} }
...@@ -311,7 +311,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -311,7 +311,7 @@ index 23cbb1a295a3..72b2c47ef649 100644
int security_path_unlink(const struct path *dir, struct dentry *dentry) int security_path_unlink(const struct path *dir, struct dentry *dentry)
{ {
@@ -1008,6 +1009,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, @@ -1013,6 +1014,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);
} }
...@@ -319,7 +319,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -319,7 +319,7 @@ index 23cbb1a295a3..72b2c47ef649 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)
@@ -1016,6 +1018,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, @@ -1021,6 +1023,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);
} }
...@@ -327,7 +327,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -327,7 +327,7 @@ index 23cbb1a295a3..72b2c47ef649 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,
@@ -1043,6 +1046,7 @@ int security_path_truncate(const struct path *path) @@ -1048,6 +1051,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);
} }
...@@ -335,7 +335,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -335,7 +335,7 @@ index 23cbb1a295a3..72b2c47ef649 100644
int security_path_chmod(const struct path *path, umode_t mode) int security_path_chmod(const struct path *path, umode_t mode)
{ {
@@ -1050,6 +1054,7 @@ int security_path_chmod(const struct path *path, umode_t mode) @@ -1055,6 +1059,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);
} }
...@@ -343,7 +343,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -343,7 +343,7 @@ index 23cbb1a295a3..72b2c47ef649 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)
{ {
@@ -1057,6 +1062,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) @@ -1062,6 +1067,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);
} }
...@@ -351,7 +351,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -351,7 +351,7 @@ index 23cbb1a295a3..72b2c47ef649 100644
int security_path_chroot(const struct path *path) int security_path_chroot(const struct path *path)
{ {
@@ -1157,6 +1163,7 @@ int security_inode_permission(struct inode *inode, int mask) @@ -1162,6 +1168,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);
} }
...@@ -359,7 +359,7 @@ index 23cbb1a295a3..72b2c47ef649 100644 ...@@ -359,7 +359,7 @@ index 23cbb1a295a3..72b2c47ef649 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr) int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{ {
@@ -1328,6 +1335,7 @@ int security_file_permission(struct file *file, int mask) @@ -1339,6 +1346,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask); return fsnotify_perm(file, mask);
} }
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <linux/limits.h> #include <linux/limits.h>
#define AUFS_VERSION "5.x-rcN-20190520" #define AUFS_VERSION "5.x-rcN-20190603"
/* 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')
......
...@@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-2.0 ...@@ -2,7 +2,7 @@ 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 470795d9f4a2..42bf321d9181 100644 index 5a945d18a72a..c6def416ec11 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; @@ -17,7 +17,7 @@ struct lockdep_map;
...@@ -15,10 +15,10 @@ index 470795d9f4a2..42bf321d9181 100644 ...@@ -15,10 +15,10 @@ index 470795d9f4a2..42bf321d9181 100644
#include <linux/types.h> #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 92de98d9c634..0d2eeaa651e4 100644 index 67dccde036a2..7344fb25a11f 100644
--- a/kernel/locking/lockdep.c --- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c
@@ -4495,6 +4501,7 @@ void lockdep_reset(void) @@ -4587,6 +4593,7 @@ void lockdep_reset(void)
INIT_HLIST_HEAD(chainhash_table + i); INIT_HLIST_HEAD(chainhash_table + i);
raw_local_irq_restore(flags); raw_local_irq_restore(flags);
} }
...@@ -27,10 +27,10 @@ index 92de98d9c634..0d2eeaa651e4 100644 ...@@ -27,10 +27,10 @@ index 92de98d9c634..0d2eeaa651e4 100644
/* Remove a class from a lock chain. Must be called with the graph lock held. */ /* Remove a class from a lock chain. Must be called with the graph lock held. */
static void remove_class_from_lock_chain(struct pending_free *pf, static void remove_class_from_lock_chain(struct pending_free *pf,
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 d4c197425f68..a103700a63bd 100644 index 150ec3f0c5b5..e65c1d0b1ac1 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
@@ -71,15 +71,15 @@ enum { @@ -93,15 +93,15 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_LOCKDEP_CHAINS_BITS 15 #define MAX_LOCKDEP_CHAINS_BITS 15
#define MAX_STACK_TRACE_ENTRIES 262144UL #define MAX_STACK_TRACE_ENTRIES 262144UL
#else #else
......
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/mount.h b/fs/mount.h
index 6250de544760..29abfea2db50 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -131,9 +131,7 @@ struct proc_mounts {
struct mnt_namespace *ns;
struct path root;
int (*show)(struct seq_file *, struct vfsmount *);
- void *cached_mount;
- u64 cached_event;
- loff_t cached_index;
+ bool filled;
};
extern const struct seq_operations mounts_op;
diff --git a/fs/namespace.c b/fs/namespace.c
index ffb13f0562b0..674517838ee1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1260,46 +1260,78 @@ struct vfsmount *mnt_clone_internal(const struct path *path)
#ifdef CONFIG_PROC_FS
/* iterator; we want it to have access to namespace_sem, thus here... */
-static void *m_start(struct seq_file *m, loff_t *pos)
+static int m_start_fill(struct seq_file *m)
{
+ int err;
+ size_t last_count;
+ char *buf;
+ struct mount *r;
struct proc_mounts *p = m->private;
+ err = -ENODATA;
down_read(&namespace_sem);
- if (p->cached_event == p->ns->event) {
- void *v = p->cached_mount;
- if (*pos == p->cached_index)
- return v;
- if (*pos == p->cached_index + 1) {
- v = seq_list_next(v, &p->ns->list, &p->cached_index);
- return p->cached_mount = v;
+ list_for_each_entry(r, &p->ns->list, mnt_list) {
+ last_count = m->count;
+ err = p->show(m, &r->mnt);
+ if (unlikely(err < 0))
+ break;
+ if (!seq_has_overflowed(m))
+ continue;
+
+ /* expand the buffer */
+ buf = kvmalloc(m->size + PAGE_SIZE, GFP_KERNEL);
+ if (unlikely(!buf)) {
+ err = -ENOMEM;
+ break;
+ }
+ memcpy(buf, m->buf, last_count);
+ kvfree(m->buf);
+ m->buf = buf;
+ m->size += PAGE_SIZE;
+ m->count = last_count;
+
+ err = p->show(m, &r->mnt);
+ if (unlikely(err < 0))
+ break;
+ else if (unlikely(seq_has_overflowed(m))) {
+ err = -EOVERFLOW;
+ break;
}
}
+ up_read(&namespace_sem);
- p->cached_event = p->ns->event;
- p->cached_mount = seq_list_start(&p->ns->list, *pos);
- p->cached_index = *pos;
- return p->cached_mount;
+ if (!err)
+ p->filled = true;
+ return err;
}
-static void *m_next(struct seq_file *m, void *v, loff_t *pos)
+static void *m_start(struct seq_file *m, loff_t *pos)
{
+ int err;
struct proc_mounts *p = m->private;
- p->cached_mount = seq_list_next(v, &p->ns->list, pos);
- p->cached_index = *pos;
- return p->cached_mount;
+ if (!p->filled) {
+ err = m_start_fill(m);
+ if (unlikely(err))
+ return ERR_PTR(err);
+ }
+
+ return m_start; /* any valid pointer */
+}
+
+static void *m_next(struct seq_file *m, void *v, loff_t *pos)
+{
+ return NULL;
}
static void m_stop(struct seq_file *m, void *v)
{
- up_read(&namespace_sem);
+ /* empty */
}
static int m_show(struct seq_file *m, void *v)
{
- struct proc_mounts *p = m->private;
- struct mount *r = list_entry(v, struct mount, mnt_list);
- return p->show(m, &r->mnt);
+ return 0;
}
const struct seq_operations mounts_op = {
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index e16fb8f2049e..268e80d568ce 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -279,7 +279,6 @@ static int mounts_open_common(struct inode *inode, struct file *file,
p->ns = ns;
p->root = root;
p->show = show;
- p->cached_event = ~0ULL;
return 0;
...@@ -20,7 +20,7 @@ index 20d815a33145..64354e89a701 100644 ...@@ -20,7 +20,7 @@ index 20d815a33145..64354e89a701 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 2275a0ff7c30..0d0105d2d208 100644 index 1bb3b8dc8bb2..fa8f3dfa77c1 100644
--- a/mm/shmem.c --- a/mm/shmem.c
+++ b/mm/shmem.c +++ b/mm/shmem.c
@@ -113,11 +113,14 @@ static unsigned long shmem_default_max_blocks(void) @@ -113,11 +113,14 @@ static unsigned long shmem_default_max_blocks(void)
...@@ -200,7 +200,7 @@ index 2275a0ff7c30..0d0105d2d208 100644 ...@@ -200,7 +200,7 @@ index 2275a0ff7c30..0d0105d2d208 100644
sbinfo->mode = 0777 | S_ISVTX; sbinfo->mode = 0777 | S_ISVTX;
sbinfo->uid = current_fsuid(); sbinfo->uid = current_fsuid();
sbinfo->gid = current_fsgid(); sbinfo->gid = current_fsgid();
@@ -3664,6 +3676,15 @@ static void shmem_destroy_inodecache(void) @@ -3662,6 +3674,15 @@ static void shmem_destroy_inodecache(void)
kmem_cache_destroy(shmem_inode_cachep); kmem_cache_destroy(shmem_inode_cachep);
} }
...@@ -216,7 +216,7 @@ index 2275a0ff7c30..0d0105d2d208 100644 ...@@ -216,7 +216,7 @@ index 2275a0ff7c30..0d0105d2d208 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,
@@ -3794,6 +3815,7 @@ int __init shmem_init(void) @@ -3793,6 +3814,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;
} }
......
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 9a453f3637f8..d6887a6ad79f 100644 index df6542ec3b88..f3a27241b366 100644
--- a/fs/inode.c --- a/fs/inode.c
+++ b/fs/inode.c +++ b/fs/inode.c
@@ -869,6 +869,8 @@ unsigned int get_next_ino(void) @@ -882,6 +882,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;
...@@ -12,7 +12,7 @@ index 9a453f3637f8..d6887a6ad79f 100644 ...@@ -12,7 +12,7 @@ index 9a453f3637f8..d6887a6ad79f 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;
@@ -881,7 +883,7 @@ unsigned int get_next_ino(void) @@ -894,7 +896,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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment