summaryrefslogtreecommitdiffstats
path: root/drivers/spi/xilinx_spi.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-06-11 12:46:16 -0600
committerTom Rini <trini@ti.com>2014-06-19 11:18:53 -0400
commitd018028055a21a28adef16b7f95422c426b46d60 (patch)
tree24546aa499a82610c0af24849a6239fc7cd09130 /drivers/spi/xilinx_spi.h
parent50babaf852e3b48680f7ea782a756043f64f8fe2 (diff)
downloadtalos-obmc-uboot-d018028055a21a28adef16b7f95422c426b46d60.tar.gz
talos-obmc-uboot-d018028055a21a28adef16b7f95422c426b46d60.zip
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>
Diffstat (limited to 'drivers/spi/xilinx_spi.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud