Skip to content
Commit 0dfc1f4c authored by Zhihao Cheng's avatar Zhihao Cheng Committed by Mike Snitzer
Browse files

dm bufio: Fix missing decrement of no_sleep_enabled if dm_bufio_client_create failed



The 'no_sleep_enabled' should be decreased in error handling path
in dm_bufio_client_create() when the DM_BUFIO_CLIENT_NO_SLEEP flag
is set, otherwise static_branch_unlikely() will always return true
even if no dm_bufio_client instances have DM_BUFIO_CLIENT_NO_SLEEP
flag set.

Cc: stable@vger.kernel.org
Fixes: 3c1c875d ("dm bufio: conditionally enable branching for DM_BUFIO_CLIENT_NO_SLEEP")
Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent 4fe1ec99
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