aufs6.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
-index 7e0b87d5aa2e..ce2984ca2f06 100644
+index e0ad886d3163..a27659e1886b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -3387,6 +3387,19 @@ F: include/uapi/linux/audit.h
+@@ -3380,6 +3380,19 @@ F: include/uapi/linux/audit.h
F: kernel/audit*
F: lib/*audit.c
+F: fs/aufs/
+F: include/uapi/linux/aufs_type.h
+
- AUXILIARY DISPLAY DRIVERS
- M: Miguel Ojeda <ojeda@kernel.org>
- S: Maintained
+ AUXILIARY BUS DRIVER
+ M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ R: Dave Ertman <david.m.ertman@intel.com>
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index bc31bb7072a2..131294601819 100644
--- a/drivers/block/loop.c
{
if (unlikely(!out->f_op->splice_write))
return warn_unsupported(out, "write");
-@@ -876,9 +876,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.
- */
--static long do_splice_to(struct file *in, loff_t *ppos,
-- struct pipe_inode_info *pipe, size_t len,
-- unsigned int flags)
-+long do_splice_to(struct file *in, loff_t *ppos,
-+ struct pipe_inode_info *pipe, size_t len,
-+ unsigned int flags)
- {
- unsigned int p_space;
- int ret;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 21a981680856..1e3054e5367d 100644
--- a/include/linux/fs.h
extern int f_setown(struct file *filp, unsigned long arg, int force);
extern void f_delown(struct file *filp);
@@ -1793,6 +1794,7 @@ struct file_operations {
- ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
+ int (*lock) (struct file *, int, struct file_lock *);
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
int (*check_flags)(int);
+ int (*setfl)(struct file *, unsigned long);
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 *);
+@@ -93,4 +93,7 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
extern const struct pipe_buf_operations default_pipe_buf_ops;
+
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
-+extern long do_splice_to(struct file *in, loff_t *ppos,
-+ struct pipe_inode_info *pipe, size_t len,
-+ unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index dcd1d5bfc1e0..85d1f7e0bc07 100644
+
+#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,
+ static inline struct vm_area_struct *vma_lookup(struct mm_struct *mm,
+ unsigned long addr);
+
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 306a3d1a0fa6..56374f0eb825 100644
--- a/include/linux/mm_types.h
if (folio->mapping != mapping) {
folio_unlock(folio);
diff --git a/mm/mmap.c b/mm/mmap.c
-index 13678edaa22c..4de00f38822c 100644
+index 13678edaa22c..3b5dd8a8d627 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -140,7 +140,7 @@ static void remove_vma(struct vm_area_struct *vma, bool unreachable)
mpol_put(vma_policy(vma));
if (unreachable)
__vm_area_free(vma);
+@@ -607,7 +607,7 @@ static inline void vma_complete(struct vma_prepare *vp,
+ if (vp->file) {
+ uprobe_munmap(vp->remove, vp->remove->vm_start,
+ vp->remove->vm_end);
+- fput(vp->file);
++ vma_fput(vp->vma);
+ }
+ if (vp->remove->anon_vma)
+ anon_vma_merge(vp->vma, vp->remove);
@@ -2269,7 +2269,7 @@ int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
goto out_free_mpol;
if (new->vm_ops && new->vm_ops->open)
new->vm_ops->open(new);
+@@ -2679,7 +2679,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+ * and cause general protection fault
+ * ultimately.
+ */
+- fput(vma->vm_file);
++ vma_fput(vma);
+ vm_area_free(vma);
+ vma = merge;
+ /* Update vm_flags to pick up the change. */
@@ -2774,7 +2774,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
if (file || vma->vm_file) {
+ new_vma = find_vma(mm, ret);
+ if (!new_vma->vm_prfile)
+ new_vma->vm_prfile = prfile;
-+ if (new_vma != vma)
++ if (prfile)
+ get_file(prfile);
+ }
+ /*
+EXPORT_SYMBOL_GPL(do_splice_from);
/*
- * Attempt to initiate a splice from a file to a pipe.
-@@ -901,6 +902,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
- return warn_unsupported(in, "read");
- return in->f_op->splice_read(in, ppos, pipe, len, flags);
- }
-+EXPORT_SYMBOL_GPL(do_splice_to);
-
- /**
- * splice_direct_to_actor - splices data directly between two non-pipes
+ * Indicate to the caller that there was a premature EOF when reading from the
diff --git a/fs/xattr.c b/fs/xattr.c
index fcf67d80d7f9..174dfb9285fb 100644
--- a/fs/xattr.c
+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 2023-07-04 23:43:55.846316200 +0200
-@@ -0,0 +1,408 @@
++++ linux/Documentation/filesystems/aufs/README 2023-08-28 12:34:41.669969465 +0200
+@@ -0,0 +1,409 @@
+
+Aufs6 -- advanced multi layered unification filesystem version 6.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).
-+huronOS team: Enya Quetzalli made donations (2022/5 and 2023/5).
++huronOS team: Enya Quetzalli made donations (2022/5, 2023/5 and 8).
++Vasily Mikhaylichenko made a donation (2023/5).
+
+Thank you very much.
+Donations are always, including future donations, very important and
+}
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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/branch.h 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,375 @@
+/* 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/cpup.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,1459 @@
+// 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 2023-02-20 21:05:51.959693785 +0100
++++ linux/fs/aufs/debug.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,446 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/dentry.c 2023-08-28 12:34:39.956636132 +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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/dentry.h 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,270 @@
+/* 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/dir.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,765 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/inode.c 2023-08-28 12:34:39.956636132 +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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/inode.h 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,707 @@
+/* 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/i_op_add.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,972 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/i_op.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,1517 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/i_op_del.c 2023-08-28 12:34:39.956636132 +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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/i_op_ren.c 2023-08-28 12:34:39.956636132 +0200
@@ -0,0 +1,1257 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/posix_acl.c 2023-08-28 12:34:39.959969465 +0200
@@ -0,0 +1,108 @@
+// 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/vfsub.c 2023-08-28 12:34:39.999969465 +0200
@@ -0,0 +1,918 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ long err;
+
+ lockdep_off();
-+ err = do_splice_to(in, ppos, pipe, len, flags);
++ err = vfs_splice_read(in, ppos, pipe, len, flags);
+ lockdep_on();
+ file_accessed(in);
+ if (err >= 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 2023-04-24 08:13:40.969576115 +0200
++++ linux/fs/aufs/vfsub.h 2023-08-28 12:34:39.999969465 +0200
@@ -0,0 +1,390 @@
+/* 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 2023-04-24 08:13:40.972909448 +0200
++++ linux/fs/aufs/whout.c 2023-08-28 12:34:39.999969465 +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 2023-04-24 08:13:40.972909448 +0200
++++ linux/fs/aufs/whout.h 2023-08-28 12:34:39.999969465 +0200
@@ -0,0 +1,87 @@
+/* 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 2023-07-04 23:43:55.849649534 +0200
++++ linux/fs/aufs/xattr.c 2023-08-28 12:34:39.999969465 +0200
@@ -0,0 +1,360 @@
+// 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 2023-04-24 08:13:40.972909448 +0200
++++ linux/fs/aufs/xino.c 2023-08-28 12:34:39.999969465 +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 2023-07-04 23:43:55.849649534 +0200
++++ linux/include/uapi/linux/aufs_type.h 2023-08-28 12:34:41.669969465 +0200
@@ -0,0 +1,452 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+#include <limits.h>
+#endif /* __KERNEL__ */
+
-+#define AUFS_VERSION "6.x-rcN-20230515"
++#define AUFS_VERSION "6.x-rcN-20230828"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1934,6 +1934,10 @@ struct super_operations {
- struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);
+ void (*shutdown)(struct super_block *sb);
+#if IS_ENABLED(CONFIG_BLK_DEV_LOOP) || IS_ENABLED(CONFIG_BLK_DEV_LOOP_MODULE)
+ /* and aufs */
+ struct file *(*real_loop)(struct file *);