f2fs: remove unnecessary TestClearPageError when wait pages writeback
authorChao Yu <chao2.yu@samsung.com>
Mon, 4 Nov 2013 02:28:33 +0000 (10:28 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 4 Nov 2013 03:24:01 +0000 (12:24 +0900)
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 <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/node.c

index b527ed4c0225697db3965e18b153d274d2e56a23..4ac4150d421dc05e6c20812d5fd36dcc910a938a 100644 (file)
@@ -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();