ima: Rename backing_inode to real_inode
Rename the backing_inode variable to real_inode since it gets its value from real_inode(). Suggested-by: Amir Goldstein <amir73il@gmail.com> Co-developed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
38aa3f5ac6
commit
c21632b668
|
@ -208,7 +208,7 @@ static int process_measurement(struct file *file, const struct cred *cred,
|
||||||
u32 secid, char *buf, loff_t size, int mask,
|
u32 secid, char *buf, loff_t size, int mask,
|
||||||
enum ima_hooks func)
|
enum ima_hooks func)
|
||||||
{
|
{
|
||||||
struct inode *backing_inode, *inode = file_inode(file);
|
struct inode *real_inode, *inode = file_inode(file);
|
||||||
struct ima_iint_cache *iint = NULL;
|
struct ima_iint_cache *iint = NULL;
|
||||||
struct ima_template_desc *template_desc = NULL;
|
struct ima_template_desc *template_desc = NULL;
|
||||||
char *pathbuf = NULL;
|
char *pathbuf = NULL;
|
||||||
|
@ -285,14 +285,16 @@ static int process_measurement(struct file *file, const struct cred *cred,
|
||||||
iint->measured_pcrs = 0;
|
iint->measured_pcrs = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Detect and re-evaluate changes made to the backing file. */
|
/*
|
||||||
backing_inode = d_real_inode(file_dentry(file));
|
* On stacked filesystems, detect and re-evaluate file data changes.
|
||||||
if (backing_inode != inode &&
|
*/
|
||||||
|
real_inode = d_real_inode(file_dentry(file));
|
||||||
|
if (real_inode != inode &&
|
||||||
(action & IMA_DO_MASK) && (iint->flags & IMA_DONE_MASK)) {
|
(action & IMA_DO_MASK) && (iint->flags & IMA_DONE_MASK)) {
|
||||||
if (!IS_I_VERSION(backing_inode) ||
|
if (!IS_I_VERSION(real_inode) ||
|
||||||
backing_inode->i_sb->s_dev != iint->real_dev ||
|
real_inode->i_sb->s_dev != iint->real_dev ||
|
||||||
backing_inode->i_ino != iint->real_ino ||
|
real_inode->i_ino != iint->real_ino ||
|
||||||
!inode_eq_iversion(backing_inode, iint->version)) {
|
!inode_eq_iversion(real_inode, iint->version)) {
|
||||||
iint->flags &= ~IMA_DONE_MASK;
|
iint->flags &= ~IMA_DONE_MASK;
|
||||||
iint->measured_pcrs = 0;
|
iint->measured_pcrs = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue