提交 eaf796e7 编写于 作者: T Theodore Ts'o 提交者: Linus Torvalds

[PATCH] inode-diet: Move i_bdev into a union

Move the i_bdev pointer in struct inode into a union.
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 4c154168
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册