[patch 3/8] inode-diet: Move i_bdev into a union
From: Theodore Ts'o
Date: Sun Jul 02 2006 - 20:59:45 EST
Move the i_bdev pointer in struct inode into a union.
Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
Index: linux-2.6.17-mm5/include/linux/fs.h
===================================================================
--- linux-2.6.17-mm5.orig/include/linux/fs.h 2006-07-02 20:28:45.000000000 -0400
+++ linux-2.6.17-mm5/include/linux/fs.h 2006-07-02 20:28:55.000000000 -0400
@@ -526,8 +526,8 @@
struct list_head i_devices;
union {
struct pipe_inode_info *i_pipe;
+ struct block_device *i_bdev;
};
- struct block_device *i_bdev;
struct cdev *i_cdev;
int i_cindex;
Index: linux-2.6.17-mm5/fs/inode.c
===================================================================
--- linux-2.6.17-mm5.orig/fs/inode.c 2006-07-02 20:27:00.000000000 -0400
+++ linux-2.6.17-mm5/fs/inode.c 2006-07-02 20:28:55.000000000 -0400
@@ -254,7 +254,7 @@
DQUOT_DROP(inode);
if (inode->i_sb && inode->i_sb->s_op->clear_inode)
inode->i_sb->s_op->clear_inode(inode);
- if (inode->i_bdev)
+ if (S_ISBLK(inode->i_mode) && inode->i_bdev)
bd_forget(inode);
if (inode->i_cdev)
cd_forget(inode);
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/