Re: [PATCH v2 4/4] lockdep: Assign a lock_class per gendisk used for wait_for_completion()

From: Christoph Hellwig
Date: Fri Oct 20 2017 - 10:45:02 EST


The Subject prefix for this should be "block:".

> @@ -945,7 +945,7 @@ int submit_bio_wait(struct bio *bio)
> {
> struct submit_bio_ret ret;
>
> - init_completion(&ret.event);
> + init_completion_with_map(&ret.event, &bio->bi_disk->lockdep_map);

FYI, I have an outstanding patch to simplify this a lot, which
switches this to DECLARE_COMPLETION_ONSTACK. I can delay this or let
you pick it up with your series, but we'll need a variant of
DECLARE_COMPLETION_ONSTACK with the lockdep annotations.

Patch below for reference:

---