summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMa Haijun <mahaijuns@gmail.com>2014-01-07 22:49:43 (GMT)
committerTom Rini <trini@ti.com>2014-01-20 15:09:38 (GMT)
commitf17828830df0d83c680f1703e491ac12703a3d19 (patch)
treea1b6e277818fb7ffffef6a6e0171f1b4247bf53f /fs
parent55ca99f8940e230366cadd522702fac9f962e904 (diff)
downloadu-boot-fsl-qoriq-f17828830df0d83c680f1703e491ac12703a3d19.tar.xz
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 787e041..e0b513a 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -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;
}