Commit 31d4b761 authored by Libo Chen's avatar Libo Chen Committed by Mimi Zohar

ima: new helper: file_inode(file)

Replace "file->f_dentry->d_inode" with the new file_inode() helper
function.
Signed-off-by: default avatarLibo Chen <clbchenlibo.chen@huawei.com>
Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
parent 864f32a5
...@@ -132,7 +132,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename, ...@@ -132,7 +132,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
const char *op, const char *cause) const char *op, const char *cause)
{ {
struct ima_template_entry *entry; struct ima_template_entry *entry;
struct inode *inode = file->f_dentry->d_inode; struct inode *inode = file_inode(file);
int violation = 1; int violation = 1;
int result; int result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment