Christoph Hellwig 409e0ff10e nbd: reset NBD to NULL when restarting in nbd_genl_connect
When nbd_genl_connect restarts to wait for a disconnecting device, nbd
needs to be reset to NULL.  Do that by facoring out a helper to find
an unused device.

Fixes: 6177b56c96ff ("nbd: refactor device search and allocation in nbd_genl_connect")
Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Reported-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210825163108.50713-3-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-08-25 14:20:20 -06:00
..
2021-07-30 10:56:47 -07:00
2021-06-30 15:51:09 -07:00
2021-06-30 15:34:19 -06:00
2021-07-10 09:22:44 -07:00
2021-06-29 10:53:48 -07:00
2021-07-13 15:15:17 +02:00
2021-07-25 10:04:27 -07:00
2021-07-05 12:10:34 -07:00
2021-07-20 22:32:01 +02:00
2021-07-10 11:53:06 -07:00
2021-07-05 14:08:24 -07:00
2021-07-09 15:35:13 +02:00
2021-07-05 14:08:24 -07:00
2021-07-23 11:08:06 -07:00
2021-06-30 12:12:56 -07:00
2021-07-05 13:51:41 -07:00
2021-07-22 09:51:38 -07:00
2021-07-30 08:47:34 +02:00
2021-07-04 11:55:13 -07:00
2021-07-03 10:54:08 -07:00
2021-07-21 12:37:49 -07:00
2021-07-07 10:50:03 -07:00
2021-07-10 09:46:20 -07:00
2021-07-10 16:19:10 -07:00
2021-07-17 13:09:23 -07:00
2021-07-10 09:46:20 -07:00
2021-07-21 12:41:41 -07:00
2021-07-05 14:08:24 -07:00
2021-07-23 10:09:27 -07:00
2021-07-03 11:49:33 -07:00
2021-07-16 11:14:54 -07:00
2021-07-09 11:06:29 -07:00
2021-07-07 12:57:46 -07:00
2021-07-07 11:07:13 -07:00
2021-08-14 15:54:09 -06:00
2021-08-14 15:54:09 -06:00