]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
ext4: make ext4_ext_get_blocks always return <= max_blocks
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 29 Apr 2008 12:11:12 +0000 (08:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 29 Apr 2008 12:11:12 +0000 (08:11 -0400)
commite067ba0078cd6f00eb6c4052fec630b78ebe59de
tree58c5f6d1e86ac03257cde1714fb09437d408043c
parentfd28784adc079afa905df56204b1298ddb4d0bfe
ext4: make ext4_ext_get_blocks always return <= max_blocks

ext4_ext_get_blocks() returns number of blocks allocated with buffer
heads unmapped for a read from prealloc space.  This is needed so that
delayed allocation doesn't do block reservation for prealloc space since
the blocks are already resevred on disk.  Fix ext4_ext_get_blocks to not
return greater than max_blocks, since some of the code paths cannot
handle such a return value.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c