patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / fs / sysfs / sysfs.h
index 96e390a..ff5d147 100644 (file)
@@ -11,3 +11,19 @@ extern void sysfs_hash_and_remove(struct dentry * dir, const char * name);
 
 extern int sysfs_create_subdir(struct kobject *, const char *, struct dentry **);
 extern void sysfs_remove_subdir(struct dentry *);
+
+extern int sysfs_readlink(struct dentry *, char __user *, int );
+extern int sysfs_follow_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;
+}