diff options
author | Josef Bacik <jbacik@fb.com> | 2017-07-21 17:48:13 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-22 20:12:29 +0300 |
commit | 2e13456fb3d3e5f462dc1e59efc04eb62df35566 (patch) | |
tree | 0e7520a5416cf14e7cceb2a6a9468b3c020b9f98 /drivers/block | |
parent | 82abbea734d659b4218ad06734b4927b43261985 (diff) | |
download | linux-2e13456fb3d3e5f462dc1e59efc04eb62df35566.tar.xz |
nbd: allow multiple disconnects to be sent
There's no reason to limit ourselves to one disconnect message per
socket. Sometimes networks do strange things, might as well let
sysadmins hit the panic button as much as they want.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nbd.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 87a0a29f6e7e..f91e7ac3fa32 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -991,9 +991,8 @@ static int nbd_disconnect(struct nbd_device *nbd) struct nbd_config *config = nbd->config; dev_info(disk_to_dev(nbd->disk), "NBD_DISCONNECT\n"); - if (!test_and_set_bit(NBD_DISCONNECT_REQUESTED, - &config->runtime_flags)) - send_disconnects(nbd); + set_bit(NBD_DISCONNECT_REQUESTED, &config->runtime_flags); + send_disconnects(nbd); return 0; } |