Browse Source

ima: new helper: file_inode(file)

Replace "file->f_dentry->d_inode" with the new file_inode() helper
function.

Signed-off-by: Libo Chen <clbchenlibo.chen@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Libo Chen 11 years ago
parent
commit
31d4b76189
1 changed files with 1 additions and 1 deletions
  1. 1 1
      security/integrity/ima/ima_api.c

+ 1 - 1
security/integrity/ima/ima_api.c

@@ -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;