ext4: update i_disksize coherently with block allocation on error path
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 27 Aug 2014 22:40:03 +0000 (18:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:34:17 +0000 (16:34 -0700)
commit08dc1706c61301a0476284edabd06618e9567674
tree4a4270e5f8d30a2b7451838650a3312e97bf00f8
parent3e6c4753bc410f788d81566d6d915f26ff315ba2
ext4: update i_disksize coherently with block allocation on error path

commit 6603120e96eae9a5d6228681ae55c7fdc998d1bb upstream.

In case of delalloc block i_disksize may be less than i_size. So we
have to update i_disksize each time we allocated and submitted some
blocks beyond i_disksize.  We weren't doing this on the error paths,
so fix this.

testcase: xfstest generic/019

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c