ext4: simplify truncation code in ext4_setattr()
authorJan Kara <jack@suse.cz>
Sat, 17 Aug 2013 14:07:17 +0000 (10:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Sep 2013 00:18:15 +0000 (17:18 -0700)
commit263c784f2b66e18e34208a2f0e56df65c039d918
treeb75d6004263d8604544d4050ff7ddbdf50811e9a
parent25a870d4dc930531f545aa1ae0cdca281d99f980
ext4: simplify truncation code in ext4_setattr()

commit 5208386c501276df18fee464e21d3c58d2d79517 upstream.

Merge conditions in ext4_setattr() handling inode size changes, also
move ext4_begin_ordered_truncate() call somewhat earlier because it
simplifies error recovery in case of failure. Also add error handling in
case i_disksize update fails.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c