> +static void abort_bio(struct bio *bio) > +{ > + DECLARE_COMPLETION_ONSTACK_MAP(done, > + bio->bi_bdev->bd_disk->lockdep_map); > + > + bio->bi_private = &done; > + bio->bi_end_io = abort_bio_endio; > + bio_endio(bio); > + blk_wait_io(&done); > +} Without seeing the context below this looks pretty weird, but once seeing that we're waiting for the previously submitted bios it all makes sense. Please write a a good comment explaining this, and maybe also use a name that is a bit more descriptive.