X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fsysfs%2Fsysfs.h;h=d976b0005549e9deb720352298550dfed644a839;hb=f50b6f8691cae2e0064c499dd3ef3f31142987f0;hp=bd7cec295dab25dd3451ebf2154bd6784f483695;hpb=9b3a89f8b052f2a6193a9691e053f986144a65a0;p=powerpc.git diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index bd7cec295d..d976b00055 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h @@ -2,6 +2,7 @@ extern struct vfsmount * sysfs_mount; extern struct kmem_cache *sysfs_dir_cachep; +extern void sysfs_delete_inode(struct inode *inode); extern struct inode * sysfs_new_inode(mode_t mode, struct sysfs_dirent *); extern int sysfs_create(struct dentry *, int mode, int (*init)(struct inode *)); @@ -25,14 +26,30 @@ extern struct super_block * sysfs_sb; extern const struct file_operations sysfs_dir_operations; extern const struct file_operations sysfs_file_operations; extern const struct file_operations bin_fops; -extern struct inode_operations sysfs_dir_inode_operations; -extern struct inode_operations sysfs_symlink_inode_operations; +extern const struct inode_operations sysfs_dir_inode_operations; +extern const struct inode_operations sysfs_symlink_inode_operations; struct sysfs_symlink { char * link_name; struct kobject * target_kobj; }; +struct sysfs_buffer { + struct list_head associates; + size_t count; + loff_t pos; + char * page; + struct sysfs_ops * ops; + struct semaphore sem; + int orphaned; + int needs_read_fill; + int event; +}; + +struct sysfs_buffer_collection { + struct list_head associates; +}; + static inline struct kobject * to_kobj(struct dentry * dentry) { struct sysfs_dirent * sd = dentry->d_fsdata; @@ -96,3 +113,7 @@ static inline void sysfs_put(struct sysfs_dirent * sd) release_sysfs_dirent(sd); } +static inline int sysfs_is_shadowed_inode(struct inode *inode) +{ + return S_ISDIR(inode->i_mode) && inode->i_op->follow_link; +}