diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 9bcde2325893183167dcaed84f299af777d62a39..e21d2ded732b735c13f7ebbd02533ed081afe0ca 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -1231,7 +1231,7 @@ static void nbd_clear_sock_ioctl(struct nbd_device *nbd, struct block_device *bdev) { sock_shutdown(nbd); - kill_bdev(bdev); + __invalidate_device(bdev, true); nbd_bdev_reset(bdev); if (test_and_clear_bit(NBD_HAS_CONFIG_REF, &nbd->config->runtime_flags))