Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67993
b: refs/heads/master
c: 078ce64
h: refs/heads/master
i:
  67991: 2ae88a3
v: v3
  • Loading branch information
Tejun Heo authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 3566ae2 commit 9d0452c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 50ab1a72863b1ad4b117862bc52610f8d4535609
refs/heads/master: 078ce6409ca54d5fc6eb7d2147cd6efc3eb09078
10 changes: 5 additions & 5 deletions trunk/fs/sysfs/bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ static int open(struct inode * inode, struct file * file)
struct bin_buffer *bb = NULL;
int error;

/* need attr_sd for attr */
if (!sysfs_get_active(attr_sd))
/* binary file operations requires both @sd and its parent */
if (!sysfs_get_active_two(attr_sd))
return -ENODEV;

error = -EACCES;
Expand All @@ -193,12 +193,12 @@ static int open(struct inode * inode, struct file * file)
mutex_init(&bb->mutex);
file->private_data = bb;

/* open succeeded, put active reference */
sysfs_put_active(attr_sd);
/* open succeeded, put active references */
sysfs_put_active_two(attr_sd);
return 0;

err_out:
sysfs_put_active(attr_sd);
sysfs_put_active_two(attr_sd);
kfree(bb);
return error;
}
Expand Down

0 comments on commit 9d0452c

Please sign in to comment.