Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp402616pxb; Fri, 15 Oct 2021 07:50:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw67ianglbQ7mwJhwwxMsoiAf1A/iIQOAg1NvdGJoX4IGFuINevwJlTVl/WccVIhlCjn7dz X-Received: by 2002:a17:90a:4:: with SMTP id 4mr13777598pja.221.1634309446888; Fri, 15 Oct 2021 07:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634309446; cv=none; d=google.com; s=arc-20160816; b=rU6gxzhf0nKvAx5ntW2OMNpwanzLsw+E0YiRuNkacsy0jhrk14BDR1DKWOMWihJThM qFS/YOu5x5gLdxtw7SU0KYuL46rP3Cqh61WBArPo7+l+NwY5rNSYXfEhlN7LZm2C3NAb 3sN5KnEBEKhPxDGzcDZCpOtgz21ljjnvhaoUgK+GAw/wx7D4s7/G+hkdYa+OqBoc1YZ3 4Q9sXFTbZkqeWUwKyqFGp1byRmAFm551gv281VWWy+IR35p2VSEzCjSucfcFF9AlKz0X RO2bAB3oQ7waSfsPAl87yUg8amzh+yH1QHtEk51IVgn9nJ0Ybg7nQfW7HRyvHyEwIHho gNhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=jkqjzEwNHSECoBlQtoTSwpYhMOm5xCv5JA0JJwmOt+4=; b=E4pe7lOfwFvP6w30IiSZsjxFOiPv1MDL7LknxrlvY2PGrUsH4A7v2WUyphtkfGEfUA tOBk+WZejEahYMZF6YFtUx0maozFxoWk0HtCOKNjfFSzfJnrXMSf4HuLSLOPqOO63kMU omTS3/1u/SNHunvqDwqcZcHsqqEeYE/URUZhbVSWGOqIecr1ql0FOBC2y3EE/we/J0x7 ebr/FFz8CuXxGBazeo88fqCxqxccfVBq2un6Knzse7kD5KIJte8LNXQUnflNrK3anU97 nhBaYdjxzCqg3HA5ebrwqHUxeG9ebaRIpoSQwtk8T3XeB6YXvLXAVsZphj5zmihyiHLT INtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OI4UzSsv; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si8382390pfq.125.2021.10.15.07.50.32; Fri, 15 Oct 2021 07:50:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OI4UzSsv; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237233AbhJOJUm (ORCPT + 99 others); Fri, 15 Oct 2021 05:20:42 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:58012 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236454AbhJOJUm (ORCPT ); Fri, 15 Oct 2021 05:20:42 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D17221F770; Fri, 15 Oct 2021 09:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634289514; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jkqjzEwNHSECoBlQtoTSwpYhMOm5xCv5JA0JJwmOt+4=; b=OI4UzSsvSjSmzyeQjJG1a63SVjVuRDWggn21yfu6Svsv+kl1zXLOBs0ni+mStWHTkecTYO dTt5XVm1fgUucLT2Lm5sHVB7l0fhPZ464+FqOa50ZqOhsvfXWBzbq+W5r68l/rYAL8scfs 21R6WykG02lCiuijuZg8ic65Z4SRI08= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634289514; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jkqjzEwNHSECoBlQtoTSwpYhMOm5xCv5JA0JJwmOt+4=; b=poWKAGXgSuT4jetl0EiizaHCY4q9eF7RzDWUIhl6ge7GnjftG2SBDHU3YGlNDNSPWR5k6s IH26HWwmbjY0sHDw== Received: from quack2.suse.cz (unknown [10.100.200.198]) by relay2.suse.de (Postfix) with ESMTP id C1949A3B84; Fri, 15 Oct 2021 09:18:34 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id A40E91E0A40; Fri, 15 Oct 2021 11:18:34 +0200 (CEST) Date: Fri, 15 Oct 2021 11:18:34 +0200 From: Jan Kara To: Gabriel Krisman Bertazi Cc: jack@suse.com, amir73il@gmail.com, djwong@kernel.org, tytso@mit.edu, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, repnop@google.com, kernel@collabora.com Subject: Re: [PATCH v7 01/28] fsnotify: pass data_type to fsnotify_name() Message-ID: <20211015091834.GB23102@quack2.suse.cz> References: <20211014213646.1139469-1-krisman@collabora.com> <20211014213646.1139469-2-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211014213646.1139469-2-krisman@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 14-10-21 18:36:19, Gabriel Krisman Bertazi wrote: > From: Amir Goldstein > > Align the arguments of fsnotify_name() to those of fsnotify(). > > Signed-off-by: Amir Goldstein > Signed-off-by: Gabriel Krisman Bertazi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > include/linux/fsnotify.h | 22 +++++++++++++--------- > 1 file changed, 13 insertions(+), 9 deletions(-) > > diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h > index 12d3a7d308ab..d1144d7c3536 100644 > --- a/include/linux/fsnotify.h > +++ b/include/linux/fsnotify.h > @@ -26,20 +26,21 @@ > * FS_EVENT_ON_CHILD mask on the parent inode and will not be reported if only > * the child is interested and not the parent. > */ > -static inline void fsnotify_name(struct inode *dir, __u32 mask, > - struct inode *child, > - const struct qstr *name, u32 cookie) > +static inline int fsnotify_name(__u32 mask, const void *data, int data_type, > + struct inode *dir, const struct qstr *name, > + u32 cookie) > { > if (atomic_long_read(&dir->i_sb->s_fsnotify_connectors) == 0) > - return; > + return 0; > > - fsnotify(mask, child, FSNOTIFY_EVENT_INODE, dir, name, NULL, cookie); > + return fsnotify(mask, data, data_type, dir, name, NULL, cookie); > } > > static inline void fsnotify_dirent(struct inode *dir, struct dentry *dentry, > __u32 mask) > { > - fsnotify_name(dir, mask, d_inode(dentry), &dentry->d_name, 0); > + fsnotify_name(mask, d_inode(dentry), FSNOTIFY_EVENT_INODE, > + dir, &dentry->d_name, 0); > } > > static inline void fsnotify_inode(struct inode *inode, __u32 mask) > @@ -154,8 +155,10 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, > new_dir_mask |= FS_ISDIR; > } > > - fsnotify_name(old_dir, old_dir_mask, source, old_name, fs_cookie); > - fsnotify_name(new_dir, new_dir_mask, source, new_name, fs_cookie); > + fsnotify_name(old_dir_mask, source, FSNOTIFY_EVENT_INODE, > + old_dir, old_name, fs_cookie); > + fsnotify_name(new_dir_mask, source, FSNOTIFY_EVENT_INODE, > + new_dir, new_name, fs_cookie); > > if (target) > fsnotify_link_count(target); > @@ -209,7 +212,8 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, > fsnotify_link_count(inode); > audit_inode_child(dir, new_dentry, AUDIT_TYPE_CHILD_CREATE); > > - fsnotify_name(dir, FS_CREATE, inode, &new_dentry->d_name, 0); > + fsnotify_name(FS_CREATE, inode, FSNOTIFY_EVENT_INODE, > + dir, &new_dentry->d_name, 0); > } > > /* > -- > 2.33.0 > -- Jan Kara SUSE Labs, CR