summaryrefslogtreecommitdiff
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2017-11-07 00:11:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-30 11:40:41 +0300
commitf6b7c54c2d0ee8fe4d3b1cdfdb1961a80be60d3f (patch)
treebd3e63d41afbeb8a8bdcb07575715410be79886e /drivers/block/nbd.c
parenta59e386c4f4fce346161c0a62a5e1fbc1f435d6f (diff)
downloadlinux-f6b7c54c2d0ee8fe4d3b1cdfdb1961a80be60d3f.tar.xz
nbd: wait uninterruptible for the dead timeout
commit ff57dc94faec023abc267cdc45766fccff497557 upstream. 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: 560bc4b39952 ("nbd: handle dead connections") Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 9adfb5445f8d..fdef8efcdabc 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -723,9 +723,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);
}