]> Git Repo - linux.git/commitdiff
ima: Use inode_is_open_for_write
authorNikolay Borisov <[email protected]>
Tue, 11 Dec 2018 08:31:40 +0000 (10:31 +0200)
committerMimi Zohar <[email protected]>
Thu, 13 Dec 2018 03:09:34 +0000 (22:09 -0500)
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]>
security/integrity/ima/ima_main.c

index df0b2ee49fa2517853b1fd1de7ab06fe91627e41..bd9bd5f882062056475cd7a707f089a4a25076ba 100644 (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;
        }
 
This page took 0.05856 seconds and 4 git commands to generate.