diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-02-07 03:07:29 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-02-07 03:07:29 -0500 |
commit | 89068c576bf324ef6fbd50dfc745148f7def202c (patch) | |
tree | 6c19f0e1fa2e0bdd732fb91924a9e9c3efb2784b | |
parent | 1e93d0052d9a6b3d0b382eedceb18b519d603baf (diff) |
Take ima_file_free() to proper place.
Hooks: Just Say No.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/file_table.c | 1 | ||||
-rw-r--r-- | security/security.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index 69652c5bd5f0..b98404b54383 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); |
diff --git a/security/security.c b/security/security.c index 24e060be9fa5..122b748d0f4c 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -666,8 +666,6 @@ int security_file_alloc(struct file *file) | |||
666 | void security_file_free(struct file *file) | 666 | void security_file_free(struct file *file) |
667 | { | 667 | { |
668 | security_ops->file_free_security(file); | 668 | security_ops->file_free_security(file); |
669 | if (file->f_dentry) | ||
670 | ima_file_free(file); | ||
671 | } | 669 | } |
672 | 670 | ||
673 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 671 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |