[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20061107183046.GD6993@agk.surrey.redhat.com>
Date: Tue, 7 Nov 2006 18:30:46 +0000
From: Alasdair G Kergon <agk@...hat.com>
To: Andrew Morton <akpm@...l.org>
Cc: linux-kernel@...r.kernel.org, dm-devel@...hat.com
Subject: [PATCH 2.6.19 2/5] dm: suspend: fix error path
If the device is already suspended, just return the error and skip the
code that would incorrectly wipe md->suspended_bdev.
(This isn't currently a problem because existing code avoids
calling this function if the device is already suspended.)
Signed-off-by: Alasdair G Kergon <agk@...hat.com>
Cc: dm-devel@...hat.com
Index: linux-2.6.19-rc4/drivers/md/dm.c
===================================================================
--- linux-2.6.19-rc4.orig/drivers/md/dm.c 2006-11-07 17:06:27.000000000 +0000
+++ linux-2.6.19-rc4/drivers/md/dm.c 2006-11-07 17:07:57.000000000 +0000
@@ -1285,7 +1285,7 @@ int dm_suspend(struct mapped_device *md,
down(&md->suspend_lock);
if (dm_suspended(md))
- goto out;
+ goto out_unlock;
map = dm_get_table(md);
@@ -1361,6 +1361,8 @@ out:
}
dm_table_put(map);
+
+out_unlock:
up(&md->suspend_lock);
return r;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists