* [PATCH] f2fs: clear PG_writeback if IPU failed
@ 2018-12-04 14:59 Sheng Yong
2018-12-07 9:55 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yong @ 2018-12-04 14:59 UTC (permalink / raw)
To: jaegeuk, yuchao0; +Cc: linux-f2fs-devel
If IPU failed, nothing is commited, we should end page writeback.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
fs/f2fs/data.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8780f3d737c4..b29b754141d8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1853,6 +1853,8 @@ int f2fs_do_write_data_page(struct f2fs_io_info *fio)
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;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-07 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 14:59 [PATCH] f2fs: clear PG_writeback if IPU failed Sheng Yong
2018-12-07 9:55 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).