aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2006-09-27 04:50:49 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 11:26:17 -0400
commit577c4eb09d1034d0739e3135fd2cff50588024be (patch)
tree2eb22d60a62d013f300729ee563d1fe61f544da9
parenteaf796e7ef6014f208c409b2b14fddcfaafe7e3a (diff)
[PATCH] inode-diet: Move i_cdev into a union
Move the i_cdev 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>
-rw-r--r--fs/file_table.c2
-rw-r--r--fs/inode.c2
-rw-r--r--include/linux/fs.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 0131ba06e1ee..bc35a40417d7 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -169,7 +169,7 @@ void fastcall __fput(struct file *file)
169 if (file->f_op && file->f_op->release) 169 if (file->f_op && file->f_op->release)
170 file->f_op->release(inode, file); 170 file->f_op->release(inode, file);
171 security_file_free(file); 171 security_file_free(file);
172 if (unlikely(inode->i_cdev != NULL)) 172 if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL))
173 cdev_put(inode->i_cdev); 173 cdev_put(inode->i_cdev);
174 fops_put(file->f_op); 174 fops_put(file->f_op);
175 if (file->f_mode & FMODE_WRITE) 175 if (file->f_mode & FMODE_WRITE)
diff --git a/fs/inode.c b/fs/inode.c
index 41b462232f7f..f5c04dd9ae8a 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -256,7 +256,7 @@ void clear_inode(struct inode *inode)
256 inode->i_sb->s_op->clear_inode(inode); 256 inode->i_sb->s_op->clear_inode(inode);
257 if (S_ISBLK(inode->i_mode) && inode->i_bdev) 257 if (S_ISBLK(inode->i_mode) && inode->i_bdev)
258 bd_forget(inode); 258 bd_forget(inode);
259 if (inode->i_cdev) 259 if (S_ISCHR(inode->i_mode) && inode->i_cdev)
260 cd_forget(inode); 260 cd_forget(inode);
261 inode->i_state = I_CLEAR; 261 inode->i_state = I_CLEAR;
262} 262}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 98ff684a5b1c..192e69bb55b5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -532,8 +532,8 @@ struct inode {
532 union { 532 union {
533 struct pipe_inode_info *i_pipe; 533 struct pipe_inode_info *i_pipe;
534 struct block_device *i_bdev; 534 struct block_device *i_bdev;
535 struct cdev *i_cdev;
535 }; 536 };
536 struct cdev *i_cdev;
537 int i_cindex; 537 int i_cindex;
538 538
539 __u32 i_generation; 539 __u32 i_generation;