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]
Date:	Thu, 21 May 2009 16:01:01 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	linux-kernel@...r.kernel.org
Cc:	linux-fsdevel@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
	sfr@...b.auug.org.au
Subject: [PATCH 3/5] fs: Slim down inode by only using an unsigned int for i_dnotify_mask

The dnotify mask values range from 0x0001 through 0x0020, as well as
0x80000000 (for DN_MULTISHOT).  There is no need for this field to be
an unsigned long (which is 8 bytes on 64-bit systems).  Using an
unsigned int will save 4 bytes for the inode structure on 64-bit
systems.

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

diff --git a/include/linux/dnotify.h b/include/linux/dnotify.h
index 102a902..d573542 100644
--- a/include/linux/dnotify.h
+++ b/include/linux/dnotify.h
@@ -10,7 +10,7 @@
 
 struct dnotify_struct {
 	struct dnotify_struct *	dn_next;
-	unsigned long		dn_mask;
+	unsigned int		dn_mask;
 	int			dn_fd;
 	struct file *		dn_filp;
 	fl_owner_t		dn_owner;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e3b8334..7c73c59 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -755,7 +755,7 @@ struct inode {
 	__u32			i_generation;
 
 #ifdef CONFIG_DNOTIFY
-	unsigned long		i_dnotify_mask; /* Directory notify events */
+	unsigned int		i_dnotify_mask; /* Directory notify events */
 	struct dnotify_struct	*i_dnotify; /* for directory notifications */
 #endif
 
-- 
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