From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Joel Becker <joel.becker@oracle.com>
Subject: [PATCH] configfs: add missing mutex_unlock()
Date: Sun, 4 Mar 2007 22:38:12 +0900 [thread overview]
Message-ID: <20070304133812.GC8519@APFDCB5C> (raw)
From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: [PATCH] configfs: add missing mutex_unlock()
Add missing mutex_unlock() on d_alloc() failure in
configfs_register_subsystem().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Joel Becker <joel.becker@oracle.com>
---
fs/configfs/dir.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: 2.6-mm/fs/configfs/dir.c
===================================================================
--- 2.6-mm.orig/fs/configfs/dir.c
+++ 2.6-mm/fs/configfs/dir.c
@@ -1168,8 +1168,10 @@ int configfs_register_subsystem(struct c
err = -ENOMEM;
dentry = d_alloc(configfs_sb->s_root, &name);
- if (!dentry)
+ if (!dentry) {
+ mutex_unlock(&configfs_sb->s_root->d_inode->i_mutex);
goto out_release;
+ }
d_add(dentry, NULL);
next reply other threads:[~2007-03-04 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-04 13:38 Akinobu Mita [this message]
2007-03-04 14:10 ` [PATCH] configfs: add missing mutex_unlock() Arnd Bergmann
2007-03-04 15:16 ` Akinobu Mita
2007-03-05 21:42 ` Joel Becker
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=20070304133812.GC8519@APFDCB5C \
--to=akinobu.mita@gmail.com \
--cc=joel.becker@oracle.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