aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/file_table.c2
-rw-r--r--fs/inode.c2
2 files changed, 2 insertions, 2 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}