]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: erofs: revisit the page submission flow
authorGao Xiang <gaoxiang25@huawei.com>
Fri, 7 Dec 2018 16:19:15 +0000 (00:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Dec 2018 16:10:48 +0000 (17:10 +0100)
commit9248fce714d5317650b316cf418ea396562e767e
tree3e02dd869a8aa7a75ffc45e30d76ebba48d189b5
parent672e54761025997b088d3b8e6c3bb20a71fb32f6
staging: erofs: revisit the page submission flow

Previously, the submission flow works with cached compressed pages
reclaim path in a tricky way, and it could be buggy if the reclaim
path changes later without such tricky restrictions. For example,
currently one PagePrivate(page) is evaluated without taking page
lock (it only follows a wait_for_page_locked which closes such race)
and no handling solves the potential page truncation case.

In addition, it's also full of #ifdefs in the function, which
is hard to understand and maintain. this patch fixes them all.

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