aufs5.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
-index f1046cf6ad85..95c957c2e2c3 100644
+index 7b623e9fc1b0..9070b9159188 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
-@@ -262,6 +262,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 c9aea23aba56..57c6f47b0185 100644
+index 1148c555c4d3..ed6ff7ddc478 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -130,3 +130,4 @@ obj-$(CONFIG_F2FS_FS) += f2fs/
- obj-$(CONFIG_CEPH_FS) += ceph/
+@@ -133,3 +133,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/
SPDX-License-Identifier: GPL-2.0
aufs5.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
-index a6954776a37e..c30c2d323711 100644
+index cf6ccca6e61c..c3b9b0d405fd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -2769,6 +2769,19 @@ F: include/linux/audit.h
+@@ -2877,6 +2877,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
S: Maintained
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index f11b7dc16e9d..1b723737592b 100644
+index 739b372a5112..872e3b3a7693 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -746,6 +746,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -750,6 +750,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
return error;
}
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
-index c435398f2c81..a688a042d022 100644
+index b280e07e162b..046000653e4d 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
-@@ -1247,7 +1247,7 @@ enum d_walk_ret {
+@@ -1266,7 +1266,7 @@ enum d_walk_ret {
*
* The @enter() callbacks are called with d_lock held.
*/
{
struct dentry *this_parent;
diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 3d40771e8e7c..d62303c5472a 100644
+index 9bc167562ee8..b0935c67bd1e 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -32,7 +32,7 @@
#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
-static int setfl(int fd, struct file * filp, unsigned long arg)
-+int setfl(int fd, struct file * filp, unsigned long arg)
++int setfl(int fd, struct file *filp, unsigned long arg)
{
struct inode * inode = file_inode(filp);
int error = 0;
return error;
diff --git a/fs/inode.c b/fs/inode.c
-index df6542ec3b88..407d7b45e2ee 100644
+index 96d62d97694e..31796c1040d6 100644
--- a/fs/inode.c
+++ b/fs/inode.c
-@@ -1670,7 +1670,7 @@ EXPORT_SYMBOL(generic_update_time);
+@@ -1680,7 +1680,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.
*/
int (*update_time)(struct inode *, struct timespec64 *, int);
diff --git a/fs/namespace.c b/fs/namespace.c
-index b26778bdc236..b460383a4228 100644
+index 5e1bf611a9eb..c05ac2488abb 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
-@@ -770,6 +770,12 @@ static inline int check_mnt(struct mount *mnt)
+@@ -776,6 +776,12 @@ static inline int check_mnt(struct mount *mnt)
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}
* vfsmount lock must be held for write
*/
diff --git a/fs/read_write.c b/fs/read_write.c
-index c543d965e288..35ab54e0a994 100644
+index 5bbf587f5bc1..fa9b3994b34c 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -498,6 +498,28 @@ static ssize_t __vfs_write(struct file *file, const char __user *p,
+ return fop->read;
+ if (fop->read_iter)
+ return new_sync_read;
-+ return ERR_PTR(-ENOSYS);
++ return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */
+}
+
+vfs_writef_t vfs_writef(struct file *file)
+ return fop->write;
+ if (fop->write_iter)
+ return new_sync_write;
-+ return ERR_PTR(-ENOSYS);
++ return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */
+}
+
ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
-index 14cb602d9a2f..58d2692c5f30 100644
+index 3009652a41c8..d9bcc4a71a0a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -834,8 +834,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -849,8 +849,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -851,9 +851,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -866,9 +866,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.
*/
if (wait)
sync_inodes_sb(sb);
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index f7fdfe93e25d..28593b894e7b 100644
+index 98e0349adb52..5fc7807f7c2e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1333,6 +1333,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);
-+extern int setfl(int fd, struct file * filp, unsigned long arg);
++extern int setfl(int fd, struct file *filp, unsigned long arg);
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);
-@@ -1812,6 +1813,7 @@ struct file_operations {
+@@ -1842,6 +1843,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);
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);
-@@ -1882,6 +1884,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
+@@ -1912,6 +1914,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
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 *);
-@@ -2315,6 +2323,7 @@ extern int current_umask(void);
+@@ -2332,6 +2340,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);
/* /sys/fs */
extern struct kobject *fs_kobj;
-@@ -2603,6 +2612,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
+@@ -2620,6 +2629,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
return false;
}
#endif
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 6e2377e6c1d6..5a945d18a72a 100644
+index c50d01ef1414..4f4677020360 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
-@@ -325,6 +325,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;
}
/*
* Acquire a lock.
*
-@@ -463,6 +465,7 @@ struct lockdep_map { };
+@@ -472,6 +474,7 @@ struct lockdep_map { };
#define lockdep_depth(tsk) (0)
+ unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index c47788fa85f9..3c35a1059890 100644
+index 32406ef0d6a2..e52169c2086b 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
-@@ -152,7 +152,7 @@ static
- #endif
+@@ -153,7 +153,7 @@ static
struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
+ static DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
-static inline struct lock_class *hlock_class(struct held_lock *hlock)
+inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
{
- if (!hlock->class_idx) {
- /*
-@@ -163,6 +163,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
- }
- return lock_classes + hlock->class_idx - 1;
+ unsigned int class_idx = hlock->class_idx;
+
+@@ -174,6 +174,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
+ */
+ return lock_classes + class_idx;
}
+#define hlock_class(hlock) lockdep_hlock_class(hlock)
aufs5.x-rcN mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 9c8ca6cd3ce4..2ae2c94aceca 100644
+index ebea9501afb8..dc7edc5f7267 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
-@@ -2014,7 +2014,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
- down_read(&mm->mmap_sem);
+@@ -2037,7 +2037,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
+ rc = -ENOENT;
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
- *path = vma->vm_file->f_path;
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 01d4eb0e6bd1..fedfaa012768 100644
+index 9442631fd4af..1fa8a5fcdeee 100644
--- a/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)
+@@ -309,7 +309,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
const char *name = NULL;
if (file) {
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1761,7 +1764,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 36bf0f2e102e..8df6cbc58756 100644
+index 7907e6419e57..d17209cf52bc 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
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 0e8834ac32b7..b3f42f01aaf0 100644
+index cfaa8feecfe8..b66c4c536ac5 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
-@@ -1542,6 +1542,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
+@@ -1495,6 +1495,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
unmap_mapping_range(mapping, holebegin, holelen, 0);
}
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 8ec38b11b361..d3f5492a2611 100644
+index 270aa8fd2800..33848c2165e2 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
-@@ -253,6 +253,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 */
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -327,6 +328,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). */
+ struct file *vm_prfile; /* shadow of vm_file */
void * vm_private_data; /* was vm_pte (shared mem) */
- atomic_long_t swap_readahead_info;
+ #ifdef CONFIG_SWAP
diff --git a/kernel/fork.c b/kernel/fork.c
-index 75675b9bf6df..dc333a5e6926 100644
+index 080809560072..968e4dc2279f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -549,7 +549,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
+@@ -565,7 +565,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
atomic_dec(&inode->i_writecount);
i_mmap_lock_write(mapping);
diff --git a/mm/Makefile b/mm/Makefile
-index ac5e5ba78874..5decb22d13a0 100644
+index 1937cc251883..778c1e399903 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 \
-- debug.o $(mmu-y)
-+ prfile.o debug.o $(mmu-y)
+- debug.o gup.o $(mmu-y)
++ prfile.o debug.o gup.o $(mmu-y)
# 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 df2006ba0cfa..d5221dedfe56 100644
+index bf6aa30be58d..32ca075c0c8b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
-@@ -2671,7 +2671,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
+@@ -2675,7 +2675,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
vm_fault_t ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
if (page->mapping != inode->i_mapping) {
unlock_page(page);
diff --git a/mm/mmap.c b/mm/mmap.c
-index 7e8c3e8ae75f..d8a903f61262 100644
+index 71e4ffc83bcd..7256e8b985eb 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 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
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,
+@@ -909,7 +909,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);
}
if (next->anon_vma)
anon_vma_merge(vma, next);
-@@ -1847,8 +1847,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1837,8 +1837,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
return addr;
unmap_and_free_vma:
/* 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,
+@@ -2667,7 +2667,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_file)
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,
+@@ -2686,7 +2686,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)
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,
+@@ -2878,7 +2878,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;
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,
+@@ -2953,10 +2953,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
}
}
out:
up_write(&mm->mmap_sem);
if (populate)
-@@ -3258,7 +3275,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -3247,7 +3264,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)
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 d8c02fbe03b5..22dae8b7216a 100644
+index bd2b4e5ef144..acdab5253263 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
-@@ -640,7 +640,7 @@ static void __put_nommu_region(struct vm_region *region)
+@@ -563,7 +563,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
-@@ -778,7 +778,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -695,7 +695,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
put_nommu_region(vma->vm_region);
vm_area_free(vma);
}
-@@ -1301,7 +1301,7 @@ unsigned long do_mmap(struct file *file,
+@@ -1218,7 +1218,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free;
}
}
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
-@@ -1376,10 +1376,10 @@ unsigned long do_mmap(struct file *file,
+@@ -1295,10 +1295,10 @@ unsigned long do_mmap(struct file *file,
up_write(&nommu_region_sem);
error:
if (region->vm_file)
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
-index 000000000000..024cdcfae1b1
+index 000000000000..00d51187c325
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
+ *
+ * See Documentation/filesystems/aufs/design/06mmap.txt
+ *
-+ * Copyright (c) 2014-2019 Junjro R. Okajima
++ * Copyright (c) 2014-2020 Junjro R. Okajima
+ * Copyright (c) 2014 Ian Campbell
+ */
+
aufs5.x-rcN standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
-index a688a042d022..3fc74e471924 100644
+index 046000653e4d..15aa871d1b45 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
-@@ -1352,6 +1352,7 @@ void d_walk(struct dentry *parent, void *data,
+@@ -1371,6 +1371,7 @@ void d_walk(struct dentry *parent, void *data,
seq = 1;
goto again;
}
struct check_mount {
struct vfsmount *mnt;
-@@ -2850,6 +2851,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
+@@ -2916,6 +2917,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
write_sequnlock(&rename_lock);
}
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
-index 89a500bb897a..1a722915ed77 100644
+index 74d88dab98dd..71eb4fcace94 100644
--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -110,6 +110,7 @@ bool path_noexec(const struct path *path)
+@@ -109,6 +109,7 @@ bool path_noexec(const struct path *path)
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
}
#ifdef CONFIG_USELIB
/*
diff --git a/fs/fcntl.c b/fs/fcntl.c
-index d62303c5472a..d4ad34463848 100644
+index b0935c67bd1e..07251ba86c31 100644
--- a/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)
out:
return error;
}
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)
/*
* 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);
void __init files_init(void)
{
diff --git a/fs/inode.c b/fs/inode.c
-index 407d7b45e2ee..b4d3e100abd0 100644
+index 31796c1040d6..217169541ac4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
-@@ -1679,6 +1679,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
+@@ -1689,6 +1689,7 @@ int update_time(struct inode *inode, struct timespec64 *time, int flags)
return update_time(inode, time, flags);
}
/**
* touch_atime - update the access time
diff --git a/fs/namespace.c b/fs/namespace.c
-index b460383a4228..b74d15701ed7 100644
+index c05ac2488abb..100b7839c8b0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
-@@ -436,6 +436,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+@@ -431,6 +431,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
/**
* mnt_drop_write - give up write access to a mount
-@@ -775,6 +776,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
+@@ -781,6 +782,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
/*
* vfsmount lock must be held for write
-@@ -1908,6 +1910,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;
}
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)
/*
* 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 25eb247ea85a..6a2a2f722eae 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.
-@@ -677,6 +679,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
-@@ -801,6 +804,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 b5b80469b93d..eb818f6b9519 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,
long vfs_truncate(const struct path *path, loff_t length)
{
diff --git a/fs/read_write.c b/fs/read_write.c
-index 35ab54e0a994..9da238d64ea4 100644
+index fa9b3994b34c..eb0e2c6ebaff 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -468,6 +468,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
{
@@ -508,6 +509,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read;
- return ERR_PTR(-ENOSYS);
+ return ERR_PTR(-ENOSYS); /* doesn't have ->read(|_iter)() op */
}
+EXPORT_SYMBOL_GPL(vfs_readf);
{
@@ -519,6 +521,7 @@ vfs_writef_t vfs_writef(struct file *file)
return new_sync_write;
- return ERR_PTR(-ENOSYS);
+ return ERR_PTR(-ENOSYS); /* doesn't have ->write(|_iter)() op */
}
+EXPORT_SYMBOL_GPL(vfs_writef);
/* 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
-index 58d2692c5f30..4fe4afa7f6b1 100644
+index d9bcc4a71a0a..bf8725e99070 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -847,6 +847,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -862,6 +862,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
/*
* Attempt to initiate a splice from a file to a pipe.
-@@ -876,6 +877,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -891,6 +892,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
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 3c35a1059890..67dccde036a2 100644
+index e52169c2086b..d9bc5cbe9078 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
-@@ -163,6 +163,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
- }
- return lock_classes + hlock->class_idx - 1;
+@@ -174,6 +174,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
+ */
+ return lock_classes + class_idx;
}
+EXPORT_SYMBOL_GPL(lockdep_hlock_class);
#define hlock_class(hlock) lockdep_hlock_class(hlock)
}
}
+EXPORT_SYMBOL_GPL(task_work_run);
-diff --git a/security/device_cgroup.c b/security/device_cgroup.c
-index dc28914fa72e..c2ddfea2b280 100644
---- a/security/device_cgroup.c
-+++ b/security/device_cgroup.c
-@@ -824,3 +824,4 @@ int __devcgroup_check_permission(short type, u32 major, u32 minor,
-
- return 0;
- }
-+EXPORT_SYMBOL_GPL(__devcgroup_check_permission);
diff --git a/security/security.c b/security/security.c
-index f493db0bf62a..96f118be469f 100644
+index cd2d18d2d279..fbf716450399 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -993,6 +993,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);
}
int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
-@@ -1009,6 +1010,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);
}
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
-@@ -1017,6 +1019,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);
}
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
-@@ -1044,6 +1047,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);
}
int security_path_chmod(const struct path *path, umode_t mode)
{
-@@ -1051,6 +1055,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);
}
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
-@@ -1058,6 +1063,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);
}
int security_path_chroot(const struct path *path)
{
-@@ -1158,6 +1164,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);
}
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
-@@ -1335,6 +1342,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);
}
int security_file_alloc(struct file *file)
{
diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Documentation/ABI/testing/debugfs-aufs
---- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/ABI/testing/debugfs-aufs 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/ABI/testing/debugfs-aufs 2019-07-11 15:42:14.455570938 +0200
@@ -0,0 +1,55 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
+ When the aufs mount option 'noxino' is specified, it
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs
---- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/ABI/testing/sysfs-aufs 2019-07-11 15:42:14.455570938 +0200
@@ -0,0 +1,31 @@
+What: /sys/fs/aufs/si_<id>/
+Date: March 2009
+ When the aufs mount option 'noxino' is specified, it
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt 2020-01-27 10:57:18.162204582 +0100
@@ -0,0 +1,171 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+helper, instead of doing in kernel space. Actually I am still thinking
+about it. But currently I have implemented it in kernel space.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt 2020-01-27 10:57:18.162204582 +0100
@@ -0,0 +1,258 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+
+For this purpose, use "aumvdown" command in aufs-util.git.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2020-01-27 10:57:18.162204582 +0100
@@ -0,0 +1,85 @@
+
-+# Copyright (C) 2015-2019 Junjiro R. Okajima
++# Copyright (C) 2015-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+ done by VFS:do_last(), lookup_open() and atomic_open(). some can
+ be implemented in aufs, but not all I am afraid.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,113 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+ aufs performance when system surely hide the aufs branches from user,
+ by over-mounting something (or another method).
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,74 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+ - a regular file on the branch is opened for write and there is no
+ same named entry on the upper branch.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,64 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+ one. If the selected branch is readonly, then aufs follows the
+ copyup policy.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot linux/Documentation/filesystems/aufs/design/06dirren.dot
---- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.dot 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2019-07-11 15:42:14.458904362 +0200
@@ -0,0 +1,31 @@
+
+// to view this graph, run dot(1) command in GRAPHVIZ.
+aufs_lookup -> whinfo [label="load/remove"];
+}
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt linux/Documentation/filesystems/aufs/design/06dirren.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/06dirren.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,102 @@
+
-+# Copyright (C) 2017-2019 Junjiro R. Okajima
++# Copyright (C) 2017-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+UDBA handler may not work correctly. In this case, the behaviour will be
+equivalen to udba=reval case.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,120 @@
+
-+# Copyright (C) 2011-2019 Junjiro R. Okajima
++# Copyright (C) 2011-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+And of course, in every step, an error may happen. So the operation
+should restore the original file state after an error happens.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,72 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+
+I have to give up this "looks-smater" approach.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,96 @@
+
-+# Copyright (C) 2014-2019 Junjiro R. Okajima
++# Copyright (C) 2014-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+Do we need another attribute to stop copying XATTR? I am unsure. For
+now, aufs implements the branch attributes to ignore the error.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/07export.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,58 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+- readdir(): call lockdep_on/off() because filldir in NFSD calls
+ lookup_one_len(), vfs_getattr(), encode_fh() and others.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,52 @@
+
-+# Copyright (C) 2005-2019 Junjiro R. Okajima
++# Copyright (C) 2005-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+This new squashfs archive can be stored on the boot device and the
+initramfs will use it to replace the old one at the next boot.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
---- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2019-07-11 21:21:54.375717654 +0800
+--- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,47 @@
+
-+# Copyright (C) 2010-2019 Junjiro R. Okajima
++# Copyright (C) 2010-2020 Junjiro R. Okajima
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+Currently this approach is applied to address_space_operations for
+regular files only.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
---- /usr/share/empty/Documentation/filesystems/aufs/README 1970-01-01 08:00:00.000000000 +0800
-+++ linux/Documentation/filesystems/aufs/README 2019-07-11 21:21:54.375717654 +0800
-@@ -0,0 +1,399 @@
+--- /usr/share/empty/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100
++++ linux/Documentation/filesystems/aufs/README 2020-01-23 09:59:36.748660743 +0100
+@@ -0,0 +1,401 @@
+
+Aufs5 -- advanced multi layered unification filesystem version 5.x
+http://aufs.sf.net
+ the internal locks for LOCKDEP is necessary. LOCKDEP is a debugging
+ feature of linux kernel. If you enable CONFIG_LOCKDEP, then you will
+ need to apply this debug patch to expand several constant values.
-+ If don't know what LOCKDEP is, then you don't have apply this patch.
++ If you don't know what LOCKDEP is, then you don't have apply this
++ patch.
+
+
+4. Usage
+ system, instead of the date you downloaded.
+- configuration (define/undefine CONFIG_AUFS_xxx)
+- kernel configuration or /proc/config.gz (if you have it)
++- LSM (linux security module, if you are using)
+- behaviour which you think to be incorrect
+- actual operation, reproducible one is better
+- mailto: aufs-users at lists.sourceforge.net
+# mode: text;
+# End: ;
diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
---- /usr/share/empty/fs/aufs/aufs.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/aufs.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/aufs.h 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
---- /usr/share/empty/fs/aufs/branch.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/branch.c 2019-07-11 21:21:54.379051070 +0800
-@@ -0,0 +1,1423 @@
+--- /usr/share/empty/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/branch.c 2020-01-27 10:57:18.165538015 +0100
+@@ -0,0 +1,1428 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ unsigned char verbose, writer;
+ struct file *file, *hf, **array;
+ struct au_hfile *hfile;
++ struct inode *h_inode;
+
+ mnt_flags = au_mntflags(sb);
+ verbose = !!au_opt_test(mnt_flags, VERBOSE);
+ hf->f_mode &= ~(FMODE_WRITE | FMODE_WRITER);
+ spin_unlock(&hf->f_lock);
+ if (writer) {
-+ put_write_access(file_inode(hf));
++ h_inode = file_inode(hf);
++ put_write_access(h_inode);
+ __mnt_drop_write(hf->f_path.mnt);
++ if ((hf->f_mode & (FMODE_READ | FMODE_WRITE))
++ == FMODE_READ)
++ i_readcount_inc(h_inode);
+ }
+ }
+
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
---- /usr/share/empty/fs/aufs/branch.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/branch.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/branch.h 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,366 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_BRANCH_H__ */
diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
---- /usr/share/empty/fs/aufs/conf.mk 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/conf.mk 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/conf.mk 2019-07-11 15:42:14.462237786 +0200
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0
+
+
+-include ${srctree}/${src}/conf_priv.mk
diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
---- /usr/share/empty/fs/aufs/cpup.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/cpup.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/cpup.c 2020-01-27 10:57:18.165538015 +0100
@@ -0,0 +1,1458 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
---- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/cpup.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/cpup.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_CPUP_H__ */
diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
---- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dbgaufs.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dbgaufs.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,526 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
---- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dbgaufs.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dbgaufs.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __DBGAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
---- /usr/share/empty/fs/aufs/dcsub.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dcsub.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dcsub.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,225 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return path_is_under(path + 0, path + 1);
+}
diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
---- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dcsub.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dcsub.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,137 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DCSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
---- /usr/share/empty/fs/aufs/debug.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/debug.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/debug.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,441 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return 0;
+}
diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
---- /usr/share/empty/fs/aufs/debug.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/debug.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/debug.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,226 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DEBUG_H__ */
diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
---- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dentry.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dentry.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,1154 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ .d_release = aufs_d_release
+};
diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
---- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dentry.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dentry.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,268 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DENTRY_H__ */
diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
---- /usr/share/empty/fs/aufs/dinfo.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dinfo.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dinfo.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,554 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return -1;
+}
diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
---- /usr/share/empty/fs/aufs/dir.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dir.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dir.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,763 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ .fsync = aufs_fsync_dir
+};
diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
---- /usr/share/empty/fs/aufs/dir.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dir.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dir.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,134 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DIR_H__ */
diff -urN /usr/share/empty/fs/aufs/dirren.c linux/fs/aufs/dirren.c
---- /usr/share/empty/fs/aufs/dirren.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dirren.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dirren.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dirren.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,1316 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2017-2019 Junjiro R. Okajima
++ * Copyright (C) 2017-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ found = 0;
+ idx = au_dr_ihash(ino);
+ hbl = dr->dr_h_ino + idx;
-+#if 0
++#if 0 /* debug print */
+ {
+ struct hlist_bl_node *tmp;
+
+ err = 0;
+ if (!lkup->dirren.drinfo)
+ goto out;
-+ AuDebugOn(lkup->dirren.ninfo < btgt + 1);
-+ drinfo = lkup->dirren.drinfo[btgt + 1];
++ AuDebugOn(lkup->dirren.ninfo <= btgt);
++ drinfo = lkup->dirren.drinfo[btgt];
+ if (!drinfo)
+ goto out;
+
+ match = 1;
+ if (!lkup->dirren.drinfo)
+ goto out;
-+ AuDebugOn(lkup->dirren.ninfo < bindex + 1);
-+ drinfo = lkup->dirren.drinfo[bindex + 1];
++ AuDebugOn(lkup->dirren.ninfo <= bindex);
++ drinfo = lkup->dirren.drinfo[bindex];
+ if (!drinfo)
+ goto out;
+
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
---- /usr/share/empty/fs/aufs/dirren.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dirren.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dirren.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dirren.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,140 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2017-2019 Junjiro R. Okajima
++ * Copyright (C) 2017-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DIRREN_H__ */
diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
---- /usr/share/empty/fs/aufs/dynop.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dynop.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dynop.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,367 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2010-2019 Junjiro R. Okajima
++ * Copyright (C) 2010-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ WARN_ON(!hlist_bl_empty(dynop + i));
+}
diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
---- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/dynop.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/dynop.h 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2010-2019 Junjiro R. Okajima
++ * Copyright (C) 2010-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_DYNOP_H__ */
diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
---- /usr/share/empty/fs/aufs/export.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/export.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/export.c 2020-01-27 10:57:18.168871450 +0100
@@ -0,0 +1,838 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ atomic_set(&sbinfo->si_xigen_next, u);
+}
diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
---- /usr/share/empty/fs/aufs/fhsm.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/fhsm.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/fhsm.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/fhsm.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,427 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2011-2019 Junjiro R. Okajima
++ * Copyright (C) 2011-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ seq_printf(seq, ",fhsm_sec=%u", u);
+}
diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
---- /usr/share/empty/fs/aufs/file.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/file.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/file.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,863 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* CONFIG_AUFS_DEBUG */
+};
diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
---- /usr/share/empty/fs/aufs/file.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/file.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/file.h 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,342 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FILE_H__ */
diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
---- /usr/share/empty/fs/aufs/finfo.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/finfo.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/finfo.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
---- /usr/share/empty/fs/aufs/f_op.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/f_op.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/f_op.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,819 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ if (unlikely(err))
+ goto out;
+
-+ err = -ENOSYS;
++ err = -ENOSYS; /* the branch doesn't have its ->(read|write)_iter() */
+ iter = NULL;
+ if (rw == MAY_READ)
+ iter = h_file->f_op->read_iter;
+/* ---------------------------------------------------------------------- */
+
+/* no one supports this operation, currently */
-+#if 0
++#if 0 /* reserved for future use */
+static ssize_t aufs_sendpage(struct file *file, struct page *page, int offset,
+ size_t len, loff_t *pos, int more)
+{
+ .setfl = aufs_setfl,
+ .splice_write = aufs_splice_write,
+ .splice_read = aufs_splice_read,
-+#if 0
++#if 0 /* reserved for future use */
+ .aio_splice_write = aufs_aio_splice_write,
+ .aio_splice_read = aufs_aio_splice_read,
+#endif
+ .copy_file_range = aufs_copy_file_range
+};
diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
---- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/fstype.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/fstype.h 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,401 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_FSTYPE_H__ */
diff -urN /usr/share/empty/fs/aufs/hbl.h linux/fs/aufs/hbl.h
---- /usr/share/empty/fs/aufs/hbl.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/hbl.h 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/hbl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/hbl.h 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,65 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2017-2019 Junjiro R. Okajima
++ * Copyright (C) 2017-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_HBL_H__ */
diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
---- /usr/share/empty/fs/aufs/hfsnotify.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/hfsnotify.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/hfsnotify.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,288 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ .init_br = au_hfsn_init_br
+};
diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
---- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/hfsplus.c 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/hfsplus.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2010-2019 Junjiro R. Okajima
++ * Copyright (C) 2010-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ }
+}
diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
---- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/hnotify.c 2019-07-11 21:21:54.379051070 +0800
-@@ -0,0 +1,721 @@
+--- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/hnotify.c 2020-01-27 10:57:18.172204883 +0100
+@@ -0,0 +1,715 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+
+out_dpages:
+ au_dpages_free(&dpages);
-+
-+#if 0
-+ /* discard children */
-+ dentry_unhash(dentry);
-+ dput(dentry);
-+#endif
+out:
+ return err;
+}
+ au_hn_destroy_cache();
+}
diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
---- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/iinfo.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/iinfo.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,286 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ AuRwDestroy(&iinfo->ii_rwsem);
+}
diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
---- /usr/share/empty/fs/aufs/inode.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/inode.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/inode.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,529 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ struct dentry *h_dentry;
+ struct inode *h_inode;
+ struct au_iinfo *iinfo;
-+ struct inode_operations *iop;
++ const struct inode_operations *iop;
+
+ IiMustWriteLock(inode);
+
+ return au_test_h_perm(h_inode, mask);
+}
diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
---- /usr/share/empty/fs/aufs/inode.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/inode.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/inode.h 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,698 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ AuIop_OTHER,
+ AuIop_Last
+};
-+extern struct inode_operations aufs_iop[AuIop_Last],
++extern struct inode_operations aufs_iop[AuIop_Last], /* not const */
+ aufs_iop_nogetattr[AuIop_Last];
+
+/* au_wr_dir flags */
+#endif /* __KERNEL__ */
+#endif /* __AUFS_INODE_H__ */
diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
---- /usr/share/empty/fs/aufs/ioctl.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/ioctl.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/ioctl.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,220 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+}
+#endif
diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
---- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/i_op_add.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/i_op_add.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,936 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
---- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/i_op.c 2019-07-11 21:21:54.379051070 +0800
-@@ -0,0 +1,1507 @@
+--- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/i_op.c 2020-01-27 10:57:18.172204883 +0100
+@@ -0,0 +1,1498 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ if (!err)
+ err = security_inode_permission(h_inode, mask);
+
-+#if 0
-+ if (!err) {
-+ /* todo: do we need to call ima_path_check()? */
-+ struct path h_path = {
-+ .dentry =
-+ .mnt = h_mnt
-+ };
-+ err = ima_path_check(&h_path,
-+ mask & (MAY_READ | MAY_WRITE | MAY_EXEC),
-+ IMA_COUNT_LEAVE);
-+ }
-+#endif
-+
+out:
+ return err;
+}
+ sb = inode->i_sb;
+ si_read_lock(sb, AuLock_FLUSH);
+ ii_read_lock_child(inode);
-+#if 0
++#if 0 /* reserved for future use */
++ /*
++ * This test may be rather 'too much' since the test is essentially done
++ * in the aufs_lookup(). Theoretically it is possible that the inode
++ * generation doesn't match to the superblock's here. But it isn't a
++ * big deal I suppose.
++ */
+ err = au_iigen_test(inode, au_sigen(sb));
+ if (unlikely(err))
+ goto out;
+ if (inode)
+ atomic_inc(&inode->i_count);
+ ret = d_splice_alias(inode, dentry);
-+#if 0
++#if 0 /* reserved for future use */
+ if (unlikely(d_need_lookup(dentry))) {
+ spin_lock(&dentry->d_lock);
+ dentry->d_flags &= ~DCACHE_NEED_LOOKUP;
+
+static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
+{
-+#if !defined(CONFIG_RWSEM_GENERIC_SPINLOCK) && defined(CONFIG_RWSEM_SPIN_ON_OWNER)
-+ p->hdir->hi_inode->i_rwsem.owner = task;
-+#endif
++ atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
+}
+
+void au_pin_hdir_acquire_nest(struct au_pin *p)
+{
+ if (p->hdir) {
+ au_pin_hdir_set_owner(p, p->task);
-+ rwsem_release(&p->hdir->hi_inode->i_rwsem.dep_map, 1, _RET_IP_);
++ rwsem_release(&p->hdir->hi_inode->i_rwsem.dep_map, _RET_IP_);
+ }
+}
+
+ }
+};
diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
---- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/i_op_del.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/i_op_del.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,513 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
---- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/i_op_ren.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/i_op_ren.c 2020-01-27 10:57:18.172204883 +0100
@@ -0,0 +1,1250 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ }
+
+ BUG_ON(d_is_positive(a->dst_h_dentry) && a->src_btop != a->btgt);
-+#if 0
++#if 0 /* debugging */
+ BUG_ON(!au_ftest_ren(a->auren_flags, DIRREN)
+ && d_is_positive(a->dst_h_dentry)
+ && a->src_btop != a->btgt);
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
---- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/Kconfig 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/Kconfig 2019-07-11 15:42:14.458904362 +0200
@@ -0,0 +1,199 @@
+# SPDX-License-Identifier: GPL-2.0
+config AUFS_FS
+ When aufs supports Magic SysRq, enabled automatically.
+endif
diff -urN /usr/share/empty/fs/aufs/lcnt.h linux/fs/aufs/lcnt.h
---- /usr/share/empty/fs/aufs/lcnt.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/lcnt.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/lcnt.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/lcnt.h 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,186 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2018-2019 Junjiro R. Okajima
++ * Copyright (C) 2018-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_LCNT_H__ */
diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
---- /usr/share/empty/fs/aufs/loop.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/loop.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/loop.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ au_kfree_try_rcu(au_warn_loopback_array);
+}
diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
---- /usr/share/empty/fs/aufs/loop.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/loop.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/loop.h 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_LOOP_H__ */
diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
---- /usr/share/empty/fs/aufs/magic.mk 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/magic.mk 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/magic.mk 2019-07-11 15:42:14.468904634 +0200
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0
+
+ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b
+endif
diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
---- /usr/share/empty/fs/aufs/Makefile 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/Makefile 2019-07-11 21:21:54.379051070 +0800
+--- /usr/share/empty/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/Makefile 2019-07-11 15:42:14.462237786 +0200
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0
+
+aufs-$(CONFIG_AUFS_DEBUG) += debug.o
+aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
---- /usr/share/empty/fs/aufs/module.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/module.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/module.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,273 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+module_init(aufs_init);
+module_exit(aufs_exit);
diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
---- /usr/share/empty/fs/aufs/module.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/module.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/module.h 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,166 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_MODULE_H__ */
diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
---- /usr/share/empty/fs/aufs/mvdown.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/mvdown.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/mvdown.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/mvdown.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,706 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2011-2019 Junjiro R. Okajima
++ * Copyright (C) 2011-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
---- /usr/share/empty/fs/aufs/opts.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/opts.c 2019-07-11 21:21:54.382384486 +0800
-@@ -0,0 +1,1877 @@
+--- /usr/share/empty/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/opts.c 2020-01-27 10:57:18.175538316 +0100
+@@ -0,0 +1,1880 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ case Opt_wsum:
+ au_opt_clr(sbinfo->si_mntflags, SUM);
+ au_opt_set(sbinfo->si_mntflags, SUM_W);
++ break;
+ case Opt_nosum:
+ au_opt_clr(sbinfo->si_mntflags, SUM);
+ au_opt_clr(sbinfo->si_mntflags, SUM_W);
+ if (opt->add.bindex < 0)
+ opt->add.bindex = 0;
+ goto add;
++ /* Always goto add, not fallthrough */
+ case Opt_prepend:
+ opt->add.bindex = 0;
++ /* fallthrough */
+ add: /* indented label */
+ case Opt_add:
+ err = au_br_add(sb, &opt->add,
+ if ((br->br_perm & AuBrAttr_ICEX)
+ && !h_dir->i_op->listxattr)
+ br->br_perm &= ~AuBrAttr_ICEX;
-+#if 0
++#if 0 /* untested */
+ if ((br->br_perm & AuBrAttr_ICEX_SEC)
+ && (au_br_sb(br)->s_flags & SB_NOSEC))
+ br->br_perm &= ~AuBrAttr_ICEX_SEC;
+ return au_mntflags(sb) & AuOptMask_UDBA;
+}
diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
---- /usr/share/empty/fs/aufs/opts.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/opts.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/opts.h 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,225 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_OPTS_H__ */
diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
---- /usr/share/empty/fs/aufs/plink.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/plink.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/plink.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,516 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ }
+}
diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
---- /usr/share/empty/fs/aufs/poll.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/poll.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/poll.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return mask;
+}
diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
---- /usr/share/empty/fs/aufs/posix_acl.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/posix_acl.c 2019-07-11 21:21:54.382384486 +0800
-@@ -0,0 +1,103 @@
+--- /usr/share/empty/fs/aufs/posix_acl.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/posix_acl.c 2020-01-27 10:57:18.175538316 +0100
+@@ -0,0 +1,105 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2014-2019 Junjiro R. Okajima
++ * Copyright (C) 2014-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+
+ /* always topmost only */
+ acl = get_acl(h_inode, type);
-+ if (!IS_ERR_OR_NULL(acl))
++ if (IS_ERR(acl))
++ forget_cached_acl(inode, type);
++ else
+ set_cached_acl(inode, type, acl);
+
+out:
+ }
+
+ ssz = au_sxattr(dentry, inode, &arg);
++ /* forget even it if succeeds since the branch might set differently */
++ forget_cached_acl(inode, type);
+ dput(dentry);
+ err = ssz;
-+ if (ssz >= 0) {
++ if (ssz >= 0)
+ err = 0;
-+ set_cached_acl(inode, type, acl);
-+ }
+
+out:
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
---- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/procfs.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/procfs.c 2020-01-27 10:57:18.175538316 +0100
@@ -0,0 +1,171 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2010-2019 Junjiro R. Okajima
++ * Copyright (C) 2010-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
---- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/rdu.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/rdu.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,384 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+}
+#endif
diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
---- /usr/share/empty/fs/aufs/rwsem.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/rwsem.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/rwsem.h 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_RWSEM_H__ */
diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
---- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/sbinfo.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/sbinfo.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,314 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ si_read_unlock(d1->d_sb);
+}
diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
---- /usr/share/empty/fs/aufs/super.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/super.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/super.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,1047 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ sb = dentry->d_sb;
+ if (sb->s_flags & SB_POSIXACL)
+ seq_puts(m, ",acl");
-+#if 0
++#if 0 /* reserved for future use */
+ if (sb->s_flags & SB_I_VERSION)
+ seq_puts(m, ",i_version");
+#endif
+ .owner = THIS_MODULE,
+};
diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
---- /usr/share/empty/fs/aufs/super.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/super.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/super.h 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,589 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ struct hlist_bl_head si_files;
+
+ /* with/without getattr, brother of sb->s_d_op */
-+ struct inode_operations *si_iop_array;
++ const struct inode_operations *si_iop_array;
+
+ /*
+ * sysfs and lifetime management.
+#endif /* __KERNEL__ */
+#endif /* __AUFS_SUPER_H__ */
diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
---- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/sysaufs.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/sysaufs.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,93 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
---- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/sysaufs.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/sysaufs.h 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __SYSAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
---- /usr/share/empty/fs/aufs/sysfs.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/sysfs.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/sysfs.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,374 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ }
+}
diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
---- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/sysrq.c 2019-07-11 21:21:54.382384486 +0800
-@@ -0,0 +1,160 @@
+--- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/sysrq.c 2020-01-27 10:57:18.178871751 +0100
+@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ struct hlist_bl_head *files;
+ struct hlist_bl_node *pos;
+ struct au_finfo *finfo;
++ struct inode *i;
+
+ plevel = au_plevel;
+ au_plevel = KERN_WARNING;
+ pr("superblock\n");
+ au_dpri_sb(sb);
+
-+#if 0
-+ pr("root dentry\n");
-+ au_dpri_dentry(sb->s_root);
-+ pr("root inode\n");
-+ au_dpri_inode(d_inode(sb->s_root));
-+#endif
-+
-+#if 0
++#if 0 /* reserved */
+ do {
+ int err, i, j, ndentry;
+ struct au_dcsub_pages dpages;
+ } while (0);
+#endif
+
-+#if 1
-+ {
-+ struct inode *i;
-+
-+ pr("isolated inode\n");
-+ spin_lock(&sb->s_inode_list_lock);
-+ list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
-+ spin_lock(&i->i_lock);
-+ if (1 || hlist_empty(&i->i_dentry))
-+ au_dpri_inode(i);
-+ spin_unlock(&i->i_lock);
-+ }
-+ spin_unlock(&sb->s_inode_list_lock);
++ pr("isolated inode\n");
++ spin_lock(&sb->s_inode_list_lock);
++ list_for_each_entry(i, &sb->s_inodes, i_sb_list) {
++ spin_lock(&i->i_lock);
++ if (hlist_empty(&i->i_dentry))
++ au_dpri_inode(i);
++ spin_unlock(&i->i_lock);
+ }
-+#endif
++ spin_unlock(&sb->s_inode_list_lock);
++
+ pr("files\n");
+ files = &au_sbi(sb)->si_files;
+ hlist_bl_lock(files);
+ pr_err("err %d (ignored)\n", err);
+}
diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
---- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/vdir.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/vdir.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,896 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+
+static void nhash_count(struct hlist_head *head)
+{
-+#if 0
++#if 0 /* debugging */
+ unsigned long n;
+ struct hlist_node *pos;
+
+ return 0;
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
---- /usr/share/empty/fs/aufs/vfsub.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/vfsub.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/vfsub.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,902 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
---- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/vfsub.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/vfsub.h 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,354 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_VFSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
---- /usr/share/empty/fs/aufs/wbr_policy.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/wbr_policy.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/wbr_policy.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,830 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ }
+};
diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
---- /usr/share/empty/fs/aufs/whout.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/whout.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/whout.c 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,1062 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+
+ pr_err("%pd (%s) doesn't support link(2), use noplink and rw+nolwh\n",
+ h_root, au_sbtype(h_root->d_sb));
-+ return -ENOSYS;
++ return -ENOSYS; /* the branch doesn't have its ->link() */
+}
+
+/* todo: should this mkdir be done in /sbin/mount.aufs helper? */
+ }
+}
diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
---- /usr/share/empty/fs/aufs/whout.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/whout.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/whout.h 2020-01-27 10:57:18.178871751 +0100
@@ -0,0 +1,86 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WHOUT_H__ */
diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
---- /usr/share/empty/fs/aufs/wkq.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/wkq.c 2019-07-11 21:21:54.382384486 +0800
-@@ -0,0 +1,392 @@
+--- /usr/share/empty/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/wkq.c 2020-01-27 10:57:18.178871751 +0100
+@@ -0,0 +1,372 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ goto out;
+
+ err = 0;
-+#if 0
-+ if (0 && au_debug_test()) /* left for debugging */
++#if 0 /* left for debugging */
++ if (0 && au_debug_test())
+ lockdep_print_held_locks(curr);
+#endif
+ held_locks = curr->held_locks;
+ if (!hl)
+ return;
+ while ((p = *hl++)) /* assignment */
-+ rwsem_release(p->instance, 0, /*p->acquire_ip*/_RET_IP_);
++ rwsem_release(p->instance, /*p->acquire_ip*/_RET_IP_);
+}
+#endif
+
+/*
+ * Since struct completion is large, try allocating it dynamically.
+ */
-+#if 1 /* defined(CONFIG_4KSTACKS) || defined(AuTest4KSTACKS) */
+#define AuWkqCompDeclare(name) struct completion *comp = NULL
+
+static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp)
+ au_kfree_rcu(comp);
+}
+
-+#else
-+
-+/* no braces */
-+#define AuWkqCompDeclare(name) \
-+ DECLARE_COMPLETION_ONSTACK(_ ## name); \
-+ struct completion *comp = &_ ## name
-+
-+static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp)
-+{
-+ wkinfo->comp = *comp;
-+ return 0;
-+}
-+
-+static void au_wkq_comp_free(struct completion *comp __maybe_unused)
-+{
-+ /* empty */
-+}
-+#endif /* 4KSTACKS */
-+
+static void au_wkq_run(struct au_wkinfo *wkinfo)
+{
+ if (au_ftest_wkq(wkinfo->flags, NEST)) {
+ return err;
+}
diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
---- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/wkq.h 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/wkq.h 2020-01-27 10:57:18.182205184 +0100
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#endif /* __KERNEL__ */
+#endif /* __AUFS_WKQ_H__ */
diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
---- /usr/share/empty/fs/aufs/xattr.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/xattr.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/xattr.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/xattr.c 2020-01-27 10:57:18.182205184 +0100
@@ -0,0 +1,356 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2014-2019 Junjiro R. Okajima
++ * Copyright (C) 2014-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ sb->s_xattr = au_xattr_handlers;
+}
diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
---- /usr/share/empty/fs/aufs/xino.c 1970-01-01 08:00:00.000000000 +0800
-+++ linux/fs/aufs/xino.c 2019-07-11 21:21:54.382384486 +0800
+--- /usr/share/empty/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
++++ linux/fs/aufs/xino.c 2020-01-27 10:57:18.182205184 +0100
@@ -0,0 +1,1965 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ if (unlikely(ul)) {
+ pr_warn("xi_writing %lu\n", ul);
+ hlist_bl_lock(hbl);
-+ hlist_bl_for_each_entry_safe (p, pos, n, hbl, node) {
++ hlist_bl_for_each_entry_safe(p, pos, n, hbl, node) {
+ hlist_bl_del(&p->node);
+ au_kfree_rcu(p);
+ }
+ return err;
+}
diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
---- /usr/share/empty/include/uapi/linux/aufs_type.h 1970-01-01 08:00:00.000000000 +0800
-+++ linux/include/uapi/linux/aufs_type.h 2019-07-11 21:21:54.382384486 +0800
-@@ -0,0 +1,448 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
+--- /usr/share/empty/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
++++ linux/include/uapi/linux/aufs_type.h 2020-01-27 10:57:18.182205184 +0100
+@@ -0,0 +1,452 @@
++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
-+ * Copyright (C) 2005-2019 Junjiro R. Okajima
++ * Copyright (C) 2005-2020 Junjiro R. Okajima
+ *
+ * This program, aufs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#define pr_fmt(fmt) \
+ AUFS_NAME " %s:%d:%.*s[%d]: " fmt, __func__, __LINE__, \
+ (int)sizeof(current->comm), current->comm, current->pid
++#include <linux/limits.h>
+#else
+#include <stdint.h>
+#include <sys/types.h>
++#include <limits.h>
+#endif /* __KERNEL__ */
+
-+#include <linux/limits.h>
-+
-+#define AUFS_VERSION "5.x-rcN-20190610"
++#define AUFS_VERSION "5.x-rcN-20200127"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
+
+/* ---------------------------------------------------------------------- */
+
++#ifdef __KERNEL__
+#ifdef CONFIG_AUFS_BRANCH_MAX_127
+typedef int8_t aufs_bindex_t;
+#define AUFS_BRANCH_MAX 127
+#endif
+#endif
+
-+#ifdef __KERNEL__
+#ifndef AUFS_BRANCH_MAX
+#error unknown CONFIG_AUFS_BRANCH_MAX value
+#endif
+
+/* borrowed from linux/include/linux/kernel.h */
+#ifndef ALIGN
++#ifdef _GNU_SOURCE
+#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a)-1)
++#else
++#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
++#endif
+#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
+#endif
+
aufs5.x-rcN loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 1b723737592b..16561a96019c 100644
+index 872e3b3a7693..768100025129 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -633,6 +633,15 @@ static inline void loop_update_dio(struct loop_device *lo)
+@@ -635,6 +635,15 @@ static inline void loop_update_dio(struct loop_device *lo)
lo->use_dio);
}
static void loop_reread_partitions(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,
+@@ -690,6 +699,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file = NULL, *old_file;
int error;
bool partscan;
-@@ -705,12 +715,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -709,12 +719,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out_err;
error = -EINVAL;
-@@ -722,6 +739,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -726,6 +743,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
blk_mq_freeze_queue(lo->lo_queue);
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping);
mapping_set_gfp_mask(file->f_mapping,
lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
-@@ -735,6 +753,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -739,6 +757,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
* dependency.
*/
fput(old_file);
if (partscan)
loop_reread_partitions(lo, bdev);
return 0;
-@@ -743,6 +763,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -747,6 +767,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
mutex_unlock(&loop_ctl_mutex);
if (file)
fput(file);
return error;
}
-@@ -947,7 +969,7 @@ static void loop_update_rotational(struct loop_device *lo)
+@@ -951,7 +973,7 @@ static void loop_update_rotational(struct loop_device *lo)
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg)
{
+ struct file *file, *f, *virt_file = NULL;
struct inode *inode;
struct address_space *mapping;
- int lo_flags = 0;
-@@ -962,6 +984,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+ struct block_device *claimed_bdev = NULL;
+@@ -967,6 +989,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg);
if (!file)
goto out;
/*
* If we don't hold exclusive handle for the device, upgrade to it
-@@ -1009,6 +1037,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+@@ -1015,6 +1043,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
lo->lo_device = bdev;
lo->lo_flags = lo_flags;
lo->lo_backing_file = file;
lo->transfer = NULL;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
-@@ -1052,6 +1081,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
- blkdev_put(bdev, mode | FMODE_EXCL);
+@@ -1068,6 +1097,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);
+ if (virt_file)
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
-@@ -1098,6 +1129,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
+@@ -1114,6 +1145,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;
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
int err = 0;
-@@ -1121,6 +1153,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
+@@ -1137,6 +1169,7 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
-@@ -1203,6 +1236,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
+@@ -1220,6 +1253,8 @@ static int __loop_clr_fd(struct loop_device *lo, bool release)
*/
if (filp)
fput(filp);
}
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
-index af75a5ee4094..1e6ee5a4f623 100644
+index af75a5ee4094..1d847cb194ff 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -46,7 +46,7 @@ struct loop_device {
unsigned long arg);
- struct file * lo_backing_file;
-+ struct file * lo_backing_file, *lo_backing_virt_file;
++ struct file *lo_backing_file, *lo_backing_virt_file;
struct block_device *lo_device;
void *key_data;
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
-index 0309f0d502ff..19feb4f3cb5f 100644
+index 6fb4a4ed8cc7..ba9a959f2db2 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -359,7 +359,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter)
if (file->f_mapping != h_file->f_mapping) {
file->f_mapping = h_file->f_mapping;
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
-index 9ba35a878ecd..4ed0ff03d5ab 100644
+index a8b63acc6204..9d97c3af5686 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -133,3 +133,19 @@ void au_loopback_fin(void)
+ return f;
+}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
-index f31e40aff267..e13fb1a0717a 100644
+index 94f4f80ae33b..ca1194354aff 100644
--- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h
@@ -26,6 +26,8 @@ void au_warn_loopback(struct super_block *h_sb);
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
-index a97e2921cb09..f74eb6962684 100644
+index 589dd0122020..801e0a7faec5 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -844,7 +844,10 @@ static const struct super_operations aufs_sop = {
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 28593b894e7b..bdc2611787df 100644
+index 5fc7807f7c2e..07e24e72706e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1947,6 +1947,10 @@ struct super_operations {
+@@ -1980,6 +1980,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
-+#if defined(CONFIG_BLK_DEV_LOOP) || defined(CONFIG_BLK_DEV_LOOP_MODULE)
++#if IS_ENABLED(CONFIG_BLK_DEV_LOOP) || IS_ENABLED(CONFIG_BLK_DEV_LOOP_MODULE)
+ /* and aufs */
+ struct file *(*real_loop)(struct file *);
+#endif