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> |
||
|---|---|---|
| .. | ||
| Makefile | ||
| crc16.c | ||
| crc16.h | ||
| dev.c | ||
| ext4_common.c | ||
| ext4_common.h | ||
| ext4_journal.c | ||
| ext4_journal.h | ||
| ext4_write.c | ||
| ext4fs.c | ||