[PATCH] configfs: add missing mutex_unlock()
From: Akinobu Mita
Date: Sun Mar 04 2007 - 08:42:24 EST
From: Akinobu Mita <akinobu.mita@xxxxxxxxx>
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@xxxxxxxxx>
Cc: Joel Becker <joel.becker@xxxxxxxxxx>
---
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/