1
0
Fork 0
remarkable-uboot/fs
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
..
cbfs fs: descend into sub directories when it is necessary 2013-11-17 14:11:34 -05:00
cramfs fs: descend into sub directories when it is necessary 2013-11-17 14:11:34 -05:00
ext4 fs: ext4: fix writing zero-length files 2014-06-19 11:18:53 -04:00
fat disk: part_efi: clarify lbaint_t usage 2014-06-05 14:44:56 -04:00
jffs2 jffs2:jffs2_1pass.c: remove double braces 2014-06-11 16:27:06 -04:00
reiserfs fs: descend into sub directories when it is necessary 2013-11-17 14:11:34 -05:00
sandbox sandbox: implement exists() function 2014-02-19 09:47:34 -05:00
ubifs fs: ubifs: drop __DATE__ and __TIME__ 2014-05-12 15:19:46 -04:00
yaffs2 yaffs: Remove private list implementation 2014-03-04 12:15:29 -05:00
zfs fs: descend into sub directories when it is necessary 2013-11-17 14:11:34 -05:00
Makefile fs/fdos: Remove 2014-02-21 08:42:47 -05:00
fs.c fat: implement exists() for FAT fs 2014-02-19 09:47:34 -05:00