]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
blk-wbt: fix that wbt can't be disabled by default
authorYu Kuai <yukuai3@huawei.com>
Mon, 22 May 2023 12:18:54 +0000 (20:18 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:38:17 +0000 (11:38 +0200)
commit07954478528d2a0f5f7585e85627a91acf77fe4c
treef8e334a16d9b2d686c520a24c9b886979cc62e5d
parentee6c205a9dffc8019cc9490a439f719144749c06
blk-wbt: fix that wbt can't be disabled by default

BugLink: https://bugs.launchpad.net/bugs/2028979
[ Upstream commit 8a2b20a997a3779ae9fcae268f2959eb82ec05a1 ]

commit b11d31ae01e6 ("blk-wbt: remove unnecessary check in
wbt_enable_default()") removes the checking of CONFIG_BLK_WBT_MQ by
mistake, which is used to control enable or disable wbt by default.

Fix the problem by adding back the checking. This patch also do a litter
cleanup to make related code more readable.

Fixes: b11d31ae01e6 ("blk-wbt: remove unnecessary check in wbt_enable_default()")
Reported-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/lkml/CAKXUXMzfKq_J9nKHGyr5P5rvUETY4B-fxoQD4sO+NYjFOfVtZA@mail.gmail.com/t/
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230522121854.2928880-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
block/blk-wbt.c