* [U-Boot] [PATCH] fs/ext4: fix partition size get truncated in calculation
@ 2014-01-07 22:49 Ma Haijun
2014-01-20 22:59 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Ma Haijun @ 2014-01-07 22:49 UTC (permalink / raw)
To: u-boot
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>
---
fs/ext4/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] fs/ext4: fix partition size get truncated in calculation
2014-01-07 22:49 [U-Boot] [PATCH] fs/ext4: fix partition size get truncated in calculation Ma Haijun
@ 2014-01-20 22:59 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-01-20 22:59 UTC (permalink / raw)
To: u-boot
On Wed, Jan 08, 2014 at 06:49:43AM +0800, Ma Haijun wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140120/2235e97e/attachment.pgp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-20 22:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 22:49 [U-Boot] [PATCH] fs/ext4: fix partition size get truncated in calculation Ma Haijun
2014-01-20 22:59 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.