@@ -1,5 +1,5 @@
SPDX-License-Identifier: GPL-2.0
aufs6.1 standalone patch
aufs6.2 standalone patch

diff --git a/fs/dcache.c b/fs/dcache.c
index 519321f32f95..267e0c65914a 100644
@@ -22,10 +22,10 @@ index 519321f32f95..267e0c65914a 100644
/**
* d_ancestor - search for an ancestor
diff --git a/fs/exec.c b/fs/exec.c
index a0b1f0337a62..2038fdb508c9 100644
index ab913243a367..d84461fddf7d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -110,6 +110,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);
}
@@ -58,26 +58,26 @@ index dd88701e54a9..ecdb7817b074 100644
/*
* Variant of alloc_empty_file() that doesn't check and modify nr_files.
diff --git a/fs/namespace.c b/fs/namespace.c
index faae7f8644ac..0310c99a83dd 100644
index 8cd34f760f63..799a94205906 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -456,6 +456,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
@@ -571,6 +571,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
mnt_dec_writers(real_mount(mnt));
preempt_enable();
}
+EXPORT_SYMBOL_GPL(__mnt_drop_write);

/**
* mnt_drop_write - give up write access to a mount
@@ -857,6 +858,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
@@ -968,6 +969,7 @@ int is_current_mnt_ns(struct vfsmount *mnt)
{
return check_mnt(real_mount(mnt));
}
+EXPORT_SYMBOL_GPL(is_current_mnt_ns);

/*
* vfsmount lock must be held for write
@@ -2060,6 +2062,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
@@ -2165,6 +2167,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
@@ -98,7 +98,7 @@ index 1de6631a3925..3008eb37a18d 100644
/*
* Drop a reference to a group. Free it if it's through.
diff --git a/fs/open.c b/fs/open.c
index a81319b6177f..50bb15ea3fb5 100644
index 82c1a28b3308..e7bd6f1c9474 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -66,6 +66,7 @@ int do_truncate(struct user_namespace *mnt_userns, struct dentry *dentry,
@@ -110,7 +110,7 @@ index a81319b6177f..50bb15ea3fb5 100644
long vfs_truncate(const struct path *path, loff_t length)
{
diff --git a/fs/read_write.c b/fs/read_write.c
index 24b9668d6377..f43afc2f5428 100644
index 7a2ff6157eda..76f5d4d08687 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -477,6 +477,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
@@ -130,7 +130,7 @@ index 24b9668d6377..f43afc2f5428 100644
/* 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 d83f9e5cddbc..ac355ebeb9f0 100644
index 21db9b057d60..abcd14f52c1e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -763,6 +763,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
@@ -150,10 +150,10 @@ index d83f9e5cddbc..ac355ebeb9f0 100644
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/fs/xattr.c b/fs/xattr.c
index 61107b6bbed2..243855024966 100644
index adab9a70b536..b2dc4fc0b25b 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -392,6 +392,7 @@ vfs_getxattr_alloc(struct user_namespace *mnt_userns, struct dentry *dentry,
@@ -407,6 +407,7 @@ vfs_getxattr_alloc(struct user_namespace *mnt_userns, struct dentry *dentry,
*xattr_value = value;
return error;
}
@@ -183,70 +183,70 @@ index 065e1ef8fc8d..c623c6f0c645 100644
}
+EXPORT_SYMBOL_GPL(task_work_run);
diff --git a/security/security.c b/security/security.c
index 79d82cb6e469..1c50e6faadcd 100644
index d1571900a8c7..6fdcf98bf7ea 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1167,6 +1167,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
@@ -1195,6 +1195,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry)
return 0;
return call_int_hook(path_rmdir, 0, dir, dentry);
}
+EXPORT_SYMBOL_GPL(security_path_rmdir);

int security_path_unlink(const struct path *dir, struct dentry *dentry)
{
@@ -1183,6 +1184,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry,
@@ -1211,6 +1212,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);
}
+EXPORT_SYMBOL_GPL(security_path_symlink);

int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
struct dentry *new_dentry)
@@ -1191,6 +1193,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
@@ -1219,6 +1221,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);
}
+EXPORT_SYMBOL_GPL(security_path_link);

int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
const struct path *new_dir, struct dentry *new_dentry,
@@ -1211,6 +1214,7 @@ int security_path_truncate(const struct path *path)
return 0;
return call_int_hook(path_truncate, 0, path);
}
+EXPORT_SYMBOL_GPL(security_path_truncate);

int security_path_chmod(const struct path *path, umode_t mode)
{
@@ -1218,6 +1222,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
@@ -1246,6 +1249,7 @@ int security_path_chmod(const struct path *path, umode_t mode)
return 0;
return call_int_hook(path_chmod, 0, path, mode);
}
+EXPORT_SYMBOL_GPL(security_path_chmod);

int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
{
@@ -1225,6 +1230,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
@@ -1253,6 +1257,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);
}
+EXPORT_SYMBOL_GPL(security_path_chown);

int security_path_chroot(const struct path *path)
{
@@ -1325,6 +1331,7 @@ int security_inode_permission(struct inode *inode, int mask)
@@ -1353,6 +1358,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return call_int_hook(inode_permission, 0, inode, mask);
}
+EXPORT_SYMBOL_GPL(security_inode_permission);

int security_inode_setattr(struct user_namespace *mnt_userns,
struct dentry *dentry, struct iattr *attr)
@@ -1523,6 +1530,7 @@ int security_file_permission(struct file *file, int mask)
@@ -1593,6 +1599,7 @@ int security_file_permission(struct file *file, int mask)

return fsnotify_perm(file, mask);
}
+EXPORT_SYMBOL_GPL(security_file_permission);

int security_file_alloc(struct file *file)
{
@@ -1726,6 +1733,7 @@ int security_file_truncate(struct file *file)
{
return call_int_hook(file_truncate, 0, file);
}
+EXPORT_SYMBOL_GPL(security_file_truncate);

int security_task_alloc(struct task_struct *task, unsigned long clone_flags)
{

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -5,7 +5,7 @@ rm -Rf aufs-standalone
git clone https://github.com/sfjro/aufs-standalone.git aufs6-standalone
cd aufs6-standalone
git branch -r
git checkout origin/aufs6.1
git checkout origin/aufs6.2

# modify what you want

@@ -14,17 +14,17 @@ git checkout origin/aufs6.1

rm -v $(find . -type f -name '*.orig')
grep -qse 'EXPORT_SYMBOL(' aufs6-standalone.patch && \
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs5-standalone.patch
rm -rf ../tmp/linux-6.1
mkdir -p ../tmp/linux-6.1
cp -a fs ../tmp/linux-6.1
cp -a include ../tmp/linux-6.1
cp -a Documentation ../tmp/linux-6.1
rm ../tmp/linux-6.1/include/uapi/linux/Kbuild
sed -i-old -e 's|EXPORT_SYMBOL(|EXPORT_SYMBOL_GPL(|' aufs6-standalone.patch
rm -rf ../tmp/linux-6.2
mkdir -p ../tmp/linux-6.2
cp -a fs ../tmp/linux-6.2
cp -a include ../tmp/linux-6.2
cp -a Documentation ../tmp/linux-6.2
rm ../tmp/linux-6.2/include/uapi/linux/Kbuild
cd ../tmp
diff -Naur null linux-6.1 | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-6.1-old\1|;s|^--- null.*|--- /dev/null|;\|linux-6.1/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-6.1/include/uapi/linux/aufs_type.h).patch.bz2
diff -Naur null linux-6.2 | filterdiff | \
sed -e 's|null\(/include/uapi/linux/Kbuild\)|linux-6.2-old\1|;s|^--- null.*|--- /dev/null|;\|linux-6.2/include/uapi/linux/Kbuild|,${\|@@ -0,0 +1 @@|,$d}' \
| bzip2 > aufs$(sed -ne 's|#define.*AUFS_VERSION.*"\(.*\)"|\1|p' linux-6.2/include/uapi/linux/aufs_type.h).patch.bz2
mv *.bz2 $OLDPWD
cd $OLDPWD
mv *patch* ..
@@ -2,7 +2,7 @@
# arg 2: the old package version

KERNEL_NAME=
KERNEL_VERSION=6.1.11-1
KERNEL_VERSION=6.2.10-1

# set a sane PATH to ensure that critical utils like depmod will be found
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
@@ -21,7 +21,7 @@ index d500ea967dc7..2f3b3461b79c 100644
umode_t mode; /* Mount mode for root directory */
unsigned char huge; /* Whether to try for hugepages */
diff --git a/mm/shmem.c b/mm/shmem.c
index 82911fefc2d5..efc1b7e5dfa5 100644
index 0005ab2c29af..4aa77229802d 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -108,7 +108,7 @@ struct shmem_falloc {
@@ -50,7 +50,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
}
#endif

@@ -1174,6 +1177,11 @@ static void shmem_evict_inode(struct inode *inode)
@@ -1171,6 +1174,11 @@ static void shmem_evict_inode(struct inode *inode)

simple_xattrs_free(&info->xattrs);
WARN_ON(inode->i_blocks);
@@ -62,7 +62,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
shmem_free_inode(inode->i_sb);
clear_inode(inode);
}
@@ -2389,6 +2397,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, struct inode *dir,
@@ -2390,6 +2398,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, struct inode *dir,
break;
}

@@ -88,7 +88,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
lockdep_annotate_inode_mutex_key(inode);
} else
shmem_free_inode(sb);
@@ -3370,8 +3397,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
@@ -3371,8 +3398,7 @@ static struct dentry *shmem_get_parent(struct dentry *child)
static int shmem_match(struct inode *ino, void *vfh)
{
__u32 *fh = vfh;
@@ -98,7 +98,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
return ino->i_ino == inum && fh[0] == ino->i_generation;
}

@@ -3391,14 +3417,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3392,14 +3418,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct dentry *dentry = NULL;
u64 inum;

@@ -116,7 +116,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
if (inode) {
dentry = shmem_find_alias(inode);
iput(inode);
@@ -3410,30 +3433,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
@@ -3411,30 +3434,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{
@@ -150,7 +150,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
return 1;
}

@@ -3512,7 +3520,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
@@ -3513,7 +3521,7 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
break;
case Opt_nr_inodes:
ctx->inodes = memparse(param->string, &rest);
@@ -159,7 +159,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
goto bad_value;
ctx->seen |= SHMEM_SEEN_INODES;
break;
@@ -3622,7 +3630,7 @@ static int shmem_reconfigure(struct fs_context *fc)
@@ -3623,7 +3631,7 @@ static int shmem_reconfigure(struct fs_context *fc)
{
struct shmem_options *ctx = fc->fs_private;
struct shmem_sb_info *sbinfo = SHMEM_SB(fc->root->d_sb);
@@ -168,7 +168,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
struct mempolicy *mpol = NULL;
const char *err;

@@ -3692,7 +3700,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
@@ -3693,7 +3701,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root)
seq_printf(seq, ",size=%luk",
sbinfo->max_blocks << (PAGE_SHIFT - 10));
if (sbinfo->max_inodes != shmem_default_max_inodes())
@@ -177,7 +177,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
if (sbinfo->mode != (0777 | S_ISVTX))
seq_printf(seq, ",mode=%03ho", sbinfo->mode);
if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID))
@@ -3739,6 +3747,8 @@ static void shmem_put_super(struct super_block *sb)
@@ -3740,6 +3748,8 @@ static void shmem_put_super(struct super_block *sb)
{
struct shmem_sb_info *sbinfo = SHMEM_SB(sb);

@@ -186,7 +186,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
free_percpu(sbinfo->ino_batch);
percpu_counter_destroy(&sbinfo->used_blocks);
mpol_put(sbinfo->mpol);
@@ -3781,6 +3791,8 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
@@ -3782,6 +3792,8 @@ static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
#else
sb->s_flags |= SB_NOUSER;
#endif
@@ -195,7 +195,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
sbinfo->max_blocks = ctx->blocks;
sbinfo->free_inodes = sbinfo->max_inodes = ctx->inodes;
if (sb->s_flags & SB_KERNMOUNT) {
@@ -3905,6 +3917,15 @@ static int shmem_error_remove_page(struct address_space *mapping,
@@ -3906,6 +3918,15 @@ static int shmem_error_remove_page(struct address_space *mapping,
return 0;
}

@@ -211,7 +211,7 @@ index 82911fefc2d5..efc1b7e5dfa5 100644
const struct address_space_operations shmem_aops = {
.writepage = shmem_writepage,
.dirty_folio = noop_dirty_folio,
@@ -4052,6 +4073,7 @@ void __init shmem_init(void)
@@ -4063,6 +4084,7 @@ void __init shmem_init(void)
pr_err("Could not kern_mount tmpfs\n");
goto out1;
}
@@ -1,7 +1,7 @@
SPDX-License-Identifier: GPL-2.0

diff --git a/fs/inode.c b/fs/inode.c
index b608528efd3a..5456baf29947 100644
index f453eb58fd03..c35ad741cd99 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -984,6 +984,8 @@ unsigned int get_next_ino(void)
@@ -1,23 +1,29 @@

_extramodules=6.0.12-1
_kver="$(cat /lib/modules/extramodules-6.0/version)"
_extramodules=6.2.10-1
_kver="$(cat /lib/modules/extramodules-6.2/version)"

pkgname=zfs-headers
pkgver=2.1.9
pkgrel=1
pkgrel=2
pkgdesc="Kernel headers for the Zettabyte File System."
arch=('x86_64')
url="https://zfsonlinux.org/"
license=('CDDL')
depends=('kmod' 'linux' "zfs=${pkgver}")
makedepends=('linux-headers' 'elfutils')
source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz")
sha256sums=("6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6")
source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz"
"https://github.com/openzfs/zfs/commit/3ace9dea01f2088e81c0b90ca8e07faad7364eca.diff"
"https://github.com/openzfs/zfs/commit/2e9c9b792fd34b4fe1fb524444529f41bcb1b7c5.diff")
sha256sums=('6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6'
'1c1322194bbaee4c13186033b9b25eed1440b1f076faf735e45aa7a30fd6dd87'
'41e05c2f20e630c8f943af253fa73024b1cb8e222c7caf3ed5883d58ca2cc31e')

build() {
cd zfs-${pkgver}
patch -p1 -i ${srcdir}/3ace9dea01f2088e81c0b90ca8e07faad7364eca.diff
patch -p1 -i ${srcdir}/2e9c9b792fd34b4fe1fb524444529f41bcb1b7c5.diff

#./autogen.sh
./autogen.sh
./configure --prefix=/usr \
--sysconfdir=/etc \
--datadir=/usr/share \
@@ -1,26 +1,32 @@

_extramodules=6.1.11-1
__extramodules=extramodules-6.1
_extramodules=6.2.10-1
__extramodules=extramodules-6.2
_kver="$(cat /lib/modules/${__extramodules}/version)"

pkgname=zfs-kmod
pkgver=2.1.9
pkgrel=4
pkgrel=5
pkgdesc="Kernel module for the Zettabyte File System."
arch=('x86_64')
url="https://zfsonlinux.org/"
license=('CDDL')
depends=('kmod' 'linux' "zfs=${pkgver}" 'zfs-headers')
makedepends=('linux-headers' 'elfutils')
install=zfs-kmod.install
source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz")
source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz"
"https://github.com/openzfs/zfs/commit/3ace9dea01f2088e81c0b90ca8e07faad7364eca.diff"
"https://github.com/openzfs/zfs/commit/2e9c9b792fd34b4fe1fb524444529f41bcb1b7c5.diff")
#source=("https://github.com/openzfs/zfs/archive/${_commit}.zip")
sha256sums=("6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6")
sha256sums=('6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6'
'1c1322194bbaee4c13186033b9b25eed1440b1f076faf735e45aa7a30fd6dd87'
'41e05c2f20e630c8f943af253fa73024b1cb8e222c7caf3ed5883d58ca2cc31e')

build() {
cd zfs-${pkgver}
patch -p1 -i ${srcdir}/3ace9dea01f2088e81c0b90ca8e07faad7364eca.diff
patch -p1 -i ${srcdir}/2e9c9b792fd34b4fe1fb524444529f41bcb1b7c5.diff

#./autogen.sh
./autogen.sh
./configure --prefix=/usr \
--sysconfdir=/etc \
--datadir=/usr/share \
@@ -1,15 +1,15 @@
post_install() {
EXTRAMODULES='extramodules-6.1'
EXTRAMODULES='extramodules-6.2'
depmod -a $(cat /lib/modules/$EXTRAMODULES/version)
}

post_upgrade() {
EXTRAMODULES='extramodules-6.1'
EXTRAMODULES='extramodules-6.2'
depmod -a $(cat /lib/modules/$EXTRAMODULES/version)
}

post_remove() {
EXTRAMODULES='extramodules-6.1'
EXTRAMODULES='extramodules-6.2'
depmod -a $(cat /lib/modules/$EXTRAMODULES/version)

}