Skip to content

Commit

Permalink
[PATCH] inode-diet: Move i_bdev into a union
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Theodore Ts'o authored and Linus Torvalds committed Sep 27, 2006
1 parent 4c15416 commit eaf796e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit eaf796e

Please sign in to comment.