]> git.baikalelectronics.ru Git - kernel.git/commit
staging: erofs: fix error handling when failed to read compresssed data
authorGao Xiang <gaoxiang25@huawei.com>
Mon, 25 Mar 2019 03:40:07 +0000 (11:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2019 20:54:18 +0000 (05:54 +0900)
commit6a35937035b4de92ebc66a40b0f287eb5f5c0929
treeb227a17a3c1b5399e1b6e57a7f3a8174b1f9fd84
parent1973bfaa4afc330425b730c53414c8889ce74367
staging: erofs: fix error handling when failed to read compresssed data

Complete read error handling paths for all three kinds of
compressed pages:

 1) For cache-managed pages, PG_uptodate will be checked since
    read_endio will unlock and SetPageUptodate for these pages;

 2) For inplaced pages, read_endio cannot SetPageUptodate directly
    since it should be used to mark the final decompressed data,
    PG_error will be set with page locked for IO error instead;

 3) For staging pages, PG_error is used, which is similar to
    what we do for inplaced pages.

Fixes: fc40920131e5 ("staging: erofs: introduce VLE decompression support")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/unzip_vle.c