Skip to content

Commit

Permalink
sysfs: Pack sysfs_dirent more tightly.
Browse files Browse the repository at this point in the history
Placing the 16bit s_mode between a pointer and a long doesn't pack well
especailly on 64bit where we wast 48 bits.  So move s_mode and
declare it as a unsigned short.  This is the sysfs backing store
after all we don't need fields extra large just in case someday
we want userspace to be able to use a larger value.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Mar 8, 2010
1 parent f8d4f61 commit 19c38b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/sysfs/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ struct sysfs_dirent {
};

unsigned int s_flags;
unsigned short s_mode;
ino_t s_ino;
umode_t s_mode;
struct sysfs_inode_attrs *s_iattr;
};

Expand Down

0 comments on commit 19c38b6

Please sign in to comment.