* [PATCH 2.6.19 2/5] dm: suspend: fix error path
@ 2006-11-07 18:30 Alasdair G Kergon
0 siblings, 0 replies; only message in thread
From: Alasdair G Kergon @ 2006-11-07 18:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, dm-devel
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@redhat.com>
Cc: dm-devel@redhat.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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-07 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-07 18:30 [PATCH 2.6.19 2/5] dm: suspend: fix error path Alasdair G Kergon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®