Skip to content

Commit

Permalink
exfat: fix build error with linux-5.15 kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Nov 27, 2024
1 parent b366b0b commit 9d1c29e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions super.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ static int exfat_show_options(struct seq_file *m, struct dentry *root)

int exfat_force_shutdown(struct super_block *sb, u32 flags)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 9, 0)
int ret;
#endif
struct exfat_sb_info *sbi = sb->s_fs_info;
struct exfat_mount_options *opts = &sbi->options;

Expand All @@ -187,10 +189,12 @@ int exfat_force_shutdown(struct super_block *sb, u32 flags)
switch (flags) {
case EXFAT_GOING_DOWN_DEFAULT:
case EXFAT_GOING_DOWN_FULLSYNC:
#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 9, 0)
ret = bdev_freeze(sb->s_bdev);
if (ret)
return ret;
bdev_thaw(sb->s_bdev);
#endif
set_bit(EXFAT_FLAGS_SHUTDOWN, &sbi->s_exfat_flags);
break;
case EXFAT_GOING_DOWN_NOSYNC:
Expand Down Expand Up @@ -240,7 +244,9 @@ static const struct super_operations exfat_sops = {
.sync_fs = exfat_sync_fs,
.statfs = exfat_statfs,
.show_options = exfat_show_options,
#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 16, 0)
.shutdown = exfat_shutdown,
#endif
};

enum {
Expand Down

0 comments on commit 9d1c29e

Please sign in to comment.