Commit c14c928e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Yongqiang Liu
Browse files

block: fix busy device checking in blk_drop_partitions again

mainline inclusion
from mainline-v5.7-rc1
commit cb6b771b
category: bugfix
bugzilla: 186898, https://gitee.com/openeuler/kernel/issues/I5ALJL


CVE: NA

--------------------------------

The previous fix had an off by one in the bd_openers checking, counting
the callers blkdev_get.

Fixes: d3ef5536 ("block: fix busy device checking in blk_drop_partitions")
Reported-by: default avatarQian Cai <cai@lca.pw>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarQian Cai <cai@lca.pw>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarLi Nan <linan122@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent db4eff3b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment