Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
3 changes: 0 additions & 3 deletions super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down