From 9d0452c3079510d07982c62035f907ed69c32fdc Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 20 Sep 2007 16:05:10 +0900 Subject: [PATCH] --- yaml --- r: 67993 b: refs/heads/master c: 078ce6409ca54d5fc6eb7d2147cd6efc3eb09078 h: refs/heads/master i: 67991: 2ae88a3c272e82391fe72f25ba46d93cb65e18ed v: v3 --- [refs] | 2 +- trunk/fs/sysfs/bin.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 1c7b553270b9..9ff6cbeee9e5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50ab1a72863b1ad4b117862bc52610f8d4535609 +refs/heads/master: 078ce6409ca54d5fc6eb7d2147cd6efc3eb09078 diff --git a/trunk/fs/sysfs/bin.c b/trunk/fs/sysfs/bin.c index e93fe5e2fa41..9c8f8824e660 100644 --- a/trunk/fs/sysfs/bin.c +++ b/trunk/fs/sysfs/bin.c @@ -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; @@ -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; }