+
+extern int sysfs_follow_link(struct dentry *, struct nameidata *);
+extern void sysfs_put_link(struct dentry *, struct nameidata *);
+extern struct rw_semaphore sysfs_rename_sem;
+
+static inline struct kobject *sysfs_get_kobject(struct dentry *dentry)
+{
+ struct kobject * kobj = NULL;
+
+ spin_lock(&dcache_lock);
+ if (!d_unhashed(dentry))
+ kobj = kobject_get(dentry->d_fsdata);
+ spin_unlock(&dcache_lock);
+
+ return kobj;
+}