Skip to content

Commit

Permalink
6.11 20240923
Browse files Browse the repository at this point in the history
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
  • Loading branch information
sfjro committed Sep 17, 2024
1 parent 692b8fc commit fa57952
Show file tree
Hide file tree
Showing 9 changed files with 1,428 additions and 1 deletion.
219 changes: 219 additions & 0 deletions aufs6-base.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
SPDX-License-Identifier: GPL-2.0
aufs6.11 base patch

diff --git a/MAINTAINERS b/MAINTAINERS
index cc40a9d9b8cd..ba788b0b667c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3570,6 +3570,19 @@ F: kernel/audit*
F: lib/*audit.c
K: \baudit_[a-z_0-9]\+\b

+AUFS (advanced multi layered unification filesystem) FILESYSTEM
+M: "J. R. Okajima" <hooanon05g@gmail.com>
+L: aufs-users@lists.sourceforge.net (members only)
+L: linux-unionfs@vger.kernel.org
+S: Supported
+W: http://aufs.sourceforge.net
+T: git://github.com/sfjro/aufs4-linux.git
+F: Documentation/ABI/testing/debugfs-aufs
+F: Documentation/ABI/testing/sysfs-aufs
+F: Documentation/filesystems/aufs/
+F: fs/aufs/
+F: include/uapi/linux/aufs_type.h
+
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 78a7bb28defe..479480f25a6c 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -661,6 +661,26 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto done;
}

+/*
+ * for AUFS
+ * no get/put for file.
+ */
+/* Just to make the compiler silence, declare it */
+struct file *loop_backing_file(struct super_block *sb);
+struct file *loop_backing_file(struct super_block *sb)
+{
+ struct file *ret;
+ struct loop_device *l;
+
+ ret = NULL;
+ if (MAJOR(sb->s_dev) == LOOP_MAJOR) {
+ l = sb->s_bdev->bd_disk->private_data;
+ ret = l->lo_backing_file;
+ }
+ return ret;
+}
+EXPORT_SYMBOL_GPL(loop_backing_file);
+
/* loop sysfs attributes */

static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
index 6386b9b625dd..e5f57c3cfbfc 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1223,6 +1223,9 @@ enum d_walk_ret {
D_WALK_SKIP,
};

+/* AUFS calls d_walk(). Just to make the compiler silence, declare it */
+void d_walk(struct dentry *parent, void *data,
+ enum d_walk_ret (*enter)(void *, struct dentry *));
/**
* d_walk - walk the dentry tree
* @parent: start of walk
@@ -1231,7 +1234,7 @@ enum d_walk_ret {
*
* The @enter() callbacks are called with d_lock held.
*/
-static void d_walk(struct dentry *parent, void *data,
+void d_walk(struct dentry *parent, void *data,
enum d_walk_ret (*enter)(void *, struct dentry *))
{
struct dentry *this_parent, *dentry;
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 300e5d9ad913..3f927cbf63b3 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -35,7 +35,7 @@

#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)

-static int setfl(int fd, struct file * filp, unsigned int arg)
+int setfl(int fd, struct file * filp, unsigned int arg)
{
struct inode * inode = file_inode(filp);
int error = 0;
@@ -65,6 +65,8 @@ static int setfl(int fd, struct file * filp, unsigned int arg)

if (filp->f_op->check_flags)
error = filp->f_op->check_flags(arg);
+ if (!error && filp->f_op->setfl)
+ error = filp->f_op->setfl(filp, arg);
if (error)
return error;

diff --git a/fs/namespace.c b/fs/namespace.c
index 328087a4df8a..e033b3d72b00 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -966,6 +966,12 @@ static inline int check_mnt(struct mount *mnt)
return mnt->mnt_ns == current->nsproxy->mnt_ns;
}

+/* for aufs, CONFIG_AUFS_BR_FUSE */
+int is_current_mnt_ns(struct vfsmount *mnt)
+{
+ return check_mnt(real_mount(mnt));
+}
+
/*
* vfsmount lock must be held for write
*/
diff --git a/fs/splice.c b/fs/splice.c
index 60aed8de21f8..04af758d332c 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -933,7 +933,7 @@ static int warn_unsupported(struct file *file, const char *op)
/*
* Attempt to initiate a splice from pipe to file.
*/
-static ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
{
if (unlikely(!out->f_op->splice_write))
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6ca11e241a24..5092a7e8f9e9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1121,6 +1121,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 int arg);
extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
extern int f_setown(struct file *filp, int who, int force);
extern void f_delown(struct file *filp);
@@ -2042,6 +2043,7 @@ struct file_operations {
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);
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);
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 217f7abf2cbf..0e17b8c23f10 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -210,6 +210,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock,
return lock->key == key;
}

+struct lock_class *lockdep_hlock_class(struct held_lock *hlock);
+
/*
* Acquire a lock.
*
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 8f882f5881e8..6b9808f09843 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -7,12 +7,15 @@ struct mnt_namespace;
struct fs_struct;
struct user_namespace;
struct ns_common;
+struct vfsmount;

extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct user_namespace *, struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns);
extern struct ns_common *from_mnt_ns(struct mnt_namespace *);

+extern int is_current_mnt_ns(struct vfsmount *mnt);
+
extern const struct file_operations proc_mounts_operations;
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 9dec4861d09f..14583d846864 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -108,4 +108,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 ssize_t do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
#endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 0349f957e672..32be18a5ad55 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -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);

-static inline struct lock_class *hlock_class(struct held_lock *hlock)
+inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock)
{
unsigned int class_idx = hlock->class_idx;

@@ -238,6 +238,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)

#ifdef CONFIG_LOCK_STAT
static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats);
24 changes: 24 additions & 0 deletions aufs6-kbuild.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SPDX-License-Identifier: GPL-2.0
aufs6.11 kbuild patch

diff --git a/fs/Kconfig b/fs/Kconfig
index a46b0cbc4d8f..d90a3b0dbc53 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -337,6 +337,7 @@ source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/erofs/Kconfig"
source "fs/vboxsf/Kconfig"
+source "fs/aufs/Kconfig"

endif # MISC_FILESYSTEMS

diff --git a/fs/Makefile b/fs/Makefile
index 6ecc9b0a53f2..255420c2676e 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -129,3 +129,4 @@ obj-$(CONFIG_EFIVAR_FS) += efivarfs/
obj-$(CONFIG_EROFS_FS) += erofs/
obj-$(CONFIG_VBOXSF_FS) += vboxsf/
obj-$(CONFIG_ZONEFS_FS) += zonefs/
+obj-$(CONFIG_AUFS_FS) += aufs/
Loading

0 comments on commit fa57952

Please sign in to comment.