From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:53679 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758768AbdADJ2q (ORCPT ); Wed, 4 Jan 2017 04:28:46 -0500 Date: Wed, 4 Jan 2017 10:28:43 +0100 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , linux-fsdevel , Lino Sanfilippo , Miklos Szeredi , Paul Moore Subject: Re: [PATCH 18/22] fsnotify: Inline fsnotify_clear_{inode|vfsmount|_mark_group() Message-ID: <20170104092843.GL3780@quack2.suse.cz> References: <20161222091538.28702-1-jack@suse.cz> <20161222091538.28702-19-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon 26-12-16 18:57:38, Amir Goldstein wrote: > On Thu, Dec 22, 2016 at 11:15 AM, Jan Kara wrote: > > Inline these helpers as they are very thin. We still keep them as we > > don't want to expose details about how list type is determined. > > > > Signed-off-by: Jan Kara > > This patch looks good, but see comment below about suggested extra cleanup. > > Reviewed-by: Amir Goldstein Thanks. > > +/* run all the marks in a group, and clear all of the vfsmount marks */ > > +static inline void fsnotify_clear_vfsmount_marks_by_group(struct fsnotify_group *group) > > +{ > > + fsnotify_clear_marks_by_group_flags(group, FSNOTIFY_LIST_TYPE_VFSMOUNT); > > Suggestion for extra cleanup while at it: > IMO, the choice of name fsnotify_clear_marks_by_group_flags() was a > bad choice, because > 1. it sounds like "by group->flags" and its not > 2. it is presented as a generic helper, but it is never likely to be > used by anything other then > those 2 call sites for FAN_MARK_FLUSH api > > So given the above, I think it would make more sense to name the function > fsnotify_clear_marks_by_group_and_type() for what it really is. I agree on the bad choice of the name. I will probably add another cleanup patch that will just name the function fsnotify_clear_marks_by_group() and cleanup comments about that function in several places. Honza -- Jan Kara SUSE Labs, CR