blkcg: reassociate bios when make_request() is called recursively
authorDennis Zhou <dennis@kernel.org>
Sat, 20 Oct 2018 18:56:12 +0000 (14:56 -0400)
committerJens Axboe <axboe@kernel.dk>
Sat, 20 Oct 2018 21:39:55 +0000 (15:39 -0600)
commitd459d853c2edc793135e4bfa4e345c758f1cc859
treebef29425e5ddb78a788cca764e926b4f5601f473
parentb2c3fa546705944e748666b474ffdaebaec0569f
blkcg: reassociate bios when make_request() is called recursively

When submitting a bio, multiple recursive calls to make_request() may
occur. This causes the initial associate done in blkcg_bio_issue_check()
to be incorrect and reference the prior request_queue. This introduces
a helper to do reassociation when make_request() is recursively called.

Fixes: a7b39b4e961c ("blkcg: always associate a bio with a blkg")
Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk-core.c
include/linux/bio.h