summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-12-11 10:31:40 +0200
committerMimi Zohar <zohar@linux.ibm.com>2018-12-12 22:09:34 -0500
commiteed9de3b4f47114f440980203ca27c5fab70f529 (patch)
tree80b078e0aeeec624951292e6eefa6361948c11b1 /security
parentd7cecb676dd364b28a5a8f5e4a30ce2e9cfdfcc3 (diff)
downloadlinux-stable-eed9de3b4f47114f440980203ca27c5fab70f529.tar.gz
linux-stable-eed9de3b4f47114f440980203ca27c5fab70f529.tar.bz2
linux-stable-eed9de3b4f47114f440980203ca27c5fab70f529.zip
ima: Use inode_is_open_for_write
Use the aptly named function rather than open coding the check. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index df0b2ee49fa2..bd9bd5f88206 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -103,7 +103,7 @@ static void ima_rdwr_violation_check(struct file *file,
} else {
if (must_measure)
set_bit(IMA_MUST_MEASURE, &iint->atomic_flags);
- if ((atomic_read(&inode->i_writecount) > 0) && must_measure)
+ if (inode_is_open_for_write(inode) && must_measure)
send_writers = true;
}