From: Theodore Ts'o Date: Wed, 27 Sep 2006 08:50:48 +0000 (-0700) Subject: [PATCH] inode-diet: Move i_bdev into a union X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eaf796e7ef6014f208c409b2b14fddcfaafe7e3a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] inode-diet: Move i_bdev into a union Move the i_bdev pointer in struct inode into a union. Signed-off-by: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/inode.c b/fs/inode.c index 77e254792025..41b462232f7f 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -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); diff --git a/include/linux/fs.h b/include/linux/fs.h index ca695fc8d69c..98ff684a5b1c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -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;