Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cafa6b5d authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Greg Kroah-Hartman
Browse files

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: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 15a33824
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static void sysfs_deactivate(struct sysfs_dirent *sd)
	rwsem_release(&sd->dep_map, 1, _RET_IP_);
}

static int sysfs_alloc_ino(ino_t *pino)
static int sysfs_alloc_ino(unsigned int *pino)
{
	int ino, rc;

@@ -243,7 +243,7 @@ static int sysfs_alloc_ino(ino_t *pino)
	return rc;
}

static void sysfs_free_ino(ino_t ino)
static void sysfs_free_ino(unsigned int ino)
{
	spin_lock(&sysfs_ino_lock);
	ida_remove(&sysfs_ino_ida, ino);
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ struct sysfs_dirent {

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