Skip to contentSkip to conversation

f2fs: clear PG_writeback if IPU failed

PATCH In review Sheng Yong 2 participants 2 messages Dec 4, 2018 – Dec 7, 2018 F2FS file system

lore
Share & tools
lore

Sheng Yong

author
#0 lore raw

PATCH 1/1 f2fs: clear PG_writeback if IPU failed

If IPU failed, nothing is commited, we should end page writeback.

---
 fs/f2fs/data.c | 2 ++
 1 file changed, 2 insertions(+)
fs/f2fs/data.c +2 -0
index 8780f3d737c4..b29b754141d8 100644
@@ -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;
Signature · 1 line
2.17.1