f2fs: don't need to submit bio on error case
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 22 Oct 2015 02:00:31 +0000 (19:00 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 22 Oct 2015 02:05:53 +0000 (19:05 -0700)
If commit_atomic_write is failed, we don't need to submit any bio.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index 7835e41868f0c14ecd14fb9c56b907c5436f814b..7efd96ad9aac40b51d861ca7cee493a53333093f 100644 (file)
@@ -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);