[PATCH] Device-Mapper 3/9

From: Kevin Corry
Date: Mon Apr 12 2004 - 09:23:24 EST


Handle interrupts within suspend.

--- diff/drivers/md/dm.c 2004-04-09 09:41:53.000000000 -0500
+++ source/drivers/md/dm.c 2004-04-09 09:42:02.000000000 -0500
@@ -925,7 +925,7 @@
while (1) {
set_current_state(TASK_INTERRUPTIBLE);

- if (!atomic_read(&md->pending))
+ if (!atomic_read(&md->pending) || signal_pending(current))
break;

io_schedule();
@@ -934,6 +934,14 @@

down_write(&md->lock);
remove_wait_queue(&md->wait, &wait);
+
+ /* were we interrupted ? */
+ if (atomic_read(&md->pending)) {
+ clear_bit(DMF_BLOCK_IO, &md->flags);
+ up_write(&md->lock);
+ return -EINTR;
+ }
+
set_bit(DMF_SUSPENDED, &md->flags);

map = dm_get_table(md);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/