]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:55:13 +0000 (14:55 +0200)
commit3359b6705eecb409d62a7684fa3c8b732c8e39ae
tree525705a4a85c30404e3a6ed8a8357cb322ce0f95
parentf4e6a19c3adcfcd3fce1df452a3e39275fd34310
blkcg: don't hold blkcg lock when deactivating policy

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 946b81da114b8ba5c74bb01e57c0c6eca2bdc801 ]

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 4c55f4f9ad3001ac1fefdd8d8ca7641d18558e23.

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
block/blk-cgroup.c