ext4: Fix discard of inode prealloc space with delayed allocation.
commit9b390e2eeb2269963ffaa0577963763edad00606
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Thu, 26 Feb 2009 10:54:52 +0000 (26 05:54 -0500)
committerZhang Le <r0bertz@gentoo.org>
Fri, 20 Mar 2009 11:34:23 +0000 (20 19:34 +0800)
tree0e34275aa659bb7ca427d66c07f4c7ca9457827a
parentc68153765a9e4004c762b807724540bd6dc74599
ext4: Fix discard of inode prealloc space with delayed allocation.

ext4: Fix discard of inode prealloc space with delayed allocation.

With delayed allocation we should not/cannot discard inode prealloc
space during file close. We would still have dirty pages for which we
haven't allocated blocks yet. With this fix after each get_blocks
request we check whether we have zero reserved blocks and if yes and
we don't have any writers on the file we discard inode prealloc space.

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