summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorJosef Bacik2017-11-06 22:11:57 +0100
committerJens Axboe2017-11-06 22:15:02 +0100
commitff57dc94faec023abc267cdc45766fccff497557 (patch)
tree13e420c47d518dada7800b0cb74daab7bc45c0b8 /drivers/block/nbd.c
parentblk-mq: don't allocate driver tag upfront for flush rq (diff)
downloadkernel-qcow2-linux-ff57dc94faec023abc267cdc45766fccff497557.tar.gz
kernel-qcow2-linux-ff57dc94faec023abc267cdc45766fccff497557.tar.xz
kernel-qcow2-linux-ff57dc94faec023abc267cdc45766fccff497557.zip
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: 560bc4b39952 ("nbd: handle dead connections") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
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 3684e21d543f..b94a735bfe3c 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);
}