Skip to contentSkip to conversation

shrink inode when quota is disabled

PATCH New Matt Mackall 1 participant 1 message Apr 3, 2004 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shrink inode when quota is disabled

drop quota array in inode struct if no quota support

 tiny-mpm/fs/inode.c         |    2 ++
 tiny-mpm/include/linux/fs.h |    2 ++
 2 files changed, 4 insertions(+)
include/linux/fs.h +2 -0
Index: tiny/include/linux/fs.h
===================================================================
@@ -403,7 +403,9 @@
 	struct file_lock	*i_flock;
 	struct address_space	*i_mapping;
 	struct address_space	i_data;
+#ifdef CONFIG_QUOTA
 	struct dquot		*i_dquot[MAXQUOTAS];
+#endif
 	/* These three should probably be a union */
 	struct list_head	i_devices;
 	struct pipe_inode_info	*i_pipe;
fs/inode.c +2 -0
Index: tiny/fs/inode.c
===================================================================
@@ -126,7 +126,9 @@
 		inode->i_blocks = 0;
 		inode->i_bytes = 0;
 		inode->i_generation = 0;
+#ifdef CONFIG_QUOTA
 		memset(&inode->i_dquot, 0, sizeof(inode->i_dquot));
+#endif
 		inode->i_pipe = NULL;
 		inode->i_bdev = NULL;
 		inode->i_cdev = NULL;
Signature · 1 line
Matt Mackall : http://www.selenic.com : Linux development and consulting