Skip to content
Commit bbb427e3 authored by Bart Van Assche's avatar Bart Van Assche Committed by Tejun Heo
Browse files

blkcg: Unlock blkcg_pol_mutex only once when cpd == NULL



Unlocking a mutex twice is wrong. Hence modify blkcg_policy_register()
such that blkcg_pol_mutex is unlocked once if cpd == NULL. This patch
avoids that smatch reports the following error:

block/blk-cgroup.c:1378: blkcg_policy_register() error: double unlock 'mutex:&blkcg_pol_mutex'

Fixes: 06b285bd ("blkcg: fix blkcg_policy_data allocation bug")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent e0223003
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment