From: Chao Yu Date: Wed, 2 Jul 2014 05:25:04 +0000 (+0800) Subject: f2fs: introduce f2fs_write_failed to handle error case when write X-Git-Tag: omap-for-v3.17/fixes-against-rc2~163^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aab8f828ef358ae92545294a14cd52d510cc585;p=pandora-kernel.git f2fs: introduce f2fs_write_failed to handle error case when write When we fail in ->write_begin()/->direct_IO(), our allocated node block in disk and page cache are still kept, despite these may not be used again. This patch introduce f2fs_write_failed() to handle the error case of these two interfaces, it will truncate page cache and blocks of this file according to i_size. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed