From c1b88ec0ed62ebd2755facefcac974382e02e484 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 1 Mar 2010 14:02:37 +0100 Subject: [PATCH] --- yaml --- r: 186105 b: refs/heads/master c: 7eb4969e04060dcf3fbd46af9c21b1059b853068 h: refs/heads/master i: 186103: aab3cccb503c5be851c6326d7214cfa8ac62a2b5 v: v3 --- [refs] | 2 +- trunk/fs/ext3/inode.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a73322f1d095..8465807b3d7e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab94c39b6fa076d4f6d2903dcc54cda35d938776 +refs/heads/master: 7eb4969e04060dcf3fbd46af9c21b1059b853068 diff --git a/trunk/fs/ext3/inode.c b/trunk/fs/ext3/inode.c index 44b53386ab8b..c0ff9d6ffde6 100644 --- a/trunk/fs/ext3/inode.c +++ b/trunk/fs/ext3/inode.c @@ -1785,8 +1785,9 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb, 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; }