diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-12-18 23:08:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 15:41:46 -0500 |
commit | cafa6b5dd7ce4f0e0a30be301be4efed587a7808 (patch) | |
tree | 47200ffb5c660280ebe734b29662c12df24d7ab5 /fs/sysfs | |
parent | 15a3382451e51925facfe430deeca63d90137f5d (diff) |
sysfs: Store the sysfs inode in an unsigned int.
Store the sysfs inode number in an unsided int because
ida inode allocator can return at most a 31 bit number,
reducing the size of struct sysfs_dirent by 8 bytes
on 64bit platforms.
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/dir.c | 4 | ||||
-rw-r--r-- | fs/sysfs/sysfs.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 0daf255b7bf9..0589c9a694bf 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -224,7 +224,7 @@ static void sysfs_deactivate(struct sysfs_dirent *sd) | |||
224 | rwsem_release(&sd->dep_map, 1, _RET_IP_); | 224 | rwsem_release(&sd->dep_map, 1, _RET_IP_); |
225 | } | 225 | } |
226 | 226 | ||
227 | static int sysfs_alloc_ino(ino_t *pino) | 227 | static int sysfs_alloc_ino(unsigned int *pino) |
228 | { | 228 | { |
229 | int ino, rc; | 229 | int ino, rc; |
230 | 230 | ||
@@ -243,7 +243,7 @@ static int sysfs_alloc_ino(ino_t *pino) | |||
243 | return rc; | 243 | return rc; |
244 | } | 244 | } |
245 | 245 | ||
246 | static void sysfs_free_ino(ino_t ino) | 246 | static void sysfs_free_ino(unsigned int ino) |
247 | { | 247 | { |
248 | spin_lock(&sysfs_ino_lock); | 248 | spin_lock(&sysfs_ino_lock); |
249 | ida_remove(&sysfs_ino_ida, ino); | 249 | ida_remove(&sysfs_ino_ida, ino); |
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 19994948ac5c..661a9639570b 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -79,7 +79,7 @@ struct sysfs_dirent { | |||
79 | 79 | ||
80 | unsigned short s_flags; | 80 | unsigned short s_flags; |
81 | umode_t s_mode; | 81 | umode_t s_mode; |
82 | ino_t s_ino; | 82 | unsigned int s_ino; |
83 | struct sysfs_inode_attrs *s_iattr; | 83 | struct sysfs_inode_attrs *s_iattr; |
84 | }; | 84 | }; |
85 | 85 | ||