diff --git a/fs.c b/fs.c index 7bd6ac3..0dc4aa1 100644 --- a/fs.c +++ b/fs.c @@ -25,6 +25,14 @@ struct dentry *simplefs_mount(struct file_system_type *fs_type, /* Unmount a simplefs partition */ void simplefs_kill_sb(struct super_block *sb) { + struct simplefs_sb_info *sbi = SIMPLEFS_SB(sb); +#if SIMPLEFS_AT_LEAST(6, 9, 0) + if (sbi->s_journal_bdev_file) + fput(sbi->s_journal_bdev_file); +#elif SIMPLEFS_AT_LEAST(6, 7, 0) + if (sbi->s_journal_bdev_handle) + bdev_release(sbi->s_journal_bdev_handle); +#endif kill_block_super(sb); pr_info("unmounted disk\n"); diff --git a/super.c b/super.c index c489e27..2e4924f 100644 --- a/super.c +++ b/super.c @@ -372,12 +372,9 @@ static journal_t *simplefs_get_dev_journal(struct super_block *sb, } #if SIMPLEFS_AT_LEAST(6, 9, 0) sbi->s_journal_bdev_file = bdev_file; - pr_info("6.11 kernel"); #elif SIMPLEFS_AT_LEAST(6, 7, 0) sbi->s_journal_bdev_handle = bdev_handle; - pr_info("6.8 kernel"); #elif SIMPLEFS_AT_LEAST(5, 15, 0) - pr_info("5.15 kernel"); sbi->s_journal_bdev = bdev; #endif