diff options
-rw-r--r-- | fs/erofs/super.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 961ee47e2b4d..c235a8e4315e 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -616,7 +616,11 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc) errorfc(fc, "unsupported blksize for fscache mode"); return -EINVAL; } - if (!sb_set_blocksize(sb, 1 << sbi->blkszbits)) { + + if (erofs_is_fileio_mode(sbi)) { + sb->s_blocksize = 1 << sbi->blkszbits; + sb->s_blocksize_bits = sbi->blkszbits; + } else if (!sb_set_blocksize(sb, 1 << sbi->blkszbits)) { errorfc(fc, "failed to set erofs blksize"); return -EINVAL; } |