sysfs: Shadow directory support
[powerpc.git] / fs / sysfs / sysfs.h
index 6f3d6bd..fe1cbfd 100644 (file)
@@ -1,7 +1,8 @@
 
 extern struct vfsmount * sysfs_mount;
-extern kmem_cache_t *sysfs_dir_cachep;
+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 *));
 
@@ -33,6 +34,22 @@ struct sysfs_symlink {
        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;
+}