lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242936063-31689-2-git-send-email-tytso@mit.edu>
Date:	Thu, 21 May 2009 16:00:59 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	linux-kernel@...r.kernel.org
Cc:	linux-fsdevel@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Subject: [PATCH 1/5] fs: i_flags and i_state in struct inode only need to be unsigned short

Currently i_flags and i_state do not need to be an unsigned int and an
unsigned long, respectively.  (We currently use 9 i_flags bits, and 8
i_state bits.)  Changing them to be an unsigned short saves 4 bytes
per inode on an x86 platform, and 8 bytes on an x86_64 platform.

Signed-off-by: "Theodore Ts'o" <tytso@....edu>
Cc: linux-fsdevel@...r.kernel.org
---
 include/linux/fs.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3b534e5..9b20f13 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -765,10 +765,10 @@ struct inode {
 	struct mutex		inotify_mutex;	/* protects the watches list */
 #endif
 
-	unsigned long		i_state;
 	unsigned long		dirtied_when;	/* jiffies of first dirtying */
 
-	unsigned int		i_flags;
+	unsigned short		i_state;
+	unsigned short		i_flags;
 
 	atomic_t		i_writecount;
 #ifdef CONFIG_SECURITY
-- 
1.6.3.1.1.g75fc.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ