aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2016-12-08 09:52:35 -0500
committerJens Axboe <axboe@fb.com>2016-12-08 15:26:57 -0700
commit20032ec38d1614f29c5a8e6cfc5b5326685fa99b (patch)
tree55689742145048a54f371b2fcf48de14735e9f17 /drivers/block
parentMerge branch 'nvmf-4.10' of git://git.infradead.org/nvme-fabrics into for-4.10/block (diff)
downloadlinux-dev-20032ec38d1614f29c5a8e6cfc5b5326685fa99b.tar.xz
linux-dev-20032ec38d1614f29c5a8e6cfc5b5326685fa99b.zip
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 <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nbd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index bc78cbb2d18a..84ea5c2251e2 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -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;