summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-02-07 03:07:29 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-02-07 03:07:29 -0500
commit89068c576bf324ef6fbd50dfc745148f7def202c (patch)
tree6c19f0e1fa2e0bdd732fb91924a9e9c3efb2784b
parent1e93d0052d9a6b3d0b382eedceb18b519d603baf (diff)
downloadop-kernel-dev-89068c576bf324ef6fbd50dfc745148f7def202c.zip
op-kernel-dev-89068c576bf324ef6fbd50dfc745148f7def202c.tar.gz
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.c1
-rw-r--r--security/security.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 69652c5..b98404b 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -253,6 +253,7 @@ void __fput(struct file *file)
if (file->f_op && file->f_op->release)
file->f_op->release(inode, file);
security_file_free(file);
+ ima_file_free(file);
if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL))
cdev_put(inode->i_cdev);
fops_put(file->f_op);
diff --git a/security/security.c b/security/security.c
index 24e060b..122b748 100644
--- a/security/security.c
+++ b/security/security.c
@@ -666,8 +666,6 @@ int security_file_alloc(struct file *file)
void security_file_free(struct file *file)
{
security_ops->file_free_security(file);
- if (file->f_dentry)
- ima_file_free(file);
}
int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
OpenPOWER on IntegriCloud