[PATCH 3/5] fs: Slim down inode by only using an unsigned int for i_dnotify_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Cc: sfr@xxxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
---
 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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux