From: Chao Yu <chao@kernel.org>
To: jaegeuk@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH 8/8] f2fs: fix error handling in fsync_node_pages
Date: Tue, 11 Oct 2016 22:57:06 +0800 [thread overview]
Message-ID: <20161011145706.5028-8-chao@kernel.org> (raw)
In-Reply-To: <20161011145706.5028-1-chao@kernel.org>
From: Chao Yu <yuchao0@huawei.com>
In fsync_node_pages, if f2fs was taged with CP_ERROR_FLAG, make sure bio
cache was flushed before return.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/node.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 3a393e3..14f137d 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1339,7 +1339,8 @@ retry:
if (unlikely(f2fs_cp_error(sbi))) {
f2fs_put_page(last_page, 0);
pagevec_release(&pvec);
- return -EIO;
+ ret = -EIO;
+ goto out;
}
if (!IS_DNODE(page) || !is_cold_node(page))
@@ -1412,7 +1413,7 @@ continue_unlock:
unlock_page(last_page);
goto retry;
}
-
+out:
if (nwritten)
f2fs_submit_merged_bio_cond(sbi, NULL, NULL, ino, NODE, WRITE);
return ret ? -EIO: 0;
--
2.10.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
next prev parent reply other threads:[~2016-10-11 14:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 14:56 [PATCH 1/8] f2fs: clear nlink if fail to add_link Chao Yu
2016-10-11 14:57 ` [PATCH 2/8] f2fs: fix to release discard entries during checkpoint Chao Yu
2016-10-11 14:57 ` [PATCH 3/8] f2fs: give a chance to detach from dirty list Chao Yu
2016-10-11 14:57 ` [PATCH 4/8] f2fs: add missing f2fs_balance_fs in f2fs_zero_range Chao Yu
2016-10-11 14:57 ` [PATCH 5/8] f2fs: don't miss any f2fs_balance_fs cases Chao Yu
2016-10-11 14:57 ` [PATCH 6/8] f2fs: be aware of extent beyond EOF in fiemap Chao Yu
2016-10-11 14:57 ` [PATCH 7/8] f2fs: fix to update largest extent under lock Chao Yu
2016-10-11 14:57 ` Chao Yu [this message]
2016-10-11 22:19 ` [PATCH 1/8] f2fs: clear nlink if fail to add_link Jaegeuk Kim
2016-10-12 15:24 ` Chao Yu
2016-10-12 17:22 ` Jaegeuk Kim
2016-10-13 10:29 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161011145706.5028-8-chao@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).