diff options
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 26051616ed11..3e9a5ee38233 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -44,14 +44,29 @@ struct sysfs_dirent { | |||
44 | 44 | ||
45 | #define SD_DEACTIVATED_BIAS INT_MIN | 45 | #define SD_DEACTIVATED_BIAS INT_MIN |
46 | 46 | ||
47 | struct sysfs_addrm_cxt { | ||
48 | struct sysfs_dirent *parent_sd; | ||
49 | struct inode *parent_inode; | ||
50 | struct sysfs_dirent *removed; | ||
51 | int cnt; | ||
52 | }; | ||
53 | |||
47 | extern struct vfsmount * sysfs_mount; | 54 | extern struct vfsmount * sysfs_mount; |
48 | extern struct kmem_cache *sysfs_dir_cachep; | 55 | extern struct kmem_cache *sysfs_dir_cachep; |
49 | 56 | ||
57 | extern void sysfs_link_sibling(struct sysfs_dirent *sd); | ||
58 | extern void sysfs_unlink_sibling(struct sysfs_dirent *sd); | ||
50 | extern struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd); | 59 | extern struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd); |
51 | extern void sysfs_put_active(struct sysfs_dirent *sd); | 60 | extern void sysfs_put_active(struct sysfs_dirent *sd); |
52 | extern struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd); | 61 | extern struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd); |
53 | extern void sysfs_put_active_two(struct sysfs_dirent *sd); | 62 | extern void sysfs_put_active_two(struct sysfs_dirent *sd); |
54 | extern void sysfs_deactivate(struct sysfs_dirent *sd); | 63 | extern void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt, |
64 | struct sysfs_dirent *parent_sd); | ||
65 | extern void sysfs_add_one(struct sysfs_addrm_cxt *acxt, | ||
66 | struct sysfs_dirent *sd); | ||
67 | extern void sysfs_remove_one(struct sysfs_addrm_cxt *acxt, | ||
68 | struct sysfs_dirent *sd); | ||
69 | extern int sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); | ||
55 | 70 | ||
56 | extern void sysfs_delete_inode(struct inode *inode); | 71 | extern void sysfs_delete_inode(struct inode *inode); |
57 | extern void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode); | 72 | extern void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode); |
@@ -65,9 +80,6 @@ extern struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, | |||
65 | const unsigned char *name); | 80 | const unsigned char *name); |
66 | extern struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, | 81 | extern struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, |
67 | int type); | 82 | int type); |
68 | extern void sysfs_attach_dirent(struct sysfs_dirent *sd, | ||
69 | struct sysfs_dirent *parent_sd, | ||
70 | struct dentry *dentry); | ||
71 | 83 | ||
72 | extern int sysfs_add_file(struct sysfs_dirent *dir_sd, | 84 | extern int sysfs_add_file(struct sysfs_dirent *dir_sd, |
73 | const struct attribute *attr, int type); | 85 | const struct attribute *attr, int type); |