projects
/
unionfs-2.6.38.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05b1ed7
)
sysfs: release mutex when kmalloc() failed in sysfs_open_file().
author
YOSHIFUJI Hideaki
<yoshfuji@linux-ipv6.org>
Fri, 13 Jul 2007 05:24:52 +0000
(22:24 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 9 Aug 2007 21:27:46 +0000
(14:27 -0700)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/file.c
patch
|
blob
|
history
diff --git
a/fs/sysfs/file.c
b/fs/sysfs/file.c
index b502c7197ec063777d90af4c49f038e95acd0c9e..1f64ce529051453d89f7b6d5ee649310c9a011da 100644
(file)
--- a/
fs/sysfs/file.c
+++ b/
fs/sysfs/file.c
@@
-283,6
+283,7
@@
static int sysfs_open_file(struct inode *inode, struct file *file)
mutex_lock(&inode->i_mutex);
if (!(set = inode->i_private)) {
if (!(set = inode->i_private = kmalloc(sizeof(struct sysfs_buffer_collection), GFP_KERNEL))) {
+ mutex_unlock(&inode->i_mutex);
error = -ENOMEM;
goto Done;
} else {