Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40096
b: refs/heads/master
c: 559c9ac
h: refs/heads/master
v: v3
  • Loading branch information
Chandra Seetharaman authored and Mark Fasheh committed Oct 20, 2006
1 parent bf042a5 commit 248ef0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2057c5a63821e17c8a54dab6db680c77ce7ee6c
refs/heads/master: 559c9ac391c046710bdeee5581dc5d9dda794881
14 changes: 8 additions & 6 deletions trunk/fs/configfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,20 +275,22 @@ static int check_perm(struct inode * inode, struct file * file)
* it in file->private_data for easy access.
*/
buffer = kzalloc(sizeof(struct configfs_buffer),GFP_KERNEL);
if (buffer) {
init_MUTEX(&buffer->sem);
buffer->needs_read_fill = 1;
buffer->ops = ops;
file->private_data = buffer;
} else
if (!buffer) {
error = -ENOMEM;
goto Enomem;
}
init_MUTEX(&buffer->sem);
buffer->needs_read_fill = 1;
buffer->ops = ops;
file->private_data = buffer;
goto Done;

Einval:
error = -EINVAL;
goto Done;
Eaccess:
error = -EACCES;
Enomem:
module_put(attr->ca_owner);
Done:
if (error && item)
Expand Down

0 comments on commit 248ef0f

Please sign in to comment.