aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h20
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
47struct sysfs_addrm_cxt {
48 struct sysfs_dirent *parent_sd;
49 struct inode *parent_inode;
50 struct sysfs_dirent *removed;
51 int cnt;
52};
53
47extern struct vfsmount * sysfs_mount; 54extern struct vfsmount * sysfs_mount;
48extern struct kmem_cache *sysfs_dir_cachep; 55extern struct kmem_cache *sysfs_dir_cachep;
49 56
57extern void sysfs_link_sibling(struct sysfs_dirent *sd);
58extern void sysfs_unlink_sibling(struct sysfs_dirent *sd);
50extern struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd); 59extern struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd);
51extern void sysfs_put_active(struct sysfs_dirent *sd); 60extern void sysfs_put_active(struct sysfs_dirent *sd);
52extern struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd); 61extern struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd);
53extern void sysfs_put_active_two(struct sysfs_dirent *sd); 62extern void sysfs_put_active_two(struct sysfs_dirent *sd);
54extern void sysfs_deactivate(struct sysfs_dirent *sd); 63extern void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
64 struct sysfs_dirent *parent_sd);
65extern void sysfs_add_one(struct sysfs_addrm_cxt *acxt,
66 struct sysfs_dirent *sd);
67extern void sysfs_remove_one(struct sysfs_addrm_cxt *acxt,
68 struct sysfs_dirent *sd);
69extern int sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt);
55 70
56extern void sysfs_delete_inode(struct inode *inode); 71extern void sysfs_delete_inode(struct inode *inode);
57extern void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode); 72extern 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);
66extern struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, 81extern struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode,
67 int type); 82 int type);
68extern void sysfs_attach_dirent(struct sysfs_dirent *sd,
69 struct sysfs_dirent *parent_sd,
70 struct dentry *dentry);
71 83
72extern int sysfs_add_file(struct sysfs_dirent *dir_sd, 84extern int sysfs_add_file(struct sysfs_dirent *dir_sd,
73 const struct attribute *attr, int type); 85 const struct attribute *attr, int type);