]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix potential infinite loop in xfs_iomap_prealloc_size()
authorBrian Foster <bfoster@redhat.com>
Fri, 22 Feb 2013 18:32:56 +0000 (13:32 -0500)
committerBen Myers <bpm@sgi.com>
Mon, 18 Mar 2013 18:30:38 +0000 (13:30 -0500)
commit7d5c33110772f8f24a5620744098a78d39ba8b5e
tree1d780da1a8a49c9eed1d390b92ece519f1fe9c3f
parent1550423bbae002d3be1ebdba2fe7b0d0e8ade01e
xfs: fix potential infinite loop in xfs_iomap_prealloc_size()

If freesp == 0, we could end up in an infinite loop while squashing
the preallocation. Break the loop when we've killed the prealloc
entirely.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit e78c420bfc2608bb5f9a0b9165b1071c1e31166a)
fs/xfs/xfs_iomap.c