From: Josef Bacik Date: Fri, 21 Jul 2017 14:48:13 +0000 (-0400) Subject: nbd: allow multiple disconnects to be sent X-Git-Tag: v4.14-rc1~376^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e13456fb3d3e5f462dc1e59efc04eb62df35566;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 87a0a29..f91e7ac 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; }