]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: clean up blkg_tryget_closest()
authorDennis Zhou <dennis@kernel.org>
Wed, 19 Dec 2018 22:43:21 +0000 (16:43 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Dec 2018 15:47:05 +0000 (08:47 -0700)
commitc2e73473980e8e798943c513ddda3f2b04f4a1c0
tree985c4235d6407aab7daab76082029c025c320f70
parentebfd28f296487b8d2721d7d781bbaf477c8aa989
blkcg: clean up blkg_tryget_closest()

The implementation of blkg_tryget_closest() wasn't super obvious and
became a point of suspicion when debugging [1]. So let's clean it up so
it's obviously not the problem.

Also add missing RCU read locking to bio_clone_blkg_association(), which
got exposed by adding the RCU read lock held check in
blkg_tryget_closest().

[1] https://lore.kernel.org/linux-block/a7e97e4b-0dd8-3a54-23b7-a0f27b17fde8@kernel.dk/

Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/blk-cgroup.h