diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-16 06:44:21 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-09-16 06:44:21 -0400 |
commit | 280db3c88c5ff03c2554d1503451352fde8a2cf3 (patch) | |
tree | 10cc1257a7131f838d37a5631427b163acd58f6c | |
parent | f0312210010bf063c29efe112b0d9accbc9191b3 (diff) |
f2fs: use filemap_check_errors()
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/node.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f75d197d5beb..67ed2192f926 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -1513,7 +1513,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) | |||
1513 | { | 1513 | { |
1514 | pgoff_t index = 0, end = ULONG_MAX; | 1514 | pgoff_t index = 0, end = ULONG_MAX; |
1515 | struct pagevec pvec; | 1515 | struct pagevec pvec; |
1516 | int ret2 = 0, ret = 0; | 1516 | int ret2, ret = 0; |
1517 | 1517 | ||
1518 | pagevec_init(&pvec, 0); | 1518 | pagevec_init(&pvec, 0); |
1519 | 1519 | ||
@@ -1542,10 +1542,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) | |||
1542 | cond_resched(); | 1542 | cond_resched(); |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | if (unlikely(test_and_clear_bit(AS_ENOSPC, &NODE_MAPPING(sbi)->flags))) | 1545 | ret2 = filemap_check_errors(NODE_MAPPING(sbi)); |
1546 | ret2 = -ENOSPC; | ||
1547 | if (unlikely(test_and_clear_bit(AS_EIO, &NODE_MAPPING(sbi)->flags))) | ||
1548 | ret2 = -EIO; | ||
1549 | if (!ret) | 1546 | if (!ret) |
1550 | ret = ret2; | 1547 | ret = ret2; |
1551 | return ret; | 1548 | return ret; |