diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-12-11 10:31:40 +0200 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2018-12-12 22:09:34 -0500 |
commit | eed9de3b4f47114f440980203ca27c5fab70f529 (patch) | |
tree | 80b078e0aeeec624951292e6eefa6361948c11b1 /security/integrity | |
parent | d7cecb676dd364b28a5a8f5e4a30ce2e9cfdfcc3 (diff) |
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/integrity')
-rw-r--r-- | security/integrity/ima/ima_main.c | 2 |
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; } |