diff options
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index bd7cec295dab..d976b0005549 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -2,6 +2,7 @@ | |||
2 | extern struct vfsmount * sysfs_mount; | 2 | extern struct vfsmount * sysfs_mount; |
3 | extern struct kmem_cache *sysfs_dir_cachep; | 3 | extern struct kmem_cache *sysfs_dir_cachep; |
4 | 4 | ||
5 | extern void sysfs_delete_inode(struct inode *inode); | ||
5 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); | 6 | extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); |
6 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); | 7 | extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); |
7 | 8 | ||
@@ -25,14 +26,30 @@ extern struct super_block * sysfs_sb; | |||
25 | extern const struct file_operations sysfs_dir_operations; | 26 | extern const struct file_operations sysfs_dir_operations; |
26 | extern const struct file_operations sysfs_file_operations; | 27 | extern const struct file_operations sysfs_file_operations; |
27 | extern const struct file_operations bin_fops; | 28 | extern const struct file_operations bin_fops; |
28 | extern struct inode_operations sysfs_dir_inode_operations; | 29 | extern const struct inode_operations sysfs_dir_inode_operations; |
29 | extern struct inode_operations sysfs_symlink_inode_operations; | 30 | extern const struct inode_operations sysfs_symlink_inode_operations; |
30 | 31 | ||
31 | struct sysfs_symlink { | 32 | struct sysfs_symlink { |
32 | char * link_name; | 33 | char * link_name; |
33 | struct kobject * target_kobj; | 34 | struct kobject * target_kobj; |
34 | }; | 35 | }; |
35 | 36 | ||
37 | struct sysfs_buffer { | ||
38 | struct list_head associates; | ||
39 | size_t count; | ||
40 | loff_t pos; | ||
41 | char * page; | ||
42 | struct sysfs_ops * ops; | ||
43 | struct semaphore sem; | ||
44 | int orphaned; | ||
45 | int needs_read_fill; | ||
46 | int event; | ||
47 | }; | ||
48 | |||
49 | struct sysfs_buffer_collection { | ||
50 | struct list_head associates; | ||
51 | }; | ||
52 | |||
36 | static inline struct kobject * to_kobj(struct dentry * dentry) | 53 | static inline struct kobject * to_kobj(struct dentry * dentry) |
37 | { | 54 | { |
38 | struct sysfs_dirent * sd = dentry->d_fsdata; | 55 | struct sysfs_dirent * sd = dentry->d_fsdata; |
@@ -96,3 +113,7 @@ static inline void sysfs_put(struct sysfs_dirent * sd) | |||
96 | release_sysfs_dirent(sd); | 113 | release_sysfs_dirent(sd); |
97 | } | 114 | } |
98 | 115 | ||
116 | static inline int sysfs_is_shadowed_inode(struct inode *inode) | ||
117 | { | ||
118 | return S_ISDIR(inode->i_mode) && inode->i_op->follow_link; | ||
119 | } | ||