All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] f2fs: clear PG_writeback if IPU failed
  2018-12-04 14:59 [PATCH] f2fs: clear PG_writeback if IPU failed Sheng Yong
@ 2018-12-07  9:55 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-12-07  9:55 UTC (permalink / raw)
  To: Sheng Yong, jaegeuk; +Cc: linux-f2fs-devel

On 2018/12/4 22:59, Sheng Yong wrote:
> 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>

Thanks,

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.