nbd: reset the setup task for NBD_CLEAR_SOCK
Subsystems (2)
PATCH 1/1 nbd: reset the setup task for NBD_CLEAR_SOCK
If an app exits before running NBD_DO_IT but after adding sockets we can end up not being allowed to do a new nbd device. Fix this by making NBD_CLEAR_SOCK reset the setup_task.
Signed-off-by Josef Bacik <[email protected]>
--- drivers/block/nbd.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
@@ -705,6 +705,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,kfree (nbd->socks); nbd->socks =NULL ; nbd->num_connections =0 ; + nbd->task_setup =NULL ; }return 0 ;
Signature · 1 line
2.5.5
Jens Axboe
AppliedQuoted 3 lines · Josef Bacik
If an app exits before running
NBD_DO_ITbut after adding sockets we can end up not being allowed to do a new nbd device. Fix this by makingNBD_CLEAR_SOCKreset thesetup_task.
Applied, thanks Josef.
Signature · 1 line
Jens Axboe