diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 15:27:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:08 -0400 |
commit | b402d72cf7b338a074e3c12b305ec79284e18845 (patch) | |
tree | 0724d40180eb78212be81c7ff2d909ec3fb3f306 /fs/sysfs/sysfs.h | |
parent | d0bcb5689a521df98bff7549fcb8b17499660a99 (diff) |
sysfs: rename sysfs_dirent->s_type to s_flags and make room for flags
Rename sysfs_dirent->s_type to s_flags, pack type into lower eight
bits and reserve the rest for flags. sysfs_type() can used to access
the type. All existing sd->s_type accesses are converted to use
sysfs_type(). While at it, type test is changed to equality test
instead of bit-and test where appropriate.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 6f8aaf3805d2..06b5085804a1 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -34,7 +34,7 @@ struct sysfs_dirent { | |||
34 | struct sysfs_elem_bin_attr bin_attr; | 34 | struct sysfs_elem_bin_attr bin_attr; |
35 | } s_elem; | 35 | } s_elem; |
36 | 36 | ||
37 | int s_type; | 37 | unsigned int s_flags; |
38 | umode_t s_mode; | 38 | umode_t s_mode; |
39 | ino_t s_ino; | 39 | ino_t s_ino; |
40 | struct dentry * s_dentry; | 40 | struct dentry * s_dentry; |
@@ -86,6 +86,11 @@ extern const struct file_operations bin_fops; | |||
86 | extern const struct inode_operations sysfs_dir_inode_operations; | 86 | extern const struct inode_operations sysfs_dir_inode_operations; |
87 | extern const struct inode_operations sysfs_symlink_inode_operations; | 87 | extern const struct inode_operations sysfs_symlink_inode_operations; |
88 | 88 | ||
89 | static inline unsigned int sysfs_type(struct sysfs_dirent *sd) | ||
90 | { | ||
91 | return sd->s_flags & SYSFS_TYPE_MASK; | ||
92 | } | ||
93 | |||
89 | static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd) | 94 | static inline struct sysfs_dirent * sysfs_get(struct sysfs_dirent * sd) |
90 | { | 95 | { |
91 | if (sd) { | 96 | if (sd) { |