Skip to content

Commit 8467f9e

Browse files
committed
Merge tag 'block-5.18-2022-04-22' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Just two small regression fixes for bcache" * tag 'block-5.18-2022-04-22' of git://git.kernel.dk/linux-block: bcache: fix wrong bdev parameter when calling bio_alloc_clone() in do_bio_hook() bcache: put bch_bio_map() back to correct location in journal_write_unlocked()
2 parents 1f5e98e + 9dca416 commit 8467f9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/md/bcache/journal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,12 +771,12 @@ static void journal_write_unlocked(struct closure *cl)
771771

772772
bio_reset(bio, ca->bdev, REQ_OP_WRITE |
773773
REQ_SYNC | REQ_META | REQ_PREFLUSH | REQ_FUA);
774-
bch_bio_map(bio, w->data);
775774
bio->bi_iter.bi_sector = PTR_OFFSET(k, i);
776775
bio->bi_iter.bi_size = sectors << 9;
777776

778777
bio->bi_end_io = journal_write_endio;
779778
bio->bi_private = w;
779+
bch_bio_map(bio, w->data);
780780

781781
trace_bcache_journal_write(bio, w->data->keys);
782782
bio_list_add(&list, bio);

drivers/md/bcache/request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ static void do_bio_hook(struct search *s,
685685
{
686686
struct bio *bio = &s->bio.bio;
687687

688-
bio_init_clone(bio->bi_bdev, bio, orig_bio, GFP_NOIO);
688+
bio_init_clone(orig_bio->bi_bdev, bio, orig_bio, GFP_NOIO);
689689
/*
690690
* bi_end_io can be set separately somewhere else, e.g. the
691691
* variants in,

0 commit comments

Comments
 (0)