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 <[email protected]>
---
block/holder.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/holder.c b/block/holder.c
index 8d750281a1cd..5283bc804cc1 100644
--- a/block/holder.c
+++ b/block/holder.c
@@ -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++;
--
2.31.1
Thanks, looks good:
Reviewed-by: Christoph Hellwig <[email protected]>
On Thu, 23 Jun 2022 15:41:00 +0800, Li Nan wrote:
> 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.
>
>
Applied, thanks!
[1/1] block: remove WARN_ON() from bd_link_disk_holder
commit: ca2a3343d69741dae4df2dbb954fb806d9a835de
Best regards,
--
Jens Axboe