Loading fs/bcachefs/super-io.c +4 −3 Original line number Diff line number Diff line Loading @@ -649,9 +649,10 @@ static int read_one_super(struct bch_sb_handle *sb, u64 offset, struct printbuf bytes = vstruct_bytes(sb->sb); if (bytes > 512ULL << min(BCH_SB_LAYOUT_SIZE_BITS_MAX, sb->sb->layout.sb_max_size_bits)) { prt_printf(err, "Invalid superblock: too big (got %zu bytes, layout max %lu)", bytes, 512UL << sb->sb->layout.sb_max_size_bits); u64 sb_size = 512ULL << min(BCH_SB_LAYOUT_SIZE_BITS_MAX, sb->sb->layout.sb_max_size_bits); if (bytes > sb_size) { prt_printf(err, "Invalid superblock: too big (got %zu bytes, layout max %llu)", bytes, sb_size); return -BCH_ERR_invalid_sb_too_big; } Loading Loading
fs/bcachefs/super-io.c +4 −3 Original line number Diff line number Diff line Loading @@ -649,9 +649,10 @@ static int read_one_super(struct bch_sb_handle *sb, u64 offset, struct printbuf bytes = vstruct_bytes(sb->sb); if (bytes > 512ULL << min(BCH_SB_LAYOUT_SIZE_BITS_MAX, sb->sb->layout.sb_max_size_bits)) { prt_printf(err, "Invalid superblock: too big (got %zu bytes, layout max %lu)", bytes, 512UL << sb->sb->layout.sb_max_size_bits); u64 sb_size = 512ULL << min(BCH_SB_LAYOUT_SIZE_BITS_MAX, sb->sb->layout.sb_max_size_bits); if (bytes > sb_size) { prt_printf(err, "Invalid superblock: too big (got %zu bytes, layout max %llu)", bytes, sb_size); return -BCH_ERR_invalid_sb_too_big; } Loading