ima: new helper: file_inode(file)
authorLibo Chen <clbchenlibo.chen@huawei.com>
Wed, 11 Dec 2013 06:11:28 +0000 (14:11 +0800)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 4 Mar 2014 21:53:03 +0000 (16:53 -0500)
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>
security/integrity/ima/ima_api.c

index c38bbce..6d76d4a 100644 (file)
@@ -132,7 +132,7 @@ void ima_add_violation(struct file *file, const unsigned char *filename,
                       const char *op, const char *cause)
 {
        struct ima_template_entry *entry;
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file_inode(file);
        int violation = 1;
        int result;