mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
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 fb7d70db30 ("f2fs: clear PageError on the read path").
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
580c87b050
commit
c31bdd2c89
1 changed files with 10 additions and 8 deletions
|
|
@ -1187,15 +1187,17 @@ void f2fs_decompress_end_io(struct page **rpages,
|
|||
if (!rpage)
|
||||
continue;
|
||||
|
||||
if (err || PageError(rpage)) {
|
||||
ClearPageUptodate(rpage);
|
||||
ClearPageError(rpage);
|
||||
} else {
|
||||
if (!verity || fsverity_verify_page(rpage))
|
||||
SetPageUptodate(rpage);
|
||||
else
|
||||
SetPageError(rpage);
|
||||
if (err || PageError(rpage))
|
||||
goto clear_uptodate;
|
||||
|
||||
if (!verity || fsverity_verify_page(rpage)) {
|
||||
SetPageUptodate(rpage);
|
||||
goto unlock;
|
||||
}
|
||||
clear_uptodate:
|
||||
ClearPageUptodate(rpage);
|
||||
ClearPageError(rpage);
|
||||
unlock:
|
||||
unlock_page(rpage);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue