Skip to content

Commit ca2a334

Browse files
Li Nanaxboe
authored andcommitted
block: remove WARN_ON() from bd_link_disk_holder
Since commit 83cbce9("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>
1 parent 2645672 commit ca2a334

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

block/holder.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk)
7979

8080
WARN_ON_ONCE(!bdev->bd_holder);
8181

82-
/* FIXME: remove the following once add_disk() handles errors */
83-
if (WARN_ON(!bdev->bd_holder_dir))
84-
goto out_unlock;
85-
8682
holder = bd_find_holder_disk(bdev, disk);
8783
if (holder) {
8884
holder->refcnt++;

0 commit comments

Comments
 (0)