diff options
| author | Steve French <sfrench@hera.kernel.org> | 2005-06-23 19:03:20 -0700 |
|---|---|---|
| committer | Steve French <sfrench@hera.kernel.org> | 2005-06-23 19:03:20 -0700 |
| commit | fa5cfae37799177769e9ae2c0527fbdfea462fa9 (patch) | |
| tree | 02f99e208949486c8899a310846dee444bac8093 /fs/sysfs/file.c | |
| parent | 0c0ff09329dafb165c0d9ac08965ddc0615020b1 (diff) | |
| parent | 16822e62053e73fa7def9decc38a7e287d27d980 (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.c | 5 |
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)) { |
