Commit 23c51bed authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: fix to clear PG_error if fsverity failed

In f2fs_decompress_end_io(), we should clear PG_error flag before page
unlock, otherwise reread will fail due to the flag as described in
commit fb7d70db ("f2fs: clear PageError on the read path").
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d76af0d6
...@@ -1187,15 +1187,17 @@ void f2fs_decompress_end_io(struct page **rpages, ...@@ -1187,15 +1187,17 @@ void f2fs_decompress_end_io(struct page **rpages,
if (!rpage) if (!rpage)
continue; continue;
if (err || PageError(rpage)) { if (err || PageError(rpage))
ClearPageUptodate(rpage); goto clear_uptodate;
ClearPageError(rpage);
} else { if (!verity || fsverity_verify_page(rpage)) {
if (!verity || fsverity_verify_page(rpage)) SetPageUptodate(rpage);
SetPageUptodate(rpage); goto unlock;
else
SetPageError(rpage);
} }
clear_uptodate:
ClearPageUptodate(rpage);
ClearPageError(rpage);
unlock:
unlock_page(rpage); unlock_page(rpage);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment