Skip to content

Commit 93e2334

Browse files
committed
exfat: fix build error on linux-5.4,5.5 kernel
Signed-off-by: Namjae Jeon <[email protected]>
1 parent 01a7b8c commit 93e2334

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

super.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
#include <linux/version.h>
7-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
7+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
88
#include <linux/fs_context.h>
99
#include <linux/fs_parser.h>
1010
#else
@@ -237,7 +237,7 @@ static const struct super_operations exfat_sops = {
237237
.show_options = exfat_show_options,
238238
};
239239

240-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
240+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
241241
enum {
242242
Opt_uid,
243243
Opt_gid,
@@ -303,7 +303,7 @@ static const struct fs_parameter_spec exfat_param_specs[] = {
303303
{}
304304
};
305305

306-
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 5, 0)
306+
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 6, 0)
307307
static const struct fs_parameter_description exfat_parameters = {
308308
.name = "exfat",
309309
.specs = exfat_param_specs,
@@ -824,15 +824,15 @@ static int __exfat_fill_super(struct super_block *sb)
824824
return ret;
825825
}
826826

827-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
827+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
828828
static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
829829
#else
830830
static int exfat_fill_super(struct super_block *sb, void *data, int silent)
831831
#endif
832832
{
833833
struct inode *root_inode;
834834
int err;
835-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
835+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
836836
struct exfat_sb_info *sbi = sb->s_fs_info;
837837
struct exfat_mount_options *opts = &sbi->options;
838838

@@ -895,7 +895,7 @@ static int exfat_fill_super(struct super_block *sb, void *data, int silent)
895895
exfat_hash_init(sb);
896896

897897
if (!strcmp(sbi->options.iocharset, "utf8"))
898-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
898+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
899899
opts->utf8 = 1;
900900
#else
901901
sbi->options.utf8 = 1;
@@ -964,7 +964,7 @@ static int exfat_fill_super(struct super_block *sb, void *data, int silent)
964964
return err;
965965
}
966966

967-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
967+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
968968
static int exfat_get_tree(struct fs_context *fc)
969969
{
970970
return get_tree_bdev(fc, exfat_fill_super);
@@ -1031,13 +1031,9 @@ static struct dentry *exfat_fs_mount(struct file_system_type *fs_type,
10311031
static struct file_system_type exfat_fs_type = {
10321032
.owner = THIS_MODULE,
10331033
.name = "exfat",
1034-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
1035-
.init_fs_context = exfat_init_fs_context,
10361034
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
1035+
.init_fs_context = exfat_init_fs_context,
10371036
.parameters = exfat_parameters,
1038-
#else
1039-
.parameters = &exfat_parameters,
1040-
#endif
10411037
#else
10421038
.mount = exfat_fs_mount,
10431039
#endif

0 commit comments

Comments
 (0)