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>
This commit is contained in:
Nikolay Borisov 2018-12-11 10:31:40 +02:00 committed by Mimi Zohar
parent d7cecb676d
commit eed9de3b4f

View File

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