From 50182b80610d32ec8a7f496365fa983129c001a6 Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Sun, 11 Oct 2026 22:54:26 +0900 Subject: [PATCH 1/2] Update simplefs_create() argument for linux 7.3 In linux kernel 7.3, inode_operations->create changed its argument to not have bool excl arguemnt because it is not used in all mainline linux source code base. Remove the excl argument for kernels higher than 7.3 --- inode.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/inode.c b/inode.c index dacc95f..7c7a44e 100644 --- a/inode.c +++ b/inode.c @@ -500,7 +500,12 @@ static bool simplefs_try_remove_entry(struct simplefs_dir_block *dblock, * - cleanup index block of the new inode * - add new file/directory in parent index */ -#if SIMPLEFS_AT_LEAST(6, 3, 0) +#if SIMPLEFS_AT_LEAST(7, 3, 0) +static int simplefs_create(struct mnt_idmap *id, + struct inode *dir, + struct dentry *dentry, + umode_t mode) +#elif SIMPLEFS_AT_LEAST(6, 3, 0) static int simplefs_create(struct mnt_idmap *id, struct inode *dir, struct dentry *dentry, @@ -1070,8 +1075,16 @@ static int simplefs_rename(struct inode *src_dir, RELEASE_BUFFER_HEAD(src_bi_bh); return ret; } - -#if SIMPLEFS_AT_LEAST(6, 15, 0) +#if SIMPLEFS_AT_LEAST(7, 3, 0) +static struct dentry *simplefs_mkdir(struct mnt_idmap *id, + struct inode *dir, + struct dentry *dentry, + umode_t mode) +{ + int ret = simplefs_create(id, dir, dentry, mode | S_IFDIR); + return ret ? ERR_PTR(ret) : NULL; +} +#elif SIMPLEFS_AT_LEAST(6, 15, 0) static struct dentry *simplefs_mkdir(struct mnt_idmap *id, struct inode *dir, struct dentry *dentry, From 6b3d0618751593e3e57ae1a60333b9b36aed6555 Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Sun, 11 Oct 2026 23:03:53 +0900 Subject: [PATCH 2/2] Change bdev_file opening function for linux 7.3 Linux 7.3 removed extern fs_holder_ops and made it private as filesystems can open and claim block devices with fs_bdev_file_open_by_{dev,path}(). Replace bdev_file_open_by_dev() which requires fs_holder_ops with fs_bdev_file_open_by_dev(), which does not. --- super.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/super.c b/super.c index 7308d21..72dc964 100644 --- a/super.c +++ b/super.c @@ -265,7 +265,12 @@ static journal_t *simplefs_get_dev_journal(struct super_block *sb, unsigned long offset; journal_t *journal; int errno = 0; -#if SIMPLEFS_AT_LEAST(6, 9, 0) +#if SIMPLEFS_AT_LEAST(7, 3, 0) + struct file *bdev_file; + bdev_file = fs_bdev_file_open_by_dev( + journal_dev, BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_RESTRICT_WRITES, + sb, sb); +#elif SIMPLEFS_AT_LEAST(6, 9, 0) struct file *bdev_file; bdev_file = bdev_file_open_by_dev( journal_dev, BLK_OPEN_READ | BLK_OPEN_WRITE | BLK_OPEN_RESTRICT_WRITES, @@ -385,7 +390,9 @@ static journal_t *simplefs_get_dev_journal(struct super_block *sb, return journal; out_bdev: -#if SIMPLEFS_AT_LEAST(6, 9, 0) +#if SIMPLEFS_AT_LEAST(7, 3, 0) + fs_bdev_file_release(bdev_file, sb); +#elif SIMPLEFS_AT_LEAST(6, 9, 0) fput(bdev_file); #elif SIMPLEFS_AT_LEAST(6, 7, 0) bdev_release(bdev_handle);