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, 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);