summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ext3/inode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 44b53386ab8b..c0ff9d6ffde6 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -1785,8 +1785,9 @@ retry:
handle = ext3_journal_start(inode, 2);
if (IS_ERR(handle)) {
/* This is really bad luck. We've written the data
- * but cannot extend i_size. Bail out and pretend
- * the write failed... */
+ * but cannot extend i_size. Truncate allocated blocks
+ * and pretend the write failed... */
+ ext3_truncate(inode);
ret = PTR_ERR(handle);
goto out;
}