]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: introduce f2fs_write_failed to handle error case when write
authorChao Yu <chao2.yu@samsung.com>
Wed, 2 Jul 2014 05:25:04 +0000 (13:25 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 9 Jul 2014 21:04:26 +0000 (14:04 -0700)
commit923ca4684beefa16471e9908c4b703762fa52923
treecf2351d748e981a8e9434a8ee7a63a76ba4cc887
parent351351cbcfa112d8fb6cfeff0a62efae5c6bac60
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 <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c