]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] inode-diet: Move i_bdev into a union
authorTheodore Ts'o <tytso@mit.edu>
Wed, 27 Sep 2006 08:50:48 +0000 (01:50 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Sep 2006 15:26:17 +0000 (08:26 -0700)
Move the i_bdev pointer in struct inode into a union.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/inode.c
include/linux/fs.h

index 77e2547920252177b477aae97d1d3a9cbb6ce2a1..41b462232f7f39638f033b52ce2f23f385f607db 100644 (file)
@@ -254,7 +254,7 @@ void clear_inode(struct inode *inode)
        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);
index ca695fc8d69cb3ab21b893764c6c7c6edcfc9239..98ff684a5b1cdaf4c67d177492d21c5a1e142b38 100644 (file)
@@ -531,8 +531,8 @@ struct inode {
        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;