Commit 15a33824 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Greg Kroah-Hartman

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: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4e4d6d86
...@@ -77,7 +77,7 @@ struct sysfs_dirent { ...@@ -77,7 +77,7 @@ struct sysfs_dirent {
struct sysfs_elem_bin_attr s_bin_attr; struct sysfs_elem_bin_attr s_bin_attr;
}; };
unsigned int s_flags; unsigned short s_flags;
umode_t s_mode; umode_t s_mode;
ino_t s_ino; ino_t s_ino;
struct sysfs_inode_attrs *s_iattr; struct sysfs_inode_attrs *s_iattr;
...@@ -94,11 +94,11 @@ struct sysfs_dirent { ...@@ -94,11 +94,11 @@ struct sysfs_dirent {
#define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR) #define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR)
/* identify any namespace tag on sysfs_dirents */ /* identify any namespace tag on sysfs_dirents */
#define SYSFS_NS_TYPE_MASK 0xff00 #define SYSFS_NS_TYPE_MASK 0xf00
#define SYSFS_NS_TYPE_SHIFT 8 #define SYSFS_NS_TYPE_SHIFT 8
#define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK) #define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK)
#define SYSFS_FLAG_REMOVED 0x020000 #define SYSFS_FLAG_REMOVED 0x02000
static inline unsigned int sysfs_type(struct sysfs_dirent *sd) static inline unsigned int sysfs_type(struct sysfs_dirent *sd)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment