From 49b934fa38ce010bfdeaa49c07e5da31e40cf627 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Mon, 6 Nov 2017 16:11:57 -0500 Subject: [PATCH] nbd: wait uninterruptible for the dead timeout If we have a pending signal or the user kills their application then it'll bring down the whole device, which is less than awesome. Instead wait uninterruptible for the dead timeout so we're sure we gave it our best shot. Fixes: aa388440c504 ("nbd: handle dead connections") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe --- drivers/block/nbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 3684e21d543f2..b94a735bfe3c0 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -715,9 +715,9 @@ static int wait_for_reconnect(struct nbd_device *nbd) return 0; if (test_bit(NBD_DISCONNECTED, &config->runtime_flags)) return 0; - wait_event_interruptible_timeout(config->conn_wait, - atomic_read(&config->live_connections), - config->dead_conn_timeout); + wait_event_timeout(config->conn_wait, + atomic_read(&config->live_connections), + config->dead_conn_timeout); return atomic_read(&config->live_connections); } -- 2.39.5