u-boot/fs/ext4
Stephen Warren d018028055 fs: ext4: fix writing zero-length files
ext4fs_allocate_blocks() always allocates at least one block for a file.
If the file size is zero, this causes total_remaining_blocks to
underflow, which then causes an apparent hang while 2^32 blocks are
allocated.

To solve this, check that total_remaining_blocks is non-zero as part of
the loop condition (i.e. before each loop) rather than at the end of
the loop.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2014-06-19 11:18:53 -04:00
..
crc16.c ext4fs write support 2012-08-09 23:48:02 +02:00
crc16.h ext4fs write support 2012-08-09 23:48:02 +02:00
dev.c fs/ext4: fix partition size get truncated in calculation 2014-01-20 10:09:38 -05:00
ext4_common.c fs: ext4: fix writing zero-length files 2014-06-19 11:18:53 -04:00
ext4_common.h Revert "ext4fs: Add ext4 extent cache for read operations" 2014-02-26 08:18:58 -05:00
ext4_journal.c fs/ext4: fix calling put_ext4 with truncated offset 2014-01-20 10:09:38 -05:00
ext4_journal.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ext4_write.c ext4: correctly zero filename 2014-06-11 16:27:05 -04:00
ext4fs.c Revert "ext4fs: Add ext4 extent cache for read operations" 2014-02-26 08:18:58 -05:00
Makefile fs: descend into sub directories when it is necessary 2013-11-17 14:11:34 -05:00