From 2b246fb0f60d318cec6901a0326b94b50d5e1dcb Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 21 Oct 2015 19:00:31 -0700 Subject: [PATCH] f2fs: don't need to submit bio on error case If commit_atomic_write is failed, we don't need to submit any bio. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 7835e41868f0..7efd96ad9aac 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -249,11 +249,11 @@ int commit_inmem_pages(struct inode *inode, bool abort) trace_f2fs_commit_inmem_page(cur->page, INMEM); fio.page = cur->page; err = do_write_data_page(&fio); - submit_bio = true; if (err) { unlock_page(cur->page); break; } + submit_bio = true; } } else { trace_f2fs_commit_inmem_page(cur->page, INMEM_DROP); -- 2.20.1