diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-06-05 00:56:49 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-06-05 00:56:49 -0400 |
commit | f8514083cd61daef12fba5ef883ad9352c450428 (patch) | |
tree | 46cbf0c28ea112229c3ee9209750c8017f1b9385 /fs/ext4/ext4.h | |
parent | 1938a150c25bf7c2c47182e753a1038945b70b0e (diff) |
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>
Diffstat (limited to 'fs/ext4/ext4.h')
0 files changed, 0 insertions, 0 deletions