Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3501867pxb; Mon, 18 Oct 2021 17:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvA5XaKKD+MFfkYjbSqWWgaYO64QzRtasMdCWVUew9rIj+fRI4dptmdFRA4pi0dapwT5CP X-Received: by 2002:a05:6402:1d49:: with SMTP id dz9mr50262358edb.17.1634601799974; Mon, 18 Oct 2021 17:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634601799; cv=none; d=google.com; s=arc-20160816; b=0v5s+G3EkXiavC/mzAUU2HADtkQJm2k6J+DEOaz4wIPEC/mLoLtqUU56Y3objB4+E/ 5yoDck9sJB/RWfFRiVkCVXzjHoGNA+y87+YuCBTg63tHJNjsYnxZ8elQBFS42ulH0pEC N7BK30OVf3KKo1+lsFF1DTz5144r7HKoBZO4DZRhektguWM5N1AX+kiwplVwtPStvLes MI18UTCo1G7ubGWsf5ggUhhrjHorj2Lcl7zUwAqfvsavln/cDXUaeAuXZQ4MXthis+My uamPcNLMA0tTcUlBByT8+yFaRKZv0dg8twXBGwpYG5/4GmdxjfyqLMqPBtPPlSwuX7fW nvQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kqjYiiAocCsn2vgnBb4Y/MIXhK+FrlSAbUe6ONbQSEA=; b=qdp+oZL/h6QXALYagjnY306Knp0/+rkSGhKLVrs4DVwEmUeEt5fecX50oi9OfQSxKx 5iiImDZ5t0GxYo/vuaHH616UGrmIEpfe5e4nGRwudLjNVGACuJwzaU77GiKN3QxuhasK 8ssVi0ZIPkZ337vcRv6FF2cU+FeoXlhNP0oCH9gOMtJgZru0kZPBcXGyV4wHPtIaRciD eJDTZpahXxvBm0hR/p2uQ9Pd1jjYNewL1s2vF3o3ILEfqDVt1AqKpsX7dZajwdfW0Per CPciZL6PY/gfrVJuDT7NteWZV8W8ieGICWxOEwxZ+HsOcEWYNodTKt9fkOwbehiaVdmo qCdA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s2si37927306edd.68.2021.10.18.17.02.51; Mon, 18 Oct 2021 17:03:19 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbhJSACp (ORCPT + 99 others); Mon, 18 Oct 2021 20:02:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40594 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbhJSACo (ORCPT ); Mon, 18 Oct 2021 20:02:44 -0400 Received: from localhost (unknown [IPv6:2804:14c:124:8a08::1007]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: krisman) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id B204F1F41A9C; Tue, 19 Oct 2021 01:00:30 +0100 (BST) From: Gabriel Krisman Bertazi To: jack@suse.com, amir73il@gmail.com Cc: djwong@kernel.org, tytso@mit.edu, david@fromorbit.com, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-api@vger.kernel.org, kernel@collabora.com, Jan Kara , Gabriel Krisman Bertazi Subject: [PATCH v8 01/32] fsnotify: pass data_type to fsnotify_name() Date: Mon, 18 Oct 2021 20:59:44 -0300 Message-Id: <20211019000015.1666608-2-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019000015.1666608-1-krisman@collabora.com> References: <20211019000015.1666608-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Amir Goldstein Align the arguments of fsnotify_name() to those of fsnotify(). Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Gabriel Krisman Bertazi --- 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