dm-verity: pass correct bytes to verity_use_bh
PATCH 1/1 dm-verity: pass correct bytes to verity_use_bh
bi_size is always 0 here since the iterator was already advanced.
Fixes 8cf3ae875ee4 ("dm-verity: support block number limits for different ioprio classes")
Signed-off-by LongPing Wei <[email protected]>
--- drivers/md/dm-verity-target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/dm-verity-target.c +2 -1
@@ -689,6 +689,7 @@ static void verity_end_io(struct bio *bio) {struct dm_verity_io *io = bio->bi_private;unsigned short ioprio =IOPRIO_PRIO_CLASS (bio->bi_ioprio); +unsigned int bytes = io->n_blocks << io->v->data_dev_block_bits; if (bio->bi_status && (!verity_fec_is_enabled(io->v) ||
@@ -699,7 +700,7 @@ static void verity_end_io(struct bio *bio) }if (static_branch_unlikely (&use_bh_wq_enabled) && io->v->use_bh_wq && -verity_use_bh (bio->bi_iter.bi_size, ioprio)) { +verity_use_bh (bytes, ioprio)) {if (in_hardirq () ||irqs_disabled ()) {INIT_WORK (&io->bh_work, verity_bh_work);queue_work (system_bh_wq, &io->bh_work);
Signature · 1 line
2.34.1
Mikulas Patocka
maintainerQuoted 31 lines · LongPing Wei
bi_sizeis always 0 here since the iterator was already advanced.Fixes 8cf3ae875ee4 ("dm-verity: support block number limits for different ioprio classes")Signed-off-by LongPing Wei <[email protected]>--- drivers/md/dm-verity-target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/md/dm-verity-target.c +2
-1@@ -689,6 +689,7 @@ static void verity_end_io(struct bio *bio) {struct dm_verity_io *io = bio->bi_private;unsigned short ioprio =IOPRIO_PRIO_CLASS (bio->bi_ioprio); +unsigned int bytes = io->n_blocks << io->v->data_dev_block_bits; if (bio->bi_status && (!verity_fec_is_enabled(io->v) ||@@ -699,7 +700,7 @@ static void verity_end_io(struct bio *bio) }if (static_branch_unlikely (&use_bh_wq_enabled) && io->v->use_bh_wq && -verity_use_bh (bio->bi_iter.bi_size, ioprio)) { +verity_use_bh (bytes, ioprio)) {if (in_hardirq () ||irqs_disabled ()) {INIT_WORK (&io->bh_work, verity_bh_work);queue_work (system_bh_wq, &io->bh_work);Signature · 1 line
2.34.1
OK, I merged both patches into the existing patch.
Mikulas