aufs5.x-rcN kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
-index 6c7dc1387beb0..4af0a823e5f24 100644
+index 5976eb33535f..7dba4acf10ce 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
-@@ -312,6 +312,7 @@ source "fs/sysv/Kconfig"
+@@ -320,6 +320,7 @@ source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/erofs/Kconfig"
source "fs/vboxsf/Kconfig"
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
-index 208a74e0b00e1..57d47a0762e0a 100644
+index 208a74e0b00e..57d47a0762e0 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -140,3 +140,4 @@ obj-$(CONFIG_EFIVAR_FS) += efivarfs/
aufs5.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
-index 05fd080b82f3a..9554f31190578 100644
+index 66bffb24a348..9dc7cad5fa1e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -3235,6 +3235,19 @@ F: include/uapi/linux/audit.h
+@@ -3355,6 +3355,19 @@ F: include/uapi/linux/audit.h
F: kernel/audit*
F: lib/*audit.c
M: Miguel Ojeda <ojeda@kernel.org>
S: Maintained
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 19fe19eaa50e9..9009a0efc4b28 100644
+index 084f9b8a0ba3..a705173cf452 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -636,6 +636,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
- return error;
+@@ -645,6 +645,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+ goto done;
}
+/*
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
-index c84269c6e8bf6..6f4f48c828351 100644
+index 93f4f5ee07bf..cddcf2e44930 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1345,7 +1345,7 @@ enum d_walk_ret {
{
struct dentry *this_parent;
diff --git a/fs/fcntl.c b/fs/fcntl.c
-index 9c6c6a3e2de51..02382fa9bd341 100644
+index 34a3faa4886d..68457c0e1e6c 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -33,7 +33,7 @@
{
struct inode * inode = file_inode(filp);
int error = 0;
-@@ -64,6 +64,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
+@@ -63,6 +63,8 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
if (filp->f_op->check_flags)
error = filp->f_op->check_flags(arg);
return error;
diff --git a/fs/namespace.c b/fs/namespace.c
-index de6fae84f1a1a..e189393b34b14 100644
+index e6a7e769d25d..e0aa17f8c802 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
-@@ -839,6 +839,12 @@ static inline int check_mnt(struct mount *mnt)
+@@ -852,6 +852,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/splice.c b/fs/splice.c
-index 5dbce4dcc1a7d..3e6ba363b7775 100644
+index 047b79db8eb5..a21caa5c54c8 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -759,8 +759,8 @@ static int warn_unsupported(struct file *file, const char *op)
unsigned int p_space;
int ret;
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index e2d892b201b07..5479e6dc18a23 100644
+index 9ad5e3520fae..f5aed17b2ce2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1372,6 +1372,7 @@ extern void fasync_free(struct fasync_struct *);
+@@ -1348,6 +1348,7 @@ extern void fasync_free(struct fasync_struct *);
/* can be called from interrupts */
extern void kill_fasync(struct fasync_struct **, int, int);
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);
-@@ -2003,6 +2004,7 @@ struct file_operations {
+@@ -1986,6 +1987,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);
-@@ -2529,6 +2531,7 @@ extern int current_umask(void);
+@@ -2483,6 +2485,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;
-@@ -2707,6 +2710,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
+@@ -2663,6 +2666,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb)
}
void emergency_thaw_all(void);
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 467b94257105e..dab20282c82e2 100644
+index b6829b970093..af63df9ba503 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
-@@ -248,6 +248,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
+@@ -244,6 +244,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
}
* Acquire a lock.
*
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
-index 8f882f5881e87..6b9808f098435 100644
+index 8f882f5881e8..6b9808f09843 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -7,12 +7,15 @@ struct mnt_namespace;
extern const struct file_operations proc_mountinfo_operations;
extern const struct file_operations proc_mountstats_operations;
diff --git a/include/linux/splice.h b/include/linux/splice.h
-index a55179fd60fc3..8e21c53cf8831 100644
+index a55179fd60fc..8e21c53cf883 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -93,4 +93,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
+ unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index f8a0212189cad..43e3d1fdd570b 100644
+index f06b91ca6482..dedf7da3dd4a 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
-@@ -189,7 +189,7 @@ static
+@@ -217,7 +217,7 @@ unsigned long max_lock_class_idx;
struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
DECLARE_BITMAP(lock_classes_in_use, MAX_LOCKDEP_KEYS);
{
unsigned int class_idx = hlock->class_idx;
-@@ -210,6 +210,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
+@@ -238,6 +238,7 @@ static inline struct lock_class *hlock_class(struct held_lock *hlock)
*/
return lock_classes + class_idx;
}
aufs5.x-rcN mmap patch
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index d654ce7150fdd..422713de90f60 100644
+index 8dfa36a99c74..548deeffe7d7 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
-@@ -2191,7 +2191,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path)
+@@ -2190,7 +2190,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) {
rc = 0;
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index 13452b32e2bd5..38acccfef9d49 100644
+index 13452b32e2bd..38acccfef9d4 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -40,7 +40,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index f46060eb91b5c..2a7c8709acadd 100644
+index 2d04e3470d4c..f57a3bed280a 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -281,7 +281,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
-@@ -1903,7 +1906,7 @@ static int show_numa_map(struct seq_file *m, void *v)
+@@ -1908,7 +1911,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 mempolicy *pol;
char buffer[64];
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index a6d21fc0033c6..02c2de31196e0 100644
+index a6d21fc0033c..02c2de31196e 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 5744a3fc47169..f2f4c5ec69530 100644
+index cf3d0d673f6b..6b3c1bdf9cde 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
-@@ -1895,6 +1895,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
+@@ -1905,6 +1905,43 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
unmap_mapping_range(mapping, holebegin, holelen, 0);
}
++#if IS_ENABLED(CONFIG_AUFS_FS)
+extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int);
+extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[],
+ int);
+ __LINE__)
+#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__)
+#endif /* !CONFIG_MMU */
++
++#else
++
++#define vma_file_update_time(vma) file_update_time((vma)->vm_file)
++#define vma_pr_or_file(vma) (vma)->vm_file
++#define vma_get_file(vma) get_file((vma)->vm_file)
++#define vma_fput(vma) fput((vma)->vm_file)
++
++#ifndef CONFIG_MMU
++#define vmr_pr_or_file(region) (region)->vm_file
++#define vmr_fput(region) fput((region)->vm_file)
++#endif /* !CONFIG_MMU */
++
++#endif /* CONFIG_AUFS_FS */
+
extern int access_process_vm(struct task_struct *tsk, unsigned long addr,
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 0f549870da6a0..67d02ae46b8fa 100644
+index c29ab4c0cd5c..51753b926421 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
-@@ -344,6 +344,7 @@ struct vm_region {
+@@ -367,6 +367,9 @@ 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 */
++#if IS_ENABLED(CONFIG_AUFS_FS)
+ struct file *vm_prfile; /* the virtual backing file or NULL */
++#endif
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -440,6 +441,7 @@ struct vm_area_struct {
+@@ -463,6 +466,9 @@ 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). */
++#if IS_ENABLED(CONFIG_AUFS_FS)
+ struct file *vm_prfile; /* shadow of vm_file */
++#endif
void * vm_private_data; /* was vm_pte (shared mem) */
#ifdef CONFIG_SWAP
diff --git a/kernel/fork.c b/kernel/fork.c
-index f1e89007f2288..f085ecd96a7db 100644
+index 9d44f2d46c69..089b21708b9a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -575,7 +575,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
+@@ -662,7 +662,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
if (file) {
struct address_space *mapping = file->f_mapping;
if (tmp->vm_flags & VM_SHARED)
mapping_allow_writable(mapping);
diff --git a/mm/Makefile b/mm/Makefile
-index 70d4309c9ce33..9acff75987dfa 100644
+index 6f9ffa968a1a..f1e338fa3d10 100644
--- a/mm/Makefile
+++ b/mm/Makefile
-@@ -54,7 +54,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
- mm_init.o percpu.o slab_common.o \
- compaction.o vmacache.o \
- interval_tree.o list_lru.o workingset.o \
-- debug.o gup.o mmap_lock.o $(mmu-y)
-+ prfile.o debug.o gup.o mmap_lock.o $(mmu-y)
-
- # Give 'page_alloc' its own module-parameter namespace
- page-alloc-y := page_alloc.o
+@@ -133,3 +133,4 @@ obj-$(CONFIG_PAGE_REPORTING) += page_reporting.o
+ obj-$(CONFIG_IO_MAPPING) += io-mapping.o
+ obj-$(CONFIG_HAVE_BOOTMEM_INFO_NODE) += bootmem_info.o
+ obj-$(CONFIG_GENERIC_IOREMAP) += ioremap.o
++obj-$(CONFIG_AUFS_FS:m=y) += prfile.o
diff --git a/mm/filemap.c b/mm/filemap.c
-index ad8c39d90bf94..f95b595a49b7b 100644
+index ffdfbc8b0e3c..2932f7020bfe 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
-@@ -3395,7 +3395,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
+@@ -3431,7 +3431,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
vm_fault_t ret = VM_FAULT_LOCKED;
sb_start_pagefault(mapping->host->i_sb);
if (folio->mapping != mapping) {
folio_unlock(folio);
diff --git a/mm/mmap.c b/mm/mmap.c
-index f61a15474dd6d..071c0cd6ef623 100644
+index 61e6135c54ef..9a3b117076a8 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
-@@ -184,7 +184,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
+@@ -189,7 +189,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;
-@@ -953,7 +953,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
+@@ -958,7 +958,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);
-@@ -1879,7 +1879,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1889,7 +1889,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
return addr;
unmap_and_free_vma:
vma->vm_file = NULL;
/* Undo any partial mapping done by a device driver. */
-@@ -2737,7 +2737,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2751,7 +2751,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);
-@@ -2756,7 +2756,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2770,7 +2770,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));
-@@ -2950,7 +2950,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
- struct vm_area_struct *vma;
+@@ -2943,6 +2943,9 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
unsigned long populate = 0;
unsigned long ret = -EINVAL;
-- struct file *file;
-+ struct file *file, *prfile;
+ struct file *file;
++#if IS_ENABLED(CONFIG_AUFS_FS)
++ struct file *prfile;
++#endif
pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n",
current->comm, current->pid);
-@@ -3006,10 +3006,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -2998,10 +3001,34 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
if (vma->vm_flags & VM_LOCKED)
flags |= MAP_LOCKED;
-- file = get_file(vma->vm_file);
++#if IS_ENABLED(CONFIG_AUFS_FS)
+ vma_get_file(vma);
+ file = vma->vm_file;
+ prfile = vma->vm_prfile;
- ret = do_mmap(vma->vm_file, start, size,
- prot, flags, pgoff, &populate, NULL);
++ ret = do_mmap(vma->vm_file, start, size,
++ prot, flags, pgoff, &populate, NULL);
+ if (!IS_ERR_VALUE(ret) && file && prfile) {
+ struct vm_area_struct *new_vma;
+
+ * two fput()s instead of vma_fput(vma),
+ * coz vma may not be available anymore.
+ */
- fput(file);
++ fput(file);
+ if (prfile)
+ fput(prfile);
++#else
+ file = get_file(vma->vm_file);
+ ret = do_mmap(vma->vm_file, start, size,
+ prot, flags, pgoff, &populate, NULL);
+ fput(file);
++#endif /* CONFIG_AUFS_FS */
out:
mmap_write_unlock(mm);
if (populate)
-@@ -3291,7 +3308,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -3275,7 +3302,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 55a9e48a7a026..8dc77ce96335a 100644
+index 9d7afc2d959e..917851d5b7c6 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
-@@ -522,7 +522,7 @@ static void __put_nommu_region(struct vm_region *region)
+@@ -524,7 +524,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 */
-@@ -654,7 +654,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -656,7 +656,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);
}
-@@ -1174,7 +1174,7 @@ unsigned long do_mmap(struct file *file,
+@@ -1176,7 +1176,7 @@ unsigned long do_mmap(struct file *file,
goto error_just_free;
}
}
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
-@@ -1251,10 +1251,10 @@ unsigned long do_mmap(struct file *file,
+@@ -1253,10 +1253,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 0000000000000..511543ab1b418
+index 000000000000..511543ab1b41
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
aufs5.x-rcN standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
-index 6f4f48c828351..7ce9e4401f08a 100644
+index cddcf2e44930..8e24a158ef4f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1450,6 +1450,7 @@ void d_walk(struct dentry *parent, void *data,
struct check_mount {
struct vfsmount *mnt;
-@@ -2995,6 +2996,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
+@@ -2996,6 +2997,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 79f2c9483302d..d9bc22409be6a 100644
+index 0989fb8472a1..040741a7fc1a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
-@@ -112,6 +112,7 @@ bool path_noexec(const struct path *path)
+@@ -111,6 +111,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 02382fa9bd341..3418c60b90146 100644
+index 68457c0e1e6c..f6affcbcea4f 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
-@@ -86,6 +86,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 7d2e692b66a94..91942789c49aa 100644
+index 5424e3a8df5f..d2fe19f88894 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -198,6 +198,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.
diff --git a/fs/namespace.c b/fs/namespace.c
-index e189393b34b14..5d7d122d1067a 100644
+index e0aa17f8c802..a8c5bed09874 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
-@@ -440,6 +440,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
+@@ -456,6 +456,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
-@@ -844,6 +845,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
+@@ -857,6 +858,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
/*
* vfsmount lock must be held for write
-@@ -2047,6 +2049,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -2060,6 +2062,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 b7d4d64f87c29..2d2d2c6d33e41 100644
+index 1de6631a3925..3008eb37a18d 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -100,6 +100,7 @@ void fsnotify_get_group(struct fsnotify_group *group)
/*
* Drop a reference to a group. Free it if it's through.
diff --git a/fs/open.c b/fs/open.c
-index 9ff2f621b760b..3b8deceee506f 100644
+index 1d57fbde2feb..50d04ab40175 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -66,6 +66,7 @@ int do_truncate(struct user_namespace *mnt_userns, struct dentry *dentry,
long vfs_truncate(const struct path *path, loff_t length)
{
diff --git a/fs/read_write.c b/fs/read_write.c
-index 0074afa7ecb3e..612cf04d9f6b9 100644
+index e0777eefd846..5e4413802f73 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
-@@ -488,6 +488,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
+@@ -489,6 +489,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
inc_syscr(current);
return ret;
}
static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
{
-@@ -598,6 +599,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
+@@ -599,6 +600,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
file_end_write(file);
return ret;
}
/* 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 3e6ba363b7775..7c1be373eb7cd 100644
+index a21caa5c54c8..ccf9e1681eb7 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -766,6 +766,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/fs/xattr.c b/fs/xattr.c
-index 5c8c5175b385c..ff7e9ff774b73 100644
+index e8dd03e4561e..fd922e39d42d 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
-@@ -384,6 +384,7 @@ vfs_getxattr_alloc(struct user_namespace *mnt_userns, struct dentry *dentry,
+@@ -386,6 +386,7 @@ vfs_getxattr_alloc(struct user_namespace *mnt_userns, struct dentry *dentry,
*xattr_value = value;
return error;
}
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 43e3d1fdd570b..5d6f33f1f2f28 100644
+index dedf7da3dd4a..2c74c70f4816 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
-@@ -210,6 +210,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
+@@ -238,6 +238,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
*/
return lock_classes + class_idx;
}
#ifdef CONFIG_LOCK_STAT
diff --git a/kernel/task_work.c b/kernel/task_work.c
-index 1698fbe6f0e13..081b05acadf82 100644
+index dff75bcde151..30b814618535 100644
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
-@@ -167,3 +167,4 @@ void task_work_run(void)
+@@ -180,3 +180,4 @@ void task_work_run(void)
} while (work);
}
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/security.c b/security/security.c
-index 22261d79f3333..732e4c219ea29 100644
+index 188b8f782220..6847a174a55f 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -1151,6 +1151,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
+@@ -1165,6 +1165,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)
{
-@@ -1167,6 +1168,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
+@@ -1181,6 +1182,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)
-@@ -1175,6 +1177,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
+@@ -1189,6 +1191,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,
-@@ -1202,6 +1205,7 @@ int security_path_truncate(const struct path *path)
+@@ -1209,6 +1212,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)
{
-@@ -1209,6 +1213,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
+@@ -1216,6 +1220,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)
{
-@@ -1216,6 +1221,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
+@@ -1223,6 +1228,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)
{
-@@ -1316,6 +1322,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -1323,6 +1329,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)
{
-@@ -1513,6 +1520,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -1520,6 +1527,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
{
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 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/debugfs-aufs 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/ABI/testing/debugfs-aufs 2022-08-02 12:12:45.158975302 +0200
@@ -0,0 +1,55 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/ABI/testing/sysfs-aufs 2022-08-02 12:12:45.158975302 +0200
@@ -0,0 +1,31 @@
+What: /sys/fs/aufs/si_<id>/
+Date: March 2009
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/01intro.txt 2022-08-02 12:12:45.158975302 +0200
@@ -0,0 +1,171 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/02struct.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,258 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,85 @@
+
+# Copyright (C) 2015-2021 Junjiro R. Okajima
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,113 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/04branch.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,74 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,64 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.dot 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,31 @@
+
+// to view this graph, run dot(1) command in GRAPHVIZ.
+}
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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2022-03-21 14:49:05.713299677 +0100
++++ linux/Documentation/filesystems/aufs/design/06dirren.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,102 @@
+
+# Copyright (C) 2017-2021 Junjiro R. Okajima
+simply the inode-numbers on the branch. The file is created or updated
+in removing the branch, and loaded in adding the branch. Its lifetime is
+equal to the branch.
-+The list is refered in lookup, and when the current target inode is
++The list is referred in lookup, and when the current target inode is
+found in the list, the aufs tries loading the "detailed info per
+directory" and get the changed and valid name of the dir.
+
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,120 @@
+
+# Copyright (C) 2011-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,72 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,96 @@
+
+# Copyright (C) 2014-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/07export.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,58 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+ 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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,52 @@
+
+# Copyright (C) 2005-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2022-03-21 14:49:05.716633010 +0100
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,47 @@
+
+# Copyright (C) 2010-2021 Junjiro R. Okajima
+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 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README 2022-03-21 14:49:05.713299677 +0100
-@@ -0,0 +1,396 @@
++++ linux/Documentation/filesystems/aufs/README 2022-08-02 12:12:45.158975302 +0200
+@@ -0,0 +1,397 @@
+
+Aufs5 -- advanced multi layered unification filesystem version 5.x
+http://aufs.sf.net
+James Burry made a donation (2016/12).
+Carsten Rose made a donation (2018/9).
+Porteus Kiosk made a donation (2018/10).
++Enya Quetzalli Gomez Rodriguez made a donation (2022/5).
+
+Thank you very much.
+Donations are always, including future donations, very important and
+# 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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h 2022-03-21 14:49:05.716633010 +0100
++++ linux/fs/aufs/aufs.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/branch.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,1427 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * file_release_write() for each file, because the branch
+ * attribute in aufs world is totally different from the native
+ * fs rw/ro mode.
-+ */
++ */
+ /* fi_read_lock(file); */
+ hfile = &au_fi(file)->fi_htop;
+ hf = hfile->hf_file;
+}
diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
--- /usr/share/empty/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/branch.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,375 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/conf.mk 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/conf.mk 2022-08-02 12:12:45.162308621 +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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/cpup.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,1459 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
--- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/cpup.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dbgaufs.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,526 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
--- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dbgaufs.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dcsub.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,225 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
--- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dcsub.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,137 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/debug.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,444 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ return sprintf(buffer, "%d", atomic_read(a));
+}
+
-+static struct kernel_param_ops param_ops_atomic_t = {
++static const struct kernel_param_ops param_ops_atomic_t = {
+ .set = param_atomic_t_set,
+ .get = param_atomic_t_get
+ /* void (*free)(void *arg) */
+}
diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
--- /usr/share/empty/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/debug.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,226 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dentry.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,1168 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+};
diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
--- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dentry.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,269 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dinfo.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,554 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
--- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dir.c 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,765 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+};
diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
--- /usr/share/empty/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h 2022-03-21 14:49:05.719966344 +0100
++++ linux/fs/aufs/dir.h 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,134 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/dirren.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,1315 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/dirren.h linux/fs/aufs/dirren.h
--- /usr/share/empty/fs/aufs/dirren.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dirren.h 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/dirren.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,140 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/dynop.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,368 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ AuDbg("%s\n", au_sbtype(h_sb));
+
+ DySetAop(writepage);
-+ DySetAopForce(readpage); /* force */
++ DySetAopForce(read_folio); /* force */
+ DySetAop(writepages);
-+ DySetAop(set_page_dirty);
-+ DySetAop(readpages);
++ DySetAop(dirty_folio);
++ DySetAop(invalidate_folio);
+ DySetAop(readahead);
+ DySetAop(write_begin);
+ DySetAop(write_end);
+ DySetAop(bmap);
-+ DySetAop(invalidatepage);
-+ DySetAop(releasepage);
-+ DySetAop(freepage);
++ DySetAop(release_folio);
++ DySetAop(free_folio);
+ /* this one will be changed according to an aufs mount option */
+ DySetAop(direct_IO);
+ DySetAop(migratepage);
+ DySetAop(isolate_page);
+ DySetAop(putback_page);
-+ DySetAop(launder_page);
++ DySetAop(launder_folio);
+ DySetAop(is_partially_uptodate);
+ DySetAop(is_dirty_writeback);
+ DySetAop(error_remove_page);
+ DySetAop(swap_activate);
+ DySetAop(swap_deactivate);
++ DySetAop(swap_rw);
+
+ DyDbgSize(cnt, *h_aop);
+}
+}
diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
--- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/dynop.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/export.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,830 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
--- /usr/share/empty/fs/aufs/fhsm.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/fhsm.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,427 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
--- /usr/share/empty/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c 2022-03-21 14:49:05.723299677 +0100
-@@ -0,0 +1,863 @@
++++ linux/fs/aufs/file.c 2022-08-02 12:12:45.165641939 +0200
+@@ -0,0 +1,864 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2021 Junjiro R. Okajima
+
+/* cf. aufs_nopage() */
+/* for madvise(2) */
-+static int aufs_readpage(struct file *file __maybe_unused, struct page *page)
++static int aufs_read_folio(struct file *file __maybe_unused, struct folio *folio)
+{
-+ unlock_page(page);
++ folio_unlock(folio);
+ return 0;
+}
+
+/* they will never be called. */
+#ifdef CONFIG_AUFS_DEBUG
+static int aufs_write_begin(struct file *file, struct address_space *mapping,
-+ loff_t pos, unsigned len, unsigned flags,
++ loff_t pos, unsigned len,
+ struct page **pagep, void **fsdata)
+{ AuUnsupport(); return 0; }
+static int aufs_write_end(struct file *file, struct address_space *mapping,
+static int aufs_writepage(struct page *page, struct writeback_control *wbc)
+{ AuUnsupport(); return 0; }
+
-+static int aufs_set_page_dirty(struct page *page)
-+{ AuUnsupport(); return 0; }
-+static void aufs_invalidatepage(struct page *page, unsigned int offset,
-+ unsigned int length)
++static bool aufs_dirty_folio(struct address_space *mapping, struct folio *folio)
++{ AuUnsupport(); return true; }
++static void aufs_invalidate_folio(struct folio *folio, size_t offset, size_t len)
+{ AuUnsupport(); }
-+static int aufs_releasepage(struct page *page, gfp_t gfp)
-+{ AuUnsupport(); return 0; }
++static bool aufs_release_folio(struct folio *folio, gfp_t gfp)
++{ AuUnsupport(); return true; }
+#if 0 /* called by memory compaction regardless file */
+static int aufs_migratepage(struct address_space *mapping, struct page *newpage,
+ struct page *page, enum migrate_mode mode)
+{ AuUnsupport(); return true; }
+static void aufs_putback_page(struct page *page)
+{ AuUnsupport(); }
-+static int aufs_launder_page(struct page *page)
-+{ AuUnsupport(); return 0; }
-+static int aufs_is_partially_uptodate(struct page *page,
-+ unsigned long from,
-+ unsigned long count)
++static int aufs_launder_folio(struct folio *folio)
+{ AuUnsupport(); return 0; }
-+static void aufs_is_dirty_writeback(struct page *page, bool *dirty,
++static bool aufs_is_partially_uptodate(struct folio *folio, size_t from,
++ size_t count)
++{ AuUnsupport(); return true; }
++static void aufs_is_dirty_writeback(struct folio *folio, bool *dirty,
+ bool *writeback)
+{ AuUnsupport(); }
+static int aufs_error_remove_page(struct address_space *mapping,
+{ AuUnsupport(); return 0; }
+static void aufs_swap_deactivate(struct file *file)
+{ AuUnsupport(); }
++static int aufs_swap_rw(struct kiocb *iocb, struct iov_iter *iter)
++{ AuUnsupport(); return 0; }
+#endif /* CONFIG_AUFS_DEBUG */
+
+const struct address_space_operations aufs_aop = {
-+ .readpage = aufs_readpage,
++ .read_folio = aufs_read_folio,
+ .direct_IO = aufs_direct_IO,
+#ifdef CONFIG_AUFS_DEBUG
+ .writepage = aufs_writepage,
+ /* no writepages, because of writepage */
-+ .set_page_dirty = aufs_set_page_dirty,
++ .dirty_folio = aufs_dirty_folio,
+ /* no readpages, because of readpage */
+ .write_begin = aufs_write_begin,
+ .write_end = aufs_write_end,
+ /* no bmap, no block device */
-+ .invalidatepage = aufs_invalidatepage,
-+ .releasepage = aufs_releasepage,
++ .invalidate_folio = aufs_invalidate_folio,
++ .release_folio = aufs_release_folio,
+ /* is fallback_migrate_page ok? */
+ /* .migratepage = aufs_migratepage, */
+ .isolate_page = aufs_isolate_page,
+ .putback_page = aufs_putback_page,
-+ .launder_page = aufs_launder_page,
++ .launder_folio = aufs_launder_folio,
+ .is_partially_uptodate = aufs_is_partially_uptodate,
+ .is_dirty_writeback = aufs_is_dirty_writeback,
+ .error_remove_page = aufs_error_remove_page,
+ .swap_activate = aufs_swap_activate,
-+ .swap_deactivate = aufs_swap_deactivate
++ .swap_deactivate = aufs_swap_deactivate,
++ .swap_rw = aufs_swap_rw
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/file.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,342 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/finfo.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/f_op.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,771 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+};
diff -urN /usr/share/empty/fs/aufs/fsctx.c linux/fs/aufs/fsctx.c
--- /usr/share/empty/fs/aufs/fsctx.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fsctx.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/fsctx.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,1242 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+#ifdef CONFIG_FS_POSIX_ACL
+ fsparam_flag_no("acl", Opt_acl),
+#else
-+ au_ignore_flag("acl"),
++ au_ignore_flag("acl", Opt_ignore),
+#endif
+
+ /* internal use for the scripts */
+ case Opt_##name: \
+ err = 0; \
+ opt->tf = !result.negated; \
-+ break;
++ break
+ au_fsctx_TF(trunc_xino);
+ au_fsctx_TF(trunc_xib);
+ au_fsctx_TF(dirperm1);
+{
+#define do_test(name) \
+ if (!strncmp(str, name ":", sizeof(name))) \
-+ return sizeof(name) - 1;
++ return sizeof(name) - 1
+ do_test("br");
+ do_test("add");
+ do_test("ins");
+}
diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
--- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/fstype.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,401 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hbl.h 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/hbl.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,65 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c 2022-03-21 14:49:05.723299677 +0100
-@@ -0,0 +1,289 @@
++++ linux/fs/aufs/hfsnotify.c 2022-08-02 12:12:45.165641939 +0200
+@@ -0,0 +1,290 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2021 Junjiro R. Okajima
+ goto out;
+
+ err = 0;
-+ group = fsnotify_alloc_group(&au_hfsn_ops);
++ group = fsnotify_alloc_group(&au_hfsn_ops,
++ /*flags - not for userspace*/0);
+ if (IS_ERR(group)) {
+ err = PTR_ERR(group);
+ pr_err("fsnotify_alloc_group() failed, %d\n", err);
+};
diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
--- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/hfsplus.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
--- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c 2022-03-21 14:49:05.723299677 +0100
++++ linux/fs/aufs/hnotify.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,715 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
--- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/iinfo.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,286 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
--- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/inode.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,531 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
--- /usr/share/empty/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/inode.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,705 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/ioctl.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,220 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/i_op_add.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,941 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/i_op.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,1512 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+};
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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/i_op_del.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,522 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/i_op_ren.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,1257 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
--- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Kconfig 2022-03-21 14:49:05.716633010 +0100
++++ linux/fs/aufs/Kconfig 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,199 @@
+# SPDX-License-Identifier: GPL-2.0
+config AUFS_FS
+ his child on the lower branch, since it is a bad idea to issue
+ rename(2) internally for every lower branch. But user may not
+ accept this behaviour. So here is a workaround to allow such
-+ rename(2) and store some extra infromation on the writable
++ rename(2) and store some extra information on the writable
+ branch. Obviously this costs high (and I don't like it).
+ To use this feature, you need to enable this configuration AND
+ to specify the mount option `dirren.'
+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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/lcnt.h 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/lcnt.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,186 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/loop.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
--- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/loop.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/magic.mk 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/magic.mk 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0
+
+endif
diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
--- /usr/share/empty/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile 2022-03-21 14:49:05.716633010 +0100
++++ linux/fs/aufs/Makefile 2022-08-02 12:12:45.162308621 +0200
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0
+
+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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c 2022-03-21 14:49:05.726633010 +0100
++++ linux/fs/aufs/module.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,273 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h 2022-03-21 14:49:05.726633010 +0100
-@@ -0,0 +1,166 @@
++++ linux/fs/aufs/module.h 2022-08-02 12:12:45.165641939 +0200
+@@ -0,0 +1,180 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2005-2021 Junjiro R. Okajima
+ kmem_cache_create(#type, sizeof(struct type), \
+ __alignof__(struct type), AuCacheFlags, ctor)
+
-+#define AuCacheFuncs(name, index) \
++#define AuCacheFuncAlloc(name, index) \
+ static inline struct au_##name *au_cache_alloc_##name(void) \
-+ { return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); } \
++ { return kmem_cache_alloc(au_cache[AuCache_##index], GFP_NOFS); }
++
++#define AuCacheFuncs(name, index) \
+ static inline void au_cache_free_##name##_norcu(struct au_##name *p) \
+ { kmem_cache_free(au_cache[AuCache_##index], p); } \
+ \
+ au_cache_free_##name##_rcu(p); }
+
+AuCacheFuncs(dinfo, DINFO);
++AuCacheFuncAlloc(dinfo, DINFO);
++
+AuCacheFuncs(icntnr, ICNTNR);
++static inline struct au_icntnr *au_cache_alloc_icntnr(struct super_block *sb)
++{ return alloc_inode_sb(sb, au_cache[AuCache_ICNTNR], GFP_NOFS); }
++
+AuCacheFuncs(finfo, FINFO);
++AuCacheFuncAlloc(finfo, FINFO);
++
+AuCacheFuncs(vdir, VDIR);
++AuCacheFuncAlloc(vdir, VDIR);
++
+AuCacheFuncs(vdir_dehstr, DEHSTR);
++AuCacheFuncAlloc(vdir_dehstr, DEHSTR);
++
+#ifdef CONFIG_AUFS_HNOTIFY
+AuCacheFuncs(hnotify, HNOTIFY);
++AuCacheFuncAlloc(hnotify, HNOTIFY);
+#endif
+
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/mvdown.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,706 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
--- /usr/share/empty/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/opts.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,1032 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
--- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/opts.h 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,263 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/plink.c 2022-08-02 12:12:45.165641939 +0200
@@ -0,0 +1,516 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
--- /usr/share/empty/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/poll.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/posix_acl.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/posix_acl.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,111 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
--- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/procfs.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,170 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
--- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/rdu.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,384 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/rwsem.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,85 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/sbinfo.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,316 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
--- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/super.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,871 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+{
+ struct au_icntnr *c;
+
-+ c = au_cache_alloc_icntnr();
++ c = au_cache_alloc_icntnr(sb);
+ if (c) {
+ au_icntnr_init(c);
+ inode_set_iversion(&c->vfs_inode, 1); /* sigen(sb); */
+};
diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
--- /usr/share/empty/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/super.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,592 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c 2022-03-21 14:49:05.729966343 +0100
-@@ -0,0 +1,93 @@
++++ linux/fs/aufs/sysaufs.c 2022-08-02 12:12:45.168975258 +0200
+@@ -0,0 +1,94 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2005-2021 Junjiro R. Okajima
+ &sysaufs_si_attr_xi_path.attr,
+ NULL,
+};
++ATTRIBUTE_GROUPS(sysaufs_si);
+
+static const struct sysfs_ops au_sbi_ops = {
+ .show = sysaufs_si_show
+static struct kobj_type au_sbi_ktype = {
+ .release = au_si_free,
+ .sysfs_ops = &au_sbi_ops,
-+ .default_attrs = sysaufs_si_attrs
++ .default_groups = sysaufs_si_groups
+};
+
+/* ---------------------------------------------------------------------- */
+}
diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
--- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/sysaufs.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/sysfs.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,374 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
--- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c 2022-03-21 14:49:05.729966343 +0100
++++ linux/fs/aufs/sysrq.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,149 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
--- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/vdir.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,896 @@
+// SPDX-License-Identifier: GPL-2.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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/vfsub.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,918 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
--- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/vfsub.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,358 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/wbr_policy.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,830 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+};
diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
--- /usr/share/empty/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/whout.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,1072 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
--- /usr/share/empty/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/whout.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,87 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/wkq.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,372 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
--- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/wkq.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+#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 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xattr.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/xattr.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,368 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
--- /usr/share/empty/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c 2022-03-21 14:49:05.733299677 +0100
++++ linux/fs/aufs/xino.c 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,1926 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+}
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 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h 2022-03-21 14:49:05.733299677 +0100
++++ linux/include/uapi/linux/aufs_type.h 2022-08-02 12:12:45.168975258 +0200
@@ -0,0 +1,452 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+#include <limits.h>
+#endif /* __KERNEL__ */
+
-+#define AUFS_VERSION "5.x-rcN-20220314"
++#define AUFS_VERSION "5.x-rcN-20220711"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
aufs5.x-rcN loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 9009a0efc4b28..60307b90fbead 100644
+index a705173cf452..642a93f4fdee 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
+@@ -54,7 +54,7 @@ struct loop_device {
+ int lo_flags;
+ char lo_file_name[LO_NAME_SIZE];
+
+- struct file * lo_backing_file;
++ struct file *lo_backing_file, *lo_backing_virt_file;
+ struct block_device *lo_device;
+
+ gfp_t old_gfp_mask;
@@ -510,6 +510,15 @@ static inline void loop_update_dio(struct loop_device *lo)
lo->use_dio);
}
int error;
bool partscan;
bool is_loop;
-@@ -586,11 +596,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -590,11 +600,19 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
if (!(lo->lo_flags & LO_FLAGS_READ_ONLY))
goto out_err;
error = -EINVAL;
-@@ -603,6 +621,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -607,6 +625,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));
-@@ -625,6 +644,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -629,6 +648,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
* dependency.
*/
fput(old_file);
+ fput(old_virt_file);
if (partscan)
loop_reread_partitions(lo);
- return 0;
-@@ -633,6 +654,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+
+@@ -642,6 +663,8 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
loop_global_unlock(lo, is_loop);
out_putf:
fput(file);
+ if (virt_file)
+ fput(virt_file);
- return error;
+ goto done;
}
-@@ -971,6 +994,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
+@@ -1008,6 +1031,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
const struct loop_config *config)
{
struct file *file = fget(config->fd);
struct inode *inode;
struct address_space *mapping;
int error;
-@@ -986,6 +1010,13 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
- /* This is safe, since we have a reference from open(). */
- __module_get(THIS_MODULE);
+@@ -1026,6 +1050,13 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
+ /* suppress uevents while reconfiguring the device */
+ dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1);
+ f = loop_real_file(file);
+ if (f) {
/*
* If we don't hold exclusive handle for the device, upgrade to it
* here to avoid changing device under exclusive owner.
-@@ -1051,6 +1082,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
+@@ -1086,6 +1117,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO;
lo->lo_device = bdev;
lo->lo_backing_file = file;
lo->old_gfp_mask = mapping_gfp_mask(mapping);
mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
-@@ -1101,6 +1133,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
+@@ -1141,6 +1173,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
bd_abort_claiming(bdev, loop_configure);
out_putf:
fput(file);
+ fput(virt_file);
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
- return error;
-@@ -1109,6 +1143,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
+ goto done;
+@@ -1149,6 +1183,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
static void __loop_clr_fd(struct loop_device *lo, bool release)
{
struct file *filp;
+ struct file *virt_filp = lo->lo_backing_virt_file;
gfp_t gfp = lo->old_gfp_mask;
- struct loop_worker *pos, *worker;
-@@ -1154,6 +1189,7 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
+ if (test_bit(QUEUE_FLAG_WC, &lo->lo_queue->queue_flags))
+@@ -1165,6 +1200,7 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
spin_lock_irq(&lo->lo_lock);
filp = lo->lo_backing_file;
lo->lo_backing_file = NULL;
spin_unlock_irq(&lo->lo_lock);
lo->lo_device = NULL;
-@@ -1215,6 +1251,8 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
+@@ -1227,6 +1263,8 @@ static void __loop_clr_fd(struct loop_device *lo, bool release)
* fput can take open_mutex which is usually taken before lo_mutex.
*/
fput(filp);
}
static int loop_clr_fd(struct loop_device *lo)
-diff --git a/drivers/block/loop.h b/drivers/block/loop.h
-index 082d4b6bfc6a6..61feca64688df 100644
---- a/drivers/block/loop.h
-+++ b/drivers/block/loop.h
-@@ -34,7 +34,7 @@ struct loop_device {
- int lo_flags;
- char lo_file_name[LO_NAME_SIZE];
-
-- struct file * lo_backing_file;
-+ struct file *lo_backing_file, *lo_backing_virt_file;
- struct block_device *lo_device;
-
- gfp_t old_gfp_mask;
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
-index 99ceca1440449..e49dfe8550329 100644
+index 99ceca144044..e49dfe855032 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -304,7 +304,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 74347bd75b380..5ef888a1d53f4 100644
+index 74347bd75b38..5ef888a1d53f 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 7293bee427f96..3345c098d0d47 100644
+index 7293bee427f9..3345c098d0d4 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 90043afec51c1..0835f6da42d97 100644
+index 7d9bcc074c87..0eefe350c01c 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -758,7 +758,10 @@ const struct super_operations aufs_sop = {
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 5479e6dc18a23..05fe92d076c19 100644
+index f5aed17b2ce2..6b2d2256be5f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -2137,6 +2137,10 @@ struct super_operations {
+@@ -2121,6 +2121,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);