]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: don't hold blkcg lock when deactivating policy
authorJiang Biao <jiang.biao2@zte.com.cn>
Wed, 18 Apr 2018 14:37:18 +0000 (08:37 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Apr 2018 14:37:18 +0000 (08:37 -0600)
commit7851a6b47c3e8512924e4e77bd6e91dcb23c5263
tree5f4adb9a9a46eaee2c142dfc7f76d60abaea07da
parent09431c2b512097f5eb5321201a7fd771d91d0e1d
blkcg: don't hold blkcg lock when deactivating policy

As described in the comment of blkcg_activate_policy(),
*Update of each blkg is protected by both queue and blkcg locks so
that holding either lock and testing blkcg_policy_enabled() is
always enough for dereferencing policy data.*
with queue lock held, there is no need to hold blkcg lock in
blkcg_deactivate_policy(). Similar case is in
blkcg_activate_policy(), which has removed holding of blkcg lock in
commit 6d9c98947d29fd14674135f417551b015ec279b4.

Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
CC: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c