Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140183
b: refs/heads/master
c: 401600d
h: refs/heads/master
i:
  140181: b8489dc
  140179: 04c36c2
  140175: 1602fcd
v: v3
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Apr 2, 2009
1 parent 7d211c1 commit b32e449
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef2085870ea448b3c19160d899cf4f948da6a384
refs/heads/master: 401600dfd368305e641d79db16d514f55c084544
9 changes: 5 additions & 4 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b32e449

Please sign in to comment.