diff options
author | Yunlong Song <yunlong.song@huawei.com> | 2016-05-26 14:40:29 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 04:05:22 +0300 |
commit | 0c9df7fb80360802f241428be7104f79d7c0f4ee (patch) | |
tree | 4bfa8b93bca932f3643bef2c69e19af40564baa5 /fs/f2fs/namei.c | |
parent | 46ae957f9b1611be2935ae626f601cda74f8160e (diff) | |
download | linux-0c9df7fb80360802f241428be7104f79d7c0f4ee.tar.xz |
f2fs: return the errno to the caller to avoid using a wrong page
Commit aaf9607516ed38825268515ef4d773289a44f429 ("f2fs: check node page
contents all the time") pointed out that "sometimes it was reported that
its contents was missing", so it checks the page's mapping and contents.
When "nid != nid_of_node(page)", ERR_PTR(-EIO) will be returned to the
caller. However, commit e1c51b9f1df2f9efc2ec11488717e40cd12015f9 ("f2fs:
clean up node page updating flow") moves "nid != nid_of_node(page)" test
to "f2fs_bug_on(sbi, nid != nid_of_node(page))", this will return a
wrong page to the caller when F2FS_CHECK_FS is off when "sometimes it
was reported that its contents was missing" happens.
This patch restores to check node page contents all the time, and
returns the errno to make the caller known something is wrong and avoid
to use the page. This patch also moves f2fs_bug_on to its proper location.
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
0 files changed, 0 insertions, 0 deletions