ext4: Avoid leaking blocks after a block allocation failure
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 5 Jun 2009 05:00:26 +0000 (01:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 5 Jun 2009 05:00:26 +0000 (01:00 -0400)
We should add inode to the orphan list in the same transaction
as block allocation.  This ensures that if we crash after a failed
block allocation and before we do a vmtruncate we don't leak block
(ie block marked as used in bitmap but not claimed by the inode).

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

diff --cc fs/ext4/inode.c
Simple merge