Skip to content

Commit 89068c5

Browse files
author
Al Viro
committed
Take ima_file_free() to proper place.
Hooks: Just Say No. Signed-off-by: Al Viro <[email protected]>
1 parent 1e93d00 commit 89068c5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

fs/file_table.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ void __fput(struct file *file)
253253
if (file->f_op && file->f_op->release)
254254
file->f_op->release(inode, file);
255255
security_file_free(file);
256+
ima_file_free(file);
256257
if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL))
257258
cdev_put(inode->i_cdev);
258259
fops_put(file->f_op);

security/security.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,6 @@ int security_file_alloc(struct file *file)
666666
void security_file_free(struct file *file)
667667
{
668668
security_ops->file_free_security(file);
669-
if (file->f_dentry)
670-
ima_file_free(file);
671669
}
672670

673671
int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)

0 commit comments

Comments
 (0)