Return-Path: Received: from mx2.suse.de ([195.135.220.15]:49800 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726132AbeLKJ45 (ORCPT ); Tue, 11 Dec 2018 04:56:57 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 42645AD3F for ; Tue, 11 Dec 2018 09:56:56 +0000 (UTC) Date: Tue, 11 Dec 2018 10:56:55 +0100 From: Jan Kara To: Nikolay Borisov Cc: jack@suse.cz, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fanotify: Use inode_is_open_for_write Message-ID: <20181211095655.GA19614@quack2.suse.cz> References: <20181211082723.20302-1-nborisov@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181211082723.20302-1-nborisov@suse.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 11-12-18 10:27:23, Nikolay Borisov wrote: > Use the aptly named function rather than opencoding i_writecount check. > No functional changes. > > Reviewed-by: Jan Kara > Signed-off-by: Nikolay Borisov Thanks! Added to my tree. Honza > --- > fs/notify/fanotify/fanotify_user.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c > index e03be5071362..98b0769e4cf2 100644 > --- a/fs/notify/fanotify/fanotify_user.c > +++ b/fs/notify/fanotify/fanotify_user.c > @@ -669,7 +669,7 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group, > */ > if ((flags & FAN_MARK_IGNORED_MASK) && > !(flags & FAN_MARK_IGNORED_SURV_MODIFY) && > - (atomic_read(&inode->i_writecount) > 0)) > + inode_is_open_for_write(inode)) > return 0; > > return fanotify_add_mark(group, &inode->i_fsnotify_marks, > -- > 2.17.1 > -- Jan Kara SUSE Labs, CR