From 9d1c29e070d656719a22e8257e7c605313224dcb Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Wed, 27 Nov 2024 15:38:10 +0900 Subject: [PATCH] exfat: fix build error with linux-5.15 kernel Signed-off-by: Namjae Jeon --- super.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/super.c b/super.c index 560f287..bbf72db 100644 --- a/super.c +++ b/super.c @@ -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; @@ -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: @@ -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 {