2 extern struct vfsmount
* sysfs_mount
;
4 extern struct inode
* sysfs_new_inode(mode_t mode
);
5 extern int sysfs_create(struct dentry
*, int mode
, int (*init
)(struct inode
*));
7 extern struct dentry
* sysfs_get_dentry(struct dentry
*, const char *);
9 extern int sysfs_add_file(struct dentry
* dir
, const struct attribute
* attr
);
10 extern void sysfs_hash_and_remove(struct dentry
* dir
, const char * name
);
12 extern int sysfs_create_subdir(struct kobject
*, const char *, struct dentry
**);
13 extern void sysfs_remove_subdir(struct dentry
*);
15 extern int sysfs_follow_link(struct dentry
*, struct nameidata
*);
16 extern void sysfs_put_link(struct dentry
*, struct nameidata
*);
17 extern struct rw_semaphore sysfs_rename_sem
;
19 static inline struct kobject
*sysfs_get_kobject(struct dentry
*dentry
)
21 struct kobject
* kobj
= NULL
;
23 spin_lock(&dcache_lock
);
24 if (!d_unhashed(dentry
))
25 kobj
= kobject_get(dentry
->d_fsdata
);
26 spin_unlock(&dcache_lock
);