diff options
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 718e2e123fae..60717660ac55 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -3,7 +3,7 @@ struct sysfs_elem_dir { | |||
3 | }; | 3 | }; |
4 | 4 | ||
5 | struct sysfs_elem_symlink { | 5 | struct sysfs_elem_symlink { |
6 | struct kobject * target_kobj; | 6 | struct sysfs_dirent * target_sd; |
7 | }; | 7 | }; |
8 | 8 | ||
9 | struct sysfs_elem_attr { | 9 | struct sysfs_elem_attr { |
@@ -100,10 +100,11 @@ static inline struct kobject *sysfs_get_kobject(struct dentry *dentry) | |||
100 | spin_lock(&dcache_lock); | 100 | spin_lock(&dcache_lock); |
101 | if (!d_unhashed(dentry)) { | 101 | if (!d_unhashed(dentry)) { |
102 | struct sysfs_dirent * sd = dentry->d_fsdata; | 102 | struct sysfs_dirent * sd = dentry->d_fsdata; |
103 | |||
103 | if (sd->s_type & SYSFS_KOBJ_LINK) | 104 | if (sd->s_type & SYSFS_KOBJ_LINK) |
104 | kobj = kobject_get(sd->s_elem.symlink.target_kobj); | 105 | sd = sd->s_elem.symlink.target_sd; |
105 | else | 106 | |
106 | kobj = kobject_get(sd->s_elem.dir.kobj); | 107 | kobj = kobject_get(sd->s_elem.dir.kobj); |
107 | } | 108 | } |
108 | spin_unlock(&dcache_lock); | 109 | spin_unlock(&dcache_lock); |
109 | 110 | ||