From: Akinobu Mita <akinobu.mita@gmail.com>
To: dm-devel@redhat.com
Subject: [PATCH] dm: fix freeze_bdev() return value check
Date: Mon, 24 Sep 2007 19:56:36 +0900 [thread overview]
Message-ID: <20070924105636.GA30406@APFDCB5C> (raw)
freeze_bdev() does not return errno as pointer on failure.
This patch fixes the return value check.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
drivers/md/dm.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
Index: 2.6-git/drivers/md/dm.c
===================================================================
--- 2.6-git.orig/drivers/md/dm.c
+++ 2.6-git/drivers/md/dm.c
@@ -1290,16 +1290,11 @@ out:
*/
static int lock_fs(struct mapped_device *md)
{
- int r;
-
WARN_ON(md->frozen_sb);
md->frozen_sb = freeze_bdev(md->suspended_bdev);
- if (IS_ERR(md->frozen_sb)) {
- r = PTR_ERR(md->frozen_sb);
- md->frozen_sb = NULL;
- return r;
- }
+ if (!md->frozen_sb)
+ return -ENODEV;
set_bit(DMF_FROZEN, &md->flags);
next reply other threads:[~2007-09-24 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 10:56 Akinobu Mita [this message]
2007-09-24 13:04 ` [PATCH] dm: fix freeze_bdev() return value check Alasdair G Kergon
2007-09-25 14:23 ` Akinobu Mita
2007-09-25 15:52 ` Milan Broz
2007-09-25 15:56 ` Christoph Hellwig
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=20070924105636.GA30406@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=dm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.