Skip to content

Commit

Permalink
block: copy ioprio in __bio_clone_fast() and bounce
Browse files Browse the repository at this point in the history
[ Upstream commit ca474b73896bf6e0c1eb8787eb217b0f80221610 ]

We need to copy the io priority, too; otherwise the clone will run
with a different priority than the original one.

Fixes: 43b62ce ("block: move bio io prio to a new field")
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>

Fixed up subject, and ordered stores.

Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Hannes Reinecke authored and gregkh committed Dec 1, 2018
1 parent 08f94d0 commit 487d58a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
if (bio_flagged(bio_src, BIO_THROTTLED))
bio_set_flag(bio, BIO_THROTTLED);
bio->bi_opf = bio_src->bi_opf;
bio->bi_ioprio = bio_src->bi_ioprio;
bio->bi_write_hint = bio_src->bi_write_hint;
bio->bi_iter = bio_src->bi_iter;
bio->bi_io_vec = bio_src->bi_io_vec;
Expand Down
1 change: 1 addition & 0 deletions block/bounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ static struct bio *bounce_clone_bio(struct bio *bio_src, gfp_t gfp_mask,
return NULL;
bio->bi_disk = bio_src->bi_disk;
bio->bi_opf = bio_src->bi_opf;
bio->bi_ioprio = bio_src->bi_ioprio;
bio->bi_write_hint = bio_src->bi_write_hint;
bio->bi_iter.bi_sector = bio_src->bi_iter.bi_sector;
bio->bi_iter.bi_size = bio_src->bi_iter.bi_size;
Expand Down

0 comments on commit 487d58a

Please sign in to comment.