Commit 390e555d authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs5.x-rcN 20191223


Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
parent 495cbf39
......@@ -2,10 +2,10 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
index a50e97a63bc8..bd7c76319a85 100644
index 9d3a5c54a41d..f33398b47c42 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2822,6 +2822,19 @@ F: include/linux/audit.h
@@ -2832,6 +2832,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
......@@ -26,7 +26,7 @@ index a50e97a63bc8..bd7c76319a85 100644
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
S: Maintained
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index ab7ca5989097..80d06084b043 100644
index f6f77eaa7217..5e094699215e 100644
--- a/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,
......@@ -90,10 +90,10 @@ index 3d40771e8e7c..d62303c5472a 100644
return error;
diff --git a/fs/inode.c b/fs/inode.c
index 0f1e3b563c47..43df8452f97d 100644
index fef457a42882..aaeacde398ee 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1670,7 +1670,7 @@ EXPORT_SYMBOL(generic_update_time);
@@ -1673,7 +1673,7 @@ EXPORT_SYMBOL(generic_update_time);
* This does the actual work of updating an inodes time or version. Must have
* had called mnt_want_write() before calling this.
*/
......@@ -103,7 +103,7 @@ index 0f1e3b563c47..43df8452f97d 100644
int (*update_time)(struct inode *, struct timespec64 *, int);
diff --git a/fs/namespace.c b/fs/namespace.c
index d28d30b13043..34c8093ddb1d 100644
index 2adfe7b166a3..0f7e57e5f4b7 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -776,6 +776,12 @@ static inline int check_mnt(struct mount *mnt)
......@@ -194,10 +194,10 @@ index 4d1ff010bc5a..457f4e4a5cc1 100644
if (wait)
sync_inodes_sb(sb);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 997a530ff4e9..3dbec51c2037 100644
index e0d909d35763..3e997d7fc67f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1331,6 +1331,7 @@ extern void fasync_free(struct fasync_struct *);
@@ -1349,6 +1349,7 @@ extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
......@@ -205,7 +205,7 @@ index 997a530ff4e9..3dbec51c2037 100644
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 void f_delown(struct file *filp);
@@ -1810,6 +1811,7 @@ struct file_operations {
@@ -1835,6 +1836,7 @@ struct file_operations {
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);
int (*check_flags)(int);
......@@ -213,7 +213,7 @@ index 997a530ff4e9..3dbec51c2037 100644
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_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
@@ -1880,6 +1882,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
@@ -1905,6 +1907,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
......@@ -226,7 +226,7 @@ index 997a530ff4e9..3dbec51c2037 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_write(struct file *, const char __user *, size_t, loff_t *);
@@ -2298,6 +2306,7 @@ extern int current_umask(void);
@@ -2325,6 +2333,7 @@ extern int current_umask(void);
extern void ihold(struct inode * inode);
extern void iput(struct inode *);
extern int generic_update_time(struct inode *, struct timespec64 *, int);
......@@ -234,7 +234,7 @@ index 997a530ff4e9..3dbec51c2037 100644
/* /sys/fs */
extern struct kobject *fs_kobj;
@@ -2586,6 +2595,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
@@ -2613,6 +2622,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false;
}
#endif
......@@ -243,10 +243,10 @@ index 997a530ff4e9..3dbec51c2037 100644
extern const struct file_operations def_blk_fops;
extern const struct file_operations def_chr_fops;
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 0b0d7259276d..12d18e180348 100644
index b8a835fd611b..f452521f2e05 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -334,6 +334,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
@@ -331,6 +331,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
}
......@@ -255,7 +255,7 @@ index 0b0d7259276d..12d18e180348 100644
/*
* Acquire a lock.
*
@@ -476,6 +478,7 @@ struct lockdep_map { };
@@ -473,6 +475,7 @@ struct lockdep_map { };
#define lockdep_depth(tsk) (0)
......@@ -298,7 +298,7 @@ index 74b4911ac16d..19789fbea567 100644
+ unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 4861cf8e274b..ec87ccf82025 100644
index 233459c03b5a..407c08ac8ac8 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -153,7 +153,7 @@ static
......
......@@ -2,23 +2,23 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index bfb1c6095c7a..bddba5bb307e 100644
index 2501e6f1f965..38a6a5991da9 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -261,6 +261,7 @@ source "fs/romfs/Kconfig"
source "fs/pstore/Kconfig"
@@ -264,6 +264,7 @@ source "fs/pstore/Kconfig"
source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/erofs/Kconfig"
+source "fs/aufs/Kconfig"
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index d60089fd689b..924c16a40b00 100644
index 14231b4cf383..8765e191ebe0 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -130,3 +130,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/
obj-$(CONFIG_CEPH_FS) += ceph/
@@ -132,3 +132,4 @@ obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
obj-$(CONFIG_EROFS_FS) += erofs/
+obj-$(CONFIG_AUFS_FS) += aufs/
......@@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 80d06084b043..a83cdfec7359 100644
index 5e094699215e..22b2ecb6cfe8 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -625,6 +625,15 @@ static inline void loop_update_dio(struct loop_device *lo)
......@@ -105,7 +105,7 @@ index 80d06084b043..a83cdfec7359 100644
lo->transfer = NULL;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
@@ -1046,6 +1075,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
@@ -1056,6 +1085,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
bd_abort_claiming(bdev, claimed_bdev, loop_set_fd);
out_putf:
fput(file);
......@@ -114,7 +114,7 @@ index 80d06084b043..a83cdfec7359 100644
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
@@ -1092,6 +1123,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
@@ -1102,6 +1133,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
static int __loop_clr_fd(struct loop_device *lo, bool release)
{
struct file *filp = NULL;
......@@ -122,7 +122,7 @@ index 80d06084b043..a83cdfec7359 100644
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
int err = 0;
@@ -1115,6 +1147,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1125,6 +1157,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
......@@ -130,7 +130,7 @@ index 80d06084b043..a83cdfec7359 100644
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
@@ -1197,6 +1230,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
@@ -1207,6 +1240,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
*/
if (filp)
fput(filp);
......@@ -228,10 +228,10 @@ index a97e2921cb09..f74eb6962684 100644
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3dbec51c2037..38ab7b6c7c6d 100644
index 3e997d7fc67f..b28d4d0ecaed 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1948,6 +1948,10 @@ struct super_operations {
@@ -1973,6 +1973,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
......
......@@ -31,7 +31,7 @@ index 14c2badb8fd9..65afe5287e43 100644
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 731642e0f5a0..e8d6259de65b 100644
index 9442631fd4af..1fa8a5fcdeee 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -309,7 +309,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
......@@ -46,15 +46,15 @@ index 731642e0f5a0..e8d6259de65b 100644
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1807,7 +1810,7 @@ static int show_numa_map(struct seq_file *m, void *v)
@@ -1819,7 +1822,7 @@ static int show_numa_map(struct seq_file *m, void *v)
struct proc_maps_private *proc_priv = &numa_priv->proc_maps;
struct vm_area_struct *vma = v;
struct numa_maps *md = &numa_priv->md;
- struct file *file = vma->vm_file;
+ struct file *file = vma_pr_or_file(vma);
struct mm_struct *mm = vma->vm_mm;
struct mm_walk walk = {
.hugetlb_entry = gather_hugetlb_stats,
struct mempolicy *pol;
char buffer[64];
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 7907e6419e57..d17209cf52bc 100644
--- a/fs/proc/task_nommu.c
......@@ -72,10 +72,10 @@ index 7907e6419e57..d17209cf52bc 100644
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0334ca97c584..3bdae823daee 100644
index a2adf95b3f9c..70e1dccc1283 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1538,6 +1538,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
@@ -1510,6 +1510,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
unmap_mapping_range(mapping, holebegin, holelen, 0);
}
......@@ -105,10 +105,10 @@ index 0334ca97c584..3bdae823daee 100644
void *buf, int len, unsigned int gup_flags);
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
index 6a7a1083b6fb..461db8843e32 100644
index 270aa8fd2800..33848c2165e2 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -262,6 +262,7 @@ struct vm_region {
@@ -267,6 +267,7 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
......@@ -116,7 +116,7 @@ index 6a7a1083b6fb..461db8843e32 100644
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
@@ -336,6 +337,7 @@ struct vm_area_struct {
@@ -341,6 +342,7 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units */
struct file * vm_file; /* File we map to (can be NULL). */
......@@ -125,10 +125,10 @@ index 6a7a1083b6fb..461db8843e32 100644
#ifdef CONFIG_SWAP
diff --git a/kernel/fork.c b/kernel/fork.c
index 541fd805fb88..3208fcf3b3c9 100644
index 13b38794efb5..ede7225bae95 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -553,7 +553,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -562,7 +562,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
......@@ -138,10 +138,10 @@ index 541fd805fb88..3208fcf3b3c9 100644
atomic_dec(&inode->i_writecount);
i_mmap_lock_write(mapping);
diff --git a/mm/Makefile b/mm/Makefile
index d0b295c3b764..6156cd3d1ab0 100644
index d996846697ef..fbadb91df4e4 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
@@ -42,7 +42,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
mm_init.o mmu_context.o percpu.o slab_common.o \
compaction.o vmacache.o \
interval_tree.o list_lru.o workingset.o \
......@@ -151,10 +151,10 @@ index d0b295c3b764..6156cd3d1ab0 100644
# Give 'page_alloc' its own module-parameter namespace
page-alloc-y := page_alloc.o
diff --git a/mm/filemap.c b/mm/filemap.c
index d0cf700bf201..5cac93e7bf67 100644
index 85b7d087eb45..115275a4a0e2 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2721,7 +2721,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
@@ -2696,7 +2696,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
vm_fault_t ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
......@@ -164,7 +164,7 @@ index d0cf700bf201..5cac93e7bf67 100644
if (page->mapping != inode->i_mapping) {
unlock_page(page);
diff --git a/mm/mmap.c b/mm/mmap.c
index 7e8c3e8ae75f..d8a903f61262 100644
index a7d8c84d19b7..9c350dc3f570 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -182,7 +182,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
......@@ -176,7 +176,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
mpol_put(vma_policy(vma));
vm_area_free(vma);
return next;
@@ -931,7 +931,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
@@ -940,7 +940,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
if (remove_next) {
if (file) {
uprobe_munmap(next, next->vm_start, next->vm_end);
......@@ -185,7 +185,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
}
if (next->anon_vma)
anon_vma_merge(vma, next);
@@ -1847,8 +1847,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
@@ -1865,8 +1865,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
return addr;
unmap_and_free_vma:
......@@ -195,7 +195,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
/* Undo any partial mapping done by a device driver. */
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
@@ -2680,7 +2680,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2695,7 +2695,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
......@@ -204,7 +204,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
@@ -2699,7 +2699,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -2714,7 +2714,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
if (new->vm_ops && new->vm_ops->close)
new->vm_ops->close(new);
if (new->vm_file)
......@@ -213,7 +213,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
unlink_anon_vmas(new);
out_free_mpol:
mpol_put(vma_policy(new));
@@ -2890,7 +2890,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -2906,7 +2906,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
struct vm_area_struct *vma;
unsigned long populate = 0;
unsigned long ret = -EINVAL;
......@@ -222,7 +222,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
current->comm, current->pid);
@@ -2965,10 +2965,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
@@ -2981,10 +2981,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
......@@ -251,7 +251,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
out:
up_write(&mm->mmap_sem);
if (populate)
@@ -3258,7 +3275,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
@@ -3274,7 +3291,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
if (anon_vma_clone(new_vma, vma))
goto out_free_mempol;
if (new_vma->vm_file)
......@@ -261,7 +261,7 @@ index 7e8c3e8ae75f..d8a903f61262 100644
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
diff --git a/mm/nommu.c b/mm/nommu.c
index fed1b6e9c89b..0d43b248ed54 100644
index 99b7ec318824..de5b6cd162fe 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -552,7 +552,7 @@ static void __put_nommu_region(struct vm_region *region)
......
......@@ -22,7 +22,7 @@ index 7ce4ccf5a51c..00d7e6a08026 100644
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
index f7f6a140856a..1a740f3c42ba 100644
index 555e93c7dec8..dad39c6b3878 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -110,6 +110,7 @@ bool path_noexec(const struct path *path)
......@@ -46,7 +46,7 @@ index d62303c5472a..d4ad34463848 100644
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
diff --git a/fs/file_table.c b/fs/file_table.c
index b07b53f24ff5..34b9bbf4c556 100644
index 30d55c9a1744..34b9bbf4c556 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -162,6 +162,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred)
......@@ -57,15 +57,7 @@ index b07b53f24ff5..34b9bbf4c556 100644
/*
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
@@ -327,6 +328,7 @@ void flush_delayed_fput(void)
{
delayed_fput(NULL);
}
+EXPORT_SYMBOL_GPL(flush_delayed_fput);
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
@@ -374,6 +376,7 @@ void __fput_sync(struct file *file)
@@ -375,6 +376,7 @@ void __fput_sync(struct file *file)
}
EXPORT_SYMBOL(fput);
......@@ -74,10 +66,10 @@ index b07b53f24ff5..34b9bbf4c556 100644
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
index 43df8452f97d..8a5c14630ff0 100644
index aaeacde398ee..5be87f2d3828 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1679,6 +1679,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
@@ -1682,6 +1682,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
return update_time(inode, time, flags);
}
......@@ -86,7 +78,7 @@ index 43df8452f97d..8a5c14630ff0 100644
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
index 34c8093ddb1d..2b64af58b643 100644
index 0f7e57e5f4b7..516c2f397d33 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -431,6 +431,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
......@@ -105,7 +97,7 @@ index 34c8093ddb1d..2b64af58b643 100644
/*
* vfsmount lock must be held for write
@@ -1900,6 +1902,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -1903,6 +1905,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
......@@ -114,7 +106,7 @@ index 34c8093ddb1d..2b64af58b643 100644
static void lock_mnt_tree(struct mount *mnt)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index 0391190305cc..0b9f7f6d8390 100644
index 133f723aca07..0b9f7f6d8390 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -99,6 +99,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
......@@ -125,60 +117,8 @@ index 0391190305cc..0b9f7f6d8390 100644
/*
* Drop a reference to a group. Free it if it's through.
@@ -108,6 +109,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (refcount_dec_and_test(&group->refcnt))
fsnotify_final_destroy_group(group);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -137,6 +139,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
int fsnotify_fasync(int fd, struct file *file, int on)
{
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 99ddd126f6f0..2154d69a2c7a 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -276,6 +276,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
queue_delayed_work(system_unbound_wq, &reaper_work,
FSNOTIFY_REAPER_DELAY);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
/*
* Get mark reference when we found the mark via lockless traversal of object
@@ -430,6 +431,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark,
mutex_unlock(&group->mark_mutex);
fsnotify_free_mark(mark);
}
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
/*
* Sorting function for lists of fsnotify marks.
@@ -685,6 +687,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp,
mutex_unlock(&group->mark_mutex);
return ret;
}
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
/*
* 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,
mark->group = group;
WRITE_ONCE(mark->connector, NULL);
}
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
/*
* Destroy all marks in destroy_list, waits for SRCU period to finish before
diff --git a/fs/open.c b/fs/open.c
index a59abe3c669a..78809163ba03 100644
index b62f5c0923a8..89af4b9c7319 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -65,6 +65,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
......@@ -270,7 +210,7 @@ index 90dd78f0eb27..40b01dd1b14a 100644
ssize_t
__vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index ec87ccf82025..739d1c8a81f5 100644
index 407c08ac8ac8..d7f71842f8a2 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -174,6 +174,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
......@@ -300,10 +240,10 @@ index 725674f3276d..83f6494c52a2 100644
}
+EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
diff --git a/security/security.c b/security/security.c
index 250ee2d76406..2765042d4846 100644
index 1bc000f834e2..306f2c9f7ee2 100644
--- a/security/security.c
+++ b/security/security.c
@@ -996,6 +996,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -1036,6 +1036,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
}
......@@ -311,7 +251,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
@@ -1012,6 +1013,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -1052,6 +1053,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
return 0;
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
}
......@@ -319,7 +259,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
@@ -1020,6 +1022,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -1060,6 +1062,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
return 0;
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
}
......@@ -327,7 +267,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
@@ -1047,6 +1050,7 @@ int security_path_truncate(const struct path *path)
@@ -1087,6 +1090,7 @@ int security_path_truncate(const struct path *path)
return 0;
return call_int_hook(path_truncate, 0, path);
}
......@@ -335,7 +275,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_chmod(const struct path *path, umode_t mode)
{
@@ -1054,6 +1058,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
@@ -1094,6 +1098,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
}
......@@ -343,7 +283,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
@@ -1061,6 +1066,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -1101,6 +1106,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
return 0;
return call_int_hook(path_chown, 0, path, uid, gid);
}
......@@ -351,7 +291,7 @@ index 250ee2d76406..2765042d4846 100644
int security_path_chroot(const struct path *path)
{
@@ -1161,6 +1167,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -1201,6 +1207,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
}
......@@ -359,7 +299,7 @@ index 250ee2d76406..2765042d4846 100644
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -1338,6 +1345,7 @@ int security_file_permission(struct file *file, int mask)
@@ -1378,6 +1385,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
......
......@@ -40,7 +40,7 @@
#include <linux/limits.h>
#define AUFS_VERSION "5.x-rcN-20191021"
#define AUFS_VERSION "5.x-rcN-20191223"
/* todo? move this to linux-2.6.19/include/magic.h */
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
......
......@@ -2,7 +2,7 @@ SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN lockdep patch
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 12d18e180348..2dec42066e7a 100644
index f452521f2e05..8043dba1cceb 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -17,7 +17,7 @@ struct lockdep_map;
......@@ -15,10 +15,10 @@ index 12d18e180348..2dec42066e7a 100644
#include <linux/types.h>
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 739d1c8a81f5..f147a14a977c 100644
index d7f71842f8a2..f1a630b92260 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4692,6 +4698,7 @@ void lockdep_reset(void)
@@ -4767,6 +4773,7 @@ void lockdep_reset(void)
INIT_HLIST_HEAD(chainhash_table + i);
raw_local_irq_restore(flags);
}
......@@ -27,12 +27,12 @@ index 739d1c8a81f5..f147a14a977c 100644
/* 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,
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index cc83568d5012..68a74964daa1 100644
index 18d85aebbb57..1fe552a33fb1 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -93,15 +93,15 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_LOCKDEP_CHAINS_BITS 15
@@ -94,15 +94,15 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_STACK_TRACE_ENTRIES 262144UL
#define STACK_TRACE_HASH_SIZE 8192
#else
-#define MAX_LOCKDEP_ENTRIES 32768UL
+#define MAX_LOCKDEP_ENTRIES (32768UL << 5)
......@@ -46,6 +46,6 @@ index cc83568d5012..68a74964daa1 100644
*/
-#define MAX_STACK_TRACE_ENTRIES 524288UL
+#define MAX_STACK_TRACE_ENTRIES (524288UL << 5)
#define STACK_TRACE_HASH_SIZE 16384
#endif
#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)
......@@ -15,7 +15,7 @@ index 711a4093e475..a5703d5c7205 100644
extern const struct seq_operations mounts_op;
diff --git a/fs/namespace.c b/fs/namespace.c
index d28d30b13043..1b0fb30929c6 100644
index 2adfe7b166a3..eb4f14c2dd0e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1246,46 +1246,80 @@ struct vfsmount *mnt_clone_internal(const struct path *path)
......@@ -121,7 +121,7 @@ index d28d30b13043..1b0fb30929c6 100644
const struct seq_operations mounts_op = {
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index e16fb8f2049e..268e80d568ce 100644
index 273ee82d8aa9..e5b22c50ca59 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,
......
SPDX-License-Identifier: GPL-2.0
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 20d815a33145..64354e89a701 100644
index de8e4b71e3ba..ae8c9fcaea91 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -26,10 +26,13 @@ struct shmem_inode_info {
......@@ -20,10 +20,19 @@ index 20d815a33145..64354e89a701 100644
umode_t mode; /* Mount mode for root directory */
unsigned char huge; /* Whether to try for hugepages */
diff --git a/mm/shmem.c b/mm/shmem.c
index 2bed4761f279..ec240c1e4f96 100644
index 220be9fa2c41..56b50b2b3639 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -113,11 +113,14 @@ static unsigned long shmem_default_max_blocks(void)
@@ -110,7 +110,7 @@ struct shmem_falloc {
struct shmem_options {
unsigned long long blocks;
- unsigned long long inodes;
+ int inodes;
struct mempolicy *mpol;
kuid_t uid;
kgid_t gid;
@@ -128,11 +128,14 @@ static unsigned long shmem_default_max_blocks(void)
return totalram_pages() / 2;
}
......@@ -40,7 +49,7 @@ index 2bed4761f279..ec240c1e4f96 100644
}
#endif
@@ -1097,6 +1100,11 @@ static void shmem_evict_inode(struct inode *inode)
@@ -1112,6 +1115,11 @@ static void shmem_evict_inode(struct inode *inode)
simple_xattrs_free(&info->xattrs);
WARN_ON(inode->i_blocks);
......@@ -52,7 +61,7 @@ index 2bed4761f279..ec240c1e4f96 100644
shmem_free_inode(inode->i_sb);
clear_inode(inode);
}
@@ -2221,13 +2229,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2236,13 +2244,13 @@ 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);
......@@ -67,7 +76,7 @@ index 2bed4761f279..ec240c1e4f96 100644
inode_init_owner(inode, dir, mode);
inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
@@ -2271,6 +2279,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
@@ -2286,6 +2294,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
break;
}
......@@ -93,7 +102,7 @@ index 2bed4761f279..ec240c1e4f96 100644
lockdep_annotate_inode_mutex_key(inode);
} else
shmem_free_inode(sb);
@@ -3276,8 +3303,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
@@ -3291,8 +3318,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
{
__u32 *fh = vfh;
......@@ -103,7 +112,7 @@ index 2bed4761f279..ec240c1e4f96 100644
return ino->i_ino == inum && fh[0] == ino->i_generation;
}
@@ -3297,14 +3323,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3312,14 +3338,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
u64 inum;
......@@ -121,7 +130,7 @@ index 2bed4761f279..ec240c1e4f96 100644
if (inode) {
dentry = shmem_find_alias(inode);
iput(inode);
@@ -3316,30 +3339,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3331,30 +3354,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{
......@@ -155,25 +164,25 @@ index 2bed4761f279..ec240c1e4f96 100644
return 1;
}
@@ -3403,7 +3411,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo,
goto bad_val;
} else if (!strcmp(this_char,"nr_inodes")) {
sbinfo->max_inodes = memparse(value, &rest);
- if (*rest)
+ if (*rest || sbinfo->max_inodes < 2)
goto bad_val;
} else if (!strcmp(this_char,"mode")) {
if (remount)
@@ -3468,7 +3476,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data)
@@ -3435,7 +3443,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
break;
case Opt_nr_inodes:
ctx->inodes = memparse(param->string, &rest);
- if (*rest)
+ if (*rest || ctx->inodes < 2)
goto bad_value;
ctx->seen |= SHMEM_SEEN_INODES;
break;
@@ -3533,7 +3541,7 @@ static int shmem_reconfigure(struct fs_context *fc)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
struct shmem_sb_info config = *sbinfo;
struct shmem_options *ctx = fc->fs_private;
struct shmem_sb_info *sbinfo = SHMEM_SB(fc->root->d_sb);
- unsigned long inodes;
+ int inodes;
int error = -EINVAL;
const char *err;
config.mpol = NULL;
@@ -3517,7 +3525,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
spin_lock(&sbinfo->stat_lock);
@@ -3592,7 +3600,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",size=%luk",
sbinfo->max_blocks << (PAGE_SHIFT - 10));
if (sbinfo->max_inodes != shmem_default_max_inodes())
......@@ -182,7 +191,7 @@ index 2bed4761f279..ec240c1e4f96 100644
if (sbinfo->mode != (0777 | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -3541,6 +3549,8 @@ static void shmem_put_super(struct super_block *sb)
@@ -3616,6 +3624,8 @@ static void shmem_put_super(struct super_block *sb)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);
......@@ -191,16 +200,16 @@ index 2bed4761f279..ec240c1e4f96 100644
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
kfree(sbinfo);
@@ -3559,6 +3569,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
if (!sbinfo)
return -ENOMEM;
@@ -3656,6 +3666,8 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
#else
sb->s_flags |= SB_NOUSER;
#endif
+ mutex_init(&sbinfo->idr_lock);
+ idr_init(&sbinfo->idr);
sbinfo->mode = 0777 | S_ISVTX;
sbinfo->uid = current_fsuid();
sbinfo->gid = current_fsgid();
@@ -3664,6 +3676,15 @@ static void shmem_destroy_inodecache(void)
sbinfo->max_blocks = ctx->blocks;
sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
sbinfo->uid = ctx->uid;
@@ -3767,6 +3779,15 @@ static void shmem_destroy_inodecache(void)
kmem_cache_destroy(shmem_inode_cachep);
}
......@@ -216,7 +225,7 @@ index 2bed4761f279..ec240c1e4f96 100644
static const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.set_page_dirty = __set_page_dirty_no_writeback,
@@ -3791,6 +3812,7 @@ int __init shmem_init(void)
@@ -3907,6 +3928,7 @@ int __init shmem_init(void)
pr_err("Could not kern_mount tmpfs\n");
goto out1;
}
......
SPDX-License-Identifier: GPL-2.0
diff --git a/fs/inode.c b/fs/inode.c
index 0f1e3b563c47..b3154d597a9c 100644
index fef457a42882..466c685248c2 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -882,6 +882,8 @@ unsigned int get_next_ino(void)
@@ -885,6 +885,8 @@ unsigned int get_next_ino(void)
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
......@@ -12,7 +12,7 @@ index 0f1e3b563c47..b3154d597a9c 100644
#ifdef CONFIG_SMP
if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) {
static atomic_t shared_last_ino;
@@ -894,7 +896,7 @@ unsigned int get_next_ino(void)
@@ -897,7 +899,7 @@ unsigned int get_next_ino(void)
res++;
/* get_next_ino should not provide a 0 inode number */
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