aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-12-18 23:07:23 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 15:41:00 -0500
commit15a3382451e51925facfe430deeca63d90137f5d (patch)
tree9e949861e2176ca63bc6ba4dad591fb9f2ca162e /fs/sysfs
parent4e4d6d860b9393c5395ba5920edb5b4c5d43a3a3 (diff)
sysfs: Reduce s_flags to an unsinged short so it packs well with s_mode
On 32bit this reduces sizeof(struct sysfs_dirent) by 2 bytes. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/sysfs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 2b5c923b4b90..19994948ac5c 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -77,7 +77,7 @@ struct sysfs_dirent {
77 struct sysfs_elem_bin_attr s_bin_attr; 77 struct sysfs_elem_bin_attr s_bin_attr;
78 }; 78 };
79 79
80 unsigned int s_flags; 80 unsigned short s_flags;
81 umode_t s_mode; 81 umode_t s_mode;
82 ino_t s_ino; 82 ino_t s_ino;
83 struct sysfs_inode_attrs *s_iattr; 83 struct sysfs_inode_attrs *s_iattr;
@@ -94,11 +94,11 @@ struct sysfs_dirent {
94#define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR) 94#define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR)
95 95
96/* identify any namespace tag on sysfs_dirents */ 96/* identify any namespace tag on sysfs_dirents */
97#define SYSFS_NS_TYPE_MASK 0xff00 97#define SYSFS_NS_TYPE_MASK 0xf00
98#define SYSFS_NS_TYPE_SHIFT 8 98#define SYSFS_NS_TYPE_SHIFT 8
99 99
100#define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK) 100#define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK)
101#define SYSFS_FLAG_REMOVED 0x020000 101#define SYSFS_FLAG_REMOVED 0x02000
102 102
103static inline unsigned int sysfs_type(struct sysfs_dirent *sd) 103static inline unsigned int sysfs_type(struct sysfs_dirent *sd)
104{ 104{