diff options
author | Adam J. Richter <adam@yggdrasil.com> | 2007-02-16 08:35:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 17:52:09 -0500 |
commit | d56c3eae6753f53d3313b926dcdda38c6c9bbe9b (patch) | |
tree | c5df874dec463be02221a58a9dcdaf43d8038457 | |
parent | 63ce18cfe685115ff8d341bae4c9204a79043cf0 (diff) |
sysfs: move struct sysfs_dirent to private header
struct sysfs_dirent is private to the fs/sysfs/ subtree. It is
not even referenced as an opaque structure outside of that subtree.
The following patch moves the declaration from include/linux/sysfs.h to
fs/sysfs/sysfs.h, making it clearer that nothing else in the kernel
dereferences it.
I have been running this patch for years. Please integrate and forward
upstream if there are no objections.
From: "Adam J. Richter" <adam@yggdrasil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/sysfs/sysfs.h | 11 | ||||
-rw-r--r-- | include/linux/sysfs.h | 13 |
2 files changed, 12 insertions, 12 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index d976b0005549..a77c57e5a6d5 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -1,3 +1,14 @@ | |||
1 | struct sysfs_dirent { | ||
2 | atomic_t s_count; | ||
3 | struct list_head s_sibling; | ||
4 | struct list_head s_children; | ||
5 | void * s_element; | ||
6 | int s_type; | ||
7 | umode_t s_mode; | ||
8 | struct dentry * s_dentry; | ||
9 | struct iattr * s_iattr; | ||
10 | atomic_t s_event; | ||
11 | }; | ||
1 | 12 | ||
2 | extern struct vfsmount * sysfs_mount; | 13 | extern struct vfsmount * sysfs_mount; |
3 | extern struct kmem_cache *sysfs_dir_cachep; | 14 | extern struct kmem_cache *sysfs_dir_cachep; |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 192de3afa96b..f07065cba7c1 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct kobject; | 17 | struct kobject; |
18 | struct module; | 18 | struct module; |
19 | struct nameidata; | 19 | struct nameidata; |
20 | struct dentry; | ||
20 | 21 | ||
21 | struct attribute { | 22 | struct attribute { |
22 | const char * name; | 23 | const char * name; |
@@ -68,18 +69,6 @@ struct sysfs_ops { | |||
68 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 69 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct sysfs_dirent { | ||
72 | atomic_t s_count; | ||
73 | struct list_head s_sibling; | ||
74 | struct list_head s_children; | ||
75 | void * s_element; | ||
76 | int s_type; | ||
77 | umode_t s_mode; | ||
78 | struct dentry * s_dentry; | ||
79 | struct iattr * s_iattr; | ||
80 | atomic_t s_event; | ||
81 | }; | ||
82 | |||
83 | #define SYSFS_ROOT 0x0001 | 72 | #define SYSFS_ROOT 0x0001 |
84 | #define SYSFS_DIR 0x0002 | 73 | #define SYSFS_DIR 0x0002 |
85 | #define SYSFS_KOBJ_ATTR 0x0004 | 74 | #define SYSFS_KOBJ_ATTR 0x0004 |