Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: neilb@suse.de, linux-raid@vger.kernel.org
Subject: [patch] md.c release locks on error
Date: Sat, 18 Apr 2009 16:47:17 +0300 (EAT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0904181641450.5780@bicker> (raw)

I think we need to release disks_mutex and put mddev here.  The other 
return paths are like that.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/md/md.c	2009-04-15 18:32:05.000000000 +0300
+++ devel/drivers/md/md.c	2009-04-15 18:32:48.000000000 +0300
@@ -3860,6 +3860,8 @@
 			if (mddev2->gendisk &&
 			    strcmp(mddev2->gendisk->disk_name, name) == 0) {
 				spin_unlock(&all_mddevs_lock);
+		                mutex_unlock(&disks_mutex);
+                		mddev_put(mddev);
 				return -EEXIST;
 			}
 		spin_unlock(&all_mddevs_lock);

                 reply	other threads:[~2009-04-18 13:47 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=alpine.DEB.2.00.0904181641450.5780@bicker \
    --to=error27@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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