On Tue, 2018-12-11 at 10:31 +0200, Nikolay Borisov wrote: > Use the aptly named function rather than open coding the check. No > functional changes. > > Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx> Thanks. This patch is now in the #next-integrity branch. Mimi > --- > security/integrity/ima/ima_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c > index 1b88d58e1325..05fbf8a2fa42 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; > } >