mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
block: remove WARN_ON() from bd_link_disk_holder
Since commit 83cbce957446("block: add error handling for device_add_disk / add_disk"), bdev->bd_holder_dir can not be empty now, so remove WARN_ON() from bd_link_disk_holder. Signed-off-by: Li Nan <linan122@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220623074100.2251301-1-linan122@huawei.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
2645672ffe
commit
ca2a3343d6
1 changed files with 0 additions and 4 deletions
|
@ -79,10 +79,6 @@ int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk)
|
|||
|
||||
WARN_ON_ONCE(!bdev->bd_holder);
|
||||
|
||||
/* FIXME: remove the following once add_disk() handles errors */
|
||||
if (WARN_ON(!bdev->bd_holder_dir))
|
||||
goto out_unlock;
|
||||
|
||||
holder = bd_find_holder_disk(bdev, disk);
|
||||
if (holder) {
|
||||
holder->refcnt++;
|
||||
|
|
Loading…
Reference in a new issue