Searched hist:f8514083cd61daef12fba5ef883ad9352c450428 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ext4/ |
H A D | inode.c | diff f8514083cd61daef12fba5ef883ad9352c450428 Thu Jun 04 23:56:49 CDT 2009 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> ext4: truncate the file properly if we fail to copy data from userspace
In generic_perform_write if we fail to copy the user data we don't update the inode->i_size. We should truncate the file in the above case so that we don't have blocks allocated outside inode->i_size. Add the inode to orphan list in the same transaction as block allocation This ensures that if we crash in between the recovery would do the truncate.
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>
|