From: Chao Yu Date: Mon, 4 Nov 2013 02:28:33 +0000 (+0800) Subject: f2fs: remove unnecessary TestClearPageError when wait pages writeback X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4bf08ff6f9f381fa625d65e36c3e8e57313943cf;p=openwrt%2Fstaging%2Fblogic.git f2fs: remove unnecessary TestClearPageError when wait pages writeback In wait_on_node_pages_writeback we will test and clear error flag for all pages in radix tree, but not necessary. So we only do this for pages belong to the specified inode. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index b527ed4c0225..4ac4150d421d 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1170,10 +1170,11 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) if (page->index > end) continue; - if (ino && ino_of_node(page) == ino) + if (ino && ino_of_node(page) == ino) { wait_on_page_writeback(page); - if (TestClearPageError(page)) - ret = -EIO; + if (TestClearPageError(page)) + ret = -EIO; + } } pagevec_release(&pvec); cond_resched();