From b32e4498ce883a70f49aa5cfbee7f9aa6dad073d Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Thu, 2 Apr 2009 19:55:38 +0100 Subject: [PATCH] --- yaml --- r: 140183 b: refs/heads/master c: 401600dfd368305e641d79db16d514f55c084544 h: refs/heads/master i: 140181: b8489dc0a8b6a09e703457ba5e475f71f6acb42a 140179: 04c36c242a4c3cd817f8ff9e876f3a805606c321 140175: 1602fcdf173b85dfa8b14bc570d7d305c3ed3264 v: v3 --- [refs] | 2 +- trunk/drivers/md/dm.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 64ec1629cd55..50f94ceeeeda 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef2085870ea448b3c19160d899cf4f948da6a384 +refs/heads/master: 401600dfd368305e641d79db16d514f55c084544 diff --git a/trunk/drivers/md/dm.c b/trunk/drivers/md/dm.c index 4ba0811f28c5..ae21833b270a 100644 --- a/trunk/drivers/md/dm.c +++ b/trunk/drivers/md/dm.c @@ -1375,18 +1375,19 @@ void dm_put(struct mapped_device *md) } EXPORT_SYMBOL_GPL(dm_put); -static int dm_wait_for_completion(struct mapped_device *md) +static int dm_wait_for_completion(struct mapped_device *md, int interruptible) { int r = 0; while (1) { - set_current_state(TASK_INTERRUPTIBLE); + set_current_state(interruptible); smp_mb(); if (!atomic_read(&md->pending)) break; - if (signal_pending(current)) { + if (interruptible == TASK_INTERRUPTIBLE && + signal_pending(current)) { r = -EINTR; break; } @@ -1565,7 +1566,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags) /* * Wait for the already-mapped ios to complete. */ - r = dm_wait_for_completion(md); + r = dm_wait_for_completion(md, TASK_INTERRUPTIBLE); down_write(&md->io_lock); remove_wait_queue(&md->wait, &wait);