+ inode-diet-move-i_cindex-from-struct-inode-to-struct-file.patch added to -mm tree

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

 



The patch titled

     inode-diet: Move i_cindex from struct inode to struct file

has been added to the -mm tree.  Its filename is

     inode-diet-move-i_cindex-from-struct-inode-to-struct-file.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: inode-diet: Move i_cindex from struct inode to struct file
From: "Theodore Ts'o" <tytso@xxxxxxx>

inode.i_cindex isn't initialized until the character device is opened anyway,
and there are far more struct inodes in memory than there are struct file.  So
move the cindex field to file.f_cindex, and change the one(!) user of cindex
to use file pointer, which is in fact simpler.

Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ieee1394/ieee1394_core.h |    2 +-
 fs/char_dev.c                    |    2 +-
 include/linux/fs.h               |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/ieee1394/ieee1394_core.h~inode-diet-move-i_cindex-from-struct-inode-to-struct-file drivers/ieee1394/ieee1394_core.h
--- a/drivers/ieee1394/ieee1394_core.h~inode-diet-move-i_cindex-from-struct-inode-to-struct-file
+++ a/drivers/ieee1394/ieee1394_core.h
@@ -218,7 +218,7 @@ void hpsb_packet_received(struct hpsb_ho
 /* return the index (within a minor number block) of a file */
 static inline unsigned char ieee1394_file_to_instance(struct file *file)
 {
-	return file->f_dentry->d_inode->i_cindex;
+	return file->f_cindex;
 }
 
 extern int hpsb_disable_irm;
diff -puN fs/char_dev.c~inode-diet-move-i_cindex-from-struct-inode-to-struct-file fs/char_dev.c
--- a/fs/char_dev.c~inode-diet-move-i_cindex-from-struct-inode-to-struct-file
+++ a/fs/char_dev.c
@@ -288,7 +288,7 @@ int chrdev_open(struct inode * inode, st
 		p = inode->i_cdev;
 		if (!p) {
 			inode->i_cdev = p = new;
-			inode->i_cindex = idx;
+			filp->f_cindex = idx;
 			list_add(&inode->i_devices, &p->list);
 			new = NULL;
 		} else if (!cdev_get(p))
diff -puN include/linux/fs.h~inode-diet-move-i_cindex-from-struct-inode-to-struct-file include/linux/fs.h
--- a/include/linux/fs.h~inode-diet-move-i_cindex-from-struct-inode-to-struct-file
+++ a/include/linux/fs.h
@@ -528,7 +528,6 @@ struct inode {
 		struct block_device	*i_bdev;
 		struct cdev		*i_cdev;
 	};
-	int			i_cindex;
 
 	__u32			i_generation;
 
@@ -693,6 +692,7 @@ struct file {
 	spinlock_t		f_ep_lock;
 #endif /* #ifdef CONFIG_EPOLL */
 	struct address_space	*f_mapping;
+	int			f_cindex;
 };
 extern spinlock_t files_lock;
 #define file_list_lock() spin_lock(&files_lock);
_

Patches currently in -mm which might be from tytso@xxxxxxx are

origin.patch
uml-build-fix.patch
inode_diet-replace-inodeugeneric_ip-with-inodei_private.patch
inode-diet-move-i_pipe-into-a-union.patch
inode-diet-move-i_bdev-into-a-union.patch
inode-diet-move-i_cdev-into-a-union.patch
inode-diet-eliminate-i_blksize-and-use-a-per-superblock-default.patch
inode-diet-move-i_cindex-from-struct-inode-to-struct-file.patch
inode-diet-use-a-union-for-i_blocks-and-i_size-i_rdev-and-i_devices.patch
inode-diet-fix-size-of-i_blkbits-i_version-and-i_dnotify_mask.patch
inode-diet-move-i_pipe-into-a-union-ecryptfs.patch
inode-diet-eliminate-i_blksize-and-use-a-per-superblock-default-ecryptfs.patch
inode_diet-replace-inodeugeneric_ip-with-inodei_private-reiser4.patch
inode-diet-eliminate-i_blksize-and-use-a-per-superblock-default-reiser4.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux