summaryrefslogtreecommitdiffstats
path: root/fs/file_table.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2006-09-27 10:50:49 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 17:26:17 +0200
commit577c4eb09d1034d0739e3135fd2cff50588024be (patch)
tree2eb22d60a62d013f300729ee563d1fe61f544da9 /fs/file_table.c
parent[PATCH] inode-diet: Move i_bdev into a union (diff)
downloadlinux-577c4eb09d1034d0739e3135fd2cff50588024be.tar.xz
linux-577c4eb09d1034d0739e3135fd2cff50588024be.zip
[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>
Diffstat (limited to 'fs/file_table.c')
-rw-r--r--fs/file_table.c2
1 files changed, 1 insertions, 1 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)
if (file->f_op && file->f_op->release)
file->f_op->release(inode, file);
security_file_free(file);
- if (unlikely(inode->i_cdev != NULL))
+ if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL))
cdev_put(inode->i_cdev);
fops_put(file->f_op);
if (file->f_mode & FMODE_WRITE)