aboutsummaryrefslogtreecommitdiff
path: root/fs/sysfs/file.c
diff options
context:
space:
mode:
authorSteve French <sfrench@hera.kernel.org>2005-06-23 19:03:20 -0700
committerSteve French <sfrench@hera.kernel.org>2005-06-23 19:03:20 -0700
commitfa5cfae37799177769e9ae2c0527fbdfea462fa9 (patch)
tree02f99e208949486c8899a310846dee444bac8093 /fs/sysfs/file.c
parent0c0ff09329dafb165c0d9ac08965ddc0615020b1 (diff)
parent16822e62053e73fa7def9decc38a7e287d27d980 (diff)
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r--fs/sysfs/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 849aac11546..e9cfa39f409 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -5,6 +5,7 @@
#include <linux/module.h>
#include <linux/dnotify.h>
#include <linux/kobject.h>
+#include <linux/namei.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
@@ -400,7 +401,7 @@ int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
int res = -ENOENT;
down(&dir->d_inode->i_sem);
- victim = sysfs_get_dentry(dir, attr->name);
+ victim = lookup_one_len(attr->name, dir, strlen(attr->name));
if (!IS_ERR(victim)) {
/* make sure dentry is really there */
if (victim->d_inode &&
@@ -443,7 +444,7 @@ int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode)
int res = -ENOENT;
down(&dir->d_inode->i_sem);
- victim = sysfs_get_dentry(dir, attr->name);
+ victim = lookup_one_len(attr->name, dir, strlen(attr->name));
if (!IS_ERR(victim)) {
if (victim->d_inode &&
(victim->d_parent->d_inode == dir->d_inode)) {