From: Alasdair G Kergon <agk@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, dm-devel@redhat.com
Subject: [PATCH 2.6.19 2/5] dm: suspend: fix error path
Date: Tue, 7 Nov 2006 18:30:46 +0000 [thread overview]
Message-ID: <20061107183046.GD6993@agk.surrey.redhat.com> (raw)
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;
}
reply other threads:[~2006-11-07 18:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061107183046.GD6993@agk.surrey.redhat.com \
--to=agk@redhat.com \
--cc=akpm@osdl.org \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®