drbd: don't set ->bd_contains
authorChristoph Hellwig <hch@lst.de>
Thu, 3 Sep 2020 05:41:01 +0000 (07:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Sep 2020 14:18:58 +0000 (08:18 -0600)
The ->bd_contains field is set by __blkdev_get and drivers have no
business manipulating it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_main.c

index 04b6bde..bd8b129 100644 (file)
@@ -2766,8 +2766,6 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
        disk->private_data = device;
 
        device->this_bdev = bdget(MKDEV(DRBD_MAJOR, minor));
-       /* we have no partitions. we contain only ourselves. */
-       device->this_bdev->bd_contains = device->this_bdev;
 
        blk_queue_write_cache(q, true, true);
        /* Setting the max_hw_sectors to an odd value of 8kibyte here