Skip to content

Commit

Permalink
block: remove WARN_ON() from bd_link_disk_holder
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Li Nan authored and axboe committed Jun 23, 2022
1 parent 2645672 commit ca2a334
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions block/holder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit ca2a334

Please sign in to comment.