diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-02-07 05:53:45 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-02-12 04:04:46 +0300 |
commit | aaf9607516ed38825268515ef4d773289a44f429 (patch) | |
tree | ef1396a64c9be29fbd0409cc2ac4e411eebec6ad /fs/f2fs | |
parent | 2e023174a88dd14eab30fae3a1f6c97f37eb3bb8 (diff) | |
download | linux-aaf9607516ed38825268515ef4d773289a44f429.tar.xz |
f2fs: check node page contents all the time
In get_node_page, if the page is up-to-date, we assumed that the page was not
reclaimed at all.
But, sometimes it was reported that its contents was missing.
So, just for sure, let's check its mapping and contents.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ea22c3210c8a..1e354ff9f7d8 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1036,11 +1036,11 @@ repeat: err = read_node_page(page, READ_SYNC); if (err < 0) return ERR_PTR(err); - else if (err == LOCKED_PAGE) - goto got_it; + else if (err != LOCKED_PAGE) + lock_page(page); - lock_page(page); if (unlikely(!PageUptodate(page) || nid != nid_of_node(page))) { + ClearPageUptodate(page); f2fs_put_page(page, 1); return ERR_PTR(-EIO); } @@ -1048,7 +1048,6 @@ repeat: f2fs_put_page(page, 1); goto repeat; } -got_it: return page; } |