summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/ntfs3/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index aae1f32f4dab..a478ec510640 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -946,6 +946,11 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size,
sbi->volume.blocks = dev_size >> PAGE_SHIFT;
+ /* Set dummy blocksize to read boot_block. */
+ if (!sb_min_blocksize(sb, PAGE_SIZE)) {
+ return -EINVAL;
+ }
+
read_boot:
bh = ntfs_bread(sb, boot_block);
if (!bh)