summaryrefslogtreecommitdiff
path: root/drivers/staging/erofs/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/erofs/data.c')
-rw-r--r--drivers/staging/erofs/data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/erofs/data.c b/drivers/staging/erofs/data.c
index 526e0dbea5b5..81af768e7248 100644
--- a/drivers/staging/erofs/data.c
+++ b/drivers/staging/erofs/data.c
@@ -298,7 +298,7 @@ submit_bio_retry:
*last_block = current_block;
/* shift in advance in case of it followed by too many gaps */
- if (unlikely(bio->bi_vcnt >= bio->bi_max_vecs)) {
+ if (bio->bi_iter.bi_size >= bio->bi_max_vecs * PAGE_SIZE) {
/* err should reassign to 0 after submitting */
err = 0;
goto submit_bio_out;