Re: [PATCH v2] blkcg: Unlock blkcg_pol_mutex once if cpd == NULL

2016-09-30 Thread Tejun Heo
On Thu, Sep 29, 2016 at 08:33:30AM -0700, Bart Van Assche wrote: > 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_pol

[PATCH v2] blkcg: Unlock blkcg_pol_mutex once if cpd == NULL

2016-09-29 Thread Bart Van Assche
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: 06b28