erofs: fix bio->bi_max_vecs behavior change
authorGao Xiang <hsiangkao@redhat.com>
Sat, 6 Mar 2021 04:04:38 +0000 (12:04 +0800)
committerGao Xiang <hsiangkao@redhat.com>
Mon, 8 Mar 2021 02:43:32 +0000 (10:43 +0800)
commit9f377622a484de0818c49ee01e0ab4eedf6acd81
tree6d33c88c9a7adf3ffc11bc656ad8e847762eb83b
parenta38fd8748464831584a19438cbb3082b5a2dab15
erofs: fix bio->bi_max_vecs behavior change

Martin reported an issue that directory read could be hung on the
latest -rc kernel with some certain image. The root cause is that
commit baa2c7c97153 ("block: set .bi_max_vecs as actual allocated
vector number") changes .bi_max_vecs behavior. bio->bi_max_vecs
is set as actual allocated vector number rather than the requested
number now.

Let's avoid using .bi_max_vecs completely instead.

Link: https://lore.kernel.org/r/20210306040438.8084-1-hsiangkao@aol.com
Reported-by: Martin DEVERA <devik@eaxlabs.cz>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
[ Gao Xiang: note that <= 5.11 kernels are not impacted. ]
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
fs/erofs/data.c