1
0
Fork 0

fs/ext4: fix partition size get truncated in calculation

It may cause file system corruption when do a write operation.
This issue only affects boards that use 32 bit lbaint_t.

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
utp
Ma Haijun 2014-01-08 06:49:43 +08:00 committed by Tom Rini
parent 55ca99f894
commit f17828830d
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ void ext4fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
get_fs()->dev_desc = rbdd;
part_info = info;
part_offset = info->start;
get_fs()->total_sect = (info->size * info->blksz) >>
get_fs()->total_sect = ((uint64_t)info->size * info->blksz) >>
get_fs()->dev_desc->log2blksz;
}