Commit a6dc8c04 authored by Janne Kalliomäki's avatar Janne Kalliomäki Committed by Linus Torvalds

hfsplus: fix overflow in sector calculations in hfsplus_submit_bio

The variable io_size was unsigned int, which caused the wrong sector number
to be calculated after aligning it. This then caused mount to fail with big
volumes, as backup volume header information was searched from a
wrong sector.
Signed-off-by: default avatarJanne Kalliomäki <janne@tuxera.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 485802a6
......@@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector,
DECLARE_COMPLETION_ONSTACK(wait);
struct bio *bio;
int ret = 0;
unsigned int io_size;
u64 io_size;
loff_t start;
int offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment