diff options
author | Sheng Yong <shengyong1@huawei.com> | 2018-12-04 22:59:21 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-12-14 06:38:12 -0800 |
commit | 2062e0c3daa0bcfc806f4f7331f8bba16dd42632 (patch) | |
tree | d61cbd5ef7b23f9bdbdb8ed70ce1ba475ad10495 /fs/f2fs | |
parent | 0cd6d9b0d23416af3bfb8736f8be5bb66bc8060b (diff) | |
download | linux-2062e0c3daa0bcfc806f4f7331f8bba16dd42632.tar.bz2 |
f2fs: clear PG_writeback if IPU failed
If IPU failed, nothing is commited, we should end page writeback.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7ddc0e57468c..fd3a1e5ab6d9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1860,6 +1860,8 @@ got_it: if (fio->need_lock == LOCK_REQ) f2fs_unlock_op(fio->sbi); err = f2fs_inplace_write_data(fio); + if (err && PageWriteback(page)) + end_page_writeback(page); trace_f2fs_do_write_data_page(fio->page, IPU); set_inode_flag(inode, FI_UPDATE_WRITE); return err; |