Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20032ec3 authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe
Browse files

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: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent d65cfe90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -704,6 +704,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;