mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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: 560bc4b399
("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>
This commit is contained in:
parent
923218f616
commit
ff57dc94fa
@ -715,7 +715,7 @@ 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,
|
||||
wait_event_timeout(config->conn_wait,
|
||||
atomic_read(&config->live_connections),
|
||||
config->dead_conn_timeout);
|
||||
return atomic_read(&config->live_connections);
|
||||
|
Loading…
Reference in New Issue
Block a user