diff options
Diffstat (limited to 'fs/file_table.c')
-rw-r--r-- | fs/file_table.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index bfab973c6c5b..01e4c1e8e6b6 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -247,8 +247,10 @@ static void __fput(struct file *file) | |||
247 | file->f_op->release(inode, file); | 247 | file->f_op->release(inode, file); |
248 | security_file_free(file); | 248 | security_file_free(file); |
249 | ima_file_free(file); | 249 | ima_file_free(file); |
250 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) | 250 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL && |
251 | !(file->f_mode & FMODE_PATH))) { | ||
251 | cdev_put(inode->i_cdev); | 252 | cdev_put(inode->i_cdev); |
253 | } | ||
252 | fops_put(file->f_op); | 254 | fops_put(file->f_op); |
253 | put_pid(file->f_owner.pid); | 255 | put_pid(file->f_owner.pid); |
254 | file_sb_list_del(file); | 256 | file_sb_list_del(file); |