diff options
Diffstat (limited to 'fs/file_table.c')
-rw-r--r-- | fs/file_table.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index 69652c5bd5f0..32d12b78bac8 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -253,6 +253,7 @@ void __fput(struct file *file) | |||
253 | if (file->f_op && file->f_op->release) | 253 | if (file->f_op && file->f_op->release) |
254 | file->f_op->release(inode, file); | 254 | file->f_op->release(inode, file); |
255 | security_file_free(file); | 255 | security_file_free(file); |
256 | ima_file_free(file); | ||
256 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) | 257 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) |
257 | cdev_put(inode->i_cdev); | 258 | cdev_put(inode->i_cdev); |
258 | fops_put(file->f_op); | 259 | fops_put(file->f_op); |
@@ -392,7 +393,9 @@ retry: | |||
392 | continue; | 393 | continue; |
393 | if (!(f->f_mode & FMODE_WRITE)) | 394 | if (!(f->f_mode & FMODE_WRITE)) |
394 | continue; | 395 | continue; |
396 | spin_lock(&f->f_lock); | ||
395 | f->f_mode &= ~FMODE_WRITE; | 397 | f->f_mode &= ~FMODE_WRITE; |
398 | spin_unlock(&f->f_lock); | ||
396 | if (file_check_writeable(f) != 0) | 399 | if (file_check_writeable(f) != 0) |
397 | continue; | 400 | continue; |
398 | file_release_write(f); | 401 | file_release_write(f); |