diff options
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 641d60392bff..16532b31dcd6 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1142,16 +1142,21 @@ repeat: lock_page(page); - if (unlikely(!PageUptodate(page))) { - f2fs_put_page(page, 1); - return ERR_PTR(-EIO); - } + if (unlikely(!PageUptodate(page))) + goto out_err; + if (unlikely(page->mapping != NODE_MAPPING(sbi))) { f2fs_put_page(page, 1); goto repeat; } page_hit: - f2fs_bug_on(sbi, nid != nid_of_node(page)); + if(unlikely(nid != nid_of_node(page))) { + f2fs_bug_on(sbi, 1); + ClearPageUptodate(page); +out_err: + f2fs_put_page(page, 1); + return ERR_PTR(-EIO); + } return page; } |