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 <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
This commit is contained in:
Nikolay Borisov 2018-12-11 10:31:40 +02:00 • committed by Mimi Zohar
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;
}