diff mbox

[1/2,RESEND] nbd: wait uninterruptible for the dead timeout

Message ID 1510002718-9574-1-git-send-email-josef@toxicpanda.com (mailing list archive)
State New, archived
Headers show

Commit Message

Josef Bacik Nov. 6, 2017, 9:11 p.m. UTC
From: Josef Bacik <jbacik@fb.com>

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>
---
 drivers/block/nbd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jens Axboe Nov. 6, 2017, 9:15 p.m. UTC | #1
On 11/06/2017 02:11 PM, Josef Bacik wrote:
> From: Josef Bacik <jbacik@fb.com>
> 
> 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.

Applied 1-2 for 4.15, thanks.
diff mbox

Patch

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);
 }