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.h25
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 @@
2extern struct vfsmount * sysfs_mount; 2extern struct vfsmount * sysfs_mount;
3extern struct kmem_cache *sysfs_dir_cachep; 3extern struct kmem_cache *sysfs_dir_cachep;
4 4
5extern void sysfs_delete_inode(struct inode *inode);
5extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); 6extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *);
6extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); 7extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *));
7 8
@@ -25,14 +26,30 @@ extern struct super_block * sysfs_sb;
25extern const struct file_operations sysfs_dir_operations; 26extern const struct file_operations sysfs_dir_operations;
26extern const struct file_operations sysfs_file_operations; 27extern const struct file_operations sysfs_file_operations;
27extern const struct file_operations bin_fops; 28extern const struct file_operations bin_fops;
28extern struct inode_operations sysfs_dir_inode_operations; 29extern const struct inode_operations sysfs_dir_inode_operations;
29extern struct inode_operations sysfs_symlink_inode_operations; 30extern const struct inode_operations sysfs_symlink_inode_operations;
30 31
31struct sysfs_symlink { 32struct sysfs_symlink {
32 char * link_name; 33 char * link_name;
33 struct kobject * target_kobj; 34 struct kobject * target_kobj;
34}; 35};
35 36
37struct 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
49struct sysfs_buffer_collection {
50 struct list_head associates;
51};
52
36static inline struct kobject * to_kobj(struct dentry * dentry) 53static 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
116static inline int sysfs_is_shadowed_inode(struct inode *inode)
117{
118 return S_ISDIR(inode->i_mode) && inode->i_op->follow_link;
119}