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 bbeeac6efa1a..b74a8e1da913 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | #include <linux/security.h> | 15 | #include <linux/security.h> |
16 | #include <linux/ima.h> | ||
16 | #include <linux/eventpoll.h> | 17 | #include <linux/eventpoll.h> |
17 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
18 | #include <linux/mount.h> | 19 | #include <linux/mount.h> |
@@ -127,6 +128,7 @@ struct file *get_empty_filp(void) | |||
127 | atomic_long_set(&f->f_count, 1); | 128 | atomic_long_set(&f->f_count, 1); |
128 | rwlock_init(&f->f_owner.lock); | 129 | rwlock_init(&f->f_owner.lock); |
129 | f->f_cred = get_cred(cred); | 130 | f->f_cred = get_cred(cred); |
131 | spin_lock_init(&f->f_lock); | ||
130 | eventpoll_init_file(f); | 132 | eventpoll_init_file(f); |
131 | /* f->f_version: 0 */ | 133 | /* f->f_version: 0 */ |
132 | return f; | 134 | return f; |
@@ -279,6 +281,7 @@ void __fput(struct file *file) | |||
279 | if (file->f_op && file->f_op->release) | 281 | if (file->f_op && file->f_op->release) |
280 | file->f_op->release(inode, file); | 282 | file->f_op->release(inode, file); |
281 | security_file_free(file); | 283 | security_file_free(file); |
284 | ima_file_free(file); | ||
282 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) | 285 | if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL)) |
283 | cdev_put(inode->i_cdev); | 286 | cdev_put(inode->i_cdev); |
284 | fops_put(file->f_op); | 287 | fops_put(file->f_op); |