Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp503081pxb; Mon, 25 Oct 2021 12:33:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH0pd4HQNEhIXa3ZL4NZcZJYQNHLnYm9CHyX4JhtzR3FHGhflE80t8emaCK1iAYKxxfs+U X-Received: by 2002:a17:90a:191a:: with SMTP id 26mr38232321pjg.118.1635190400529; Mon, 25 Oct 2021 12:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635190400; cv=none; d=google.com; s=arc-20160816; b=JdLUdn578qzf443NfWAdstOLedHfkwz51KRZcmdpWtHTCIrRjKLl9iXiOf6hXOh2Zi F2URXoGNqUSwLeV1w6vP7SoYq4SiVTmEIPqj6lA4rywFAq5WezWDZFNQfI6HSM7UCyaC o9B+/K2vFiAuLlT++6am6xc1gUqe/K32ZDlcSKPKEu3M1frnRTgfs2iMJ7qu67d7jrQ1 itTJALQHtGEvY5ZHNpcf9QcdjGiW3lSPfDQg9p4g8FKQC/r0femwRBecuBatcn0TrEUB w0SVEYAM5SQy7cK9BQn5MCGlslm2OhWjpOL8Z28nF2Sh9SxOYyTJnyNJiVHf2TsFk6IP KGNw== 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=SMwKBJMKsbE9u87hIuAJJp9YmHTbZcrLnyaeFCwgYTIqR2RUkqmSWckly4wJwAVKae e9lamOeHVn0NPZ+bggfYj9b49ZXX3ZiobA62VUpxWwudw12FE99Ug9Z/dMMPtE4Qsfx+ CymgvLIbBLsaD6lMAvXenBW3ZWVVIw7KUyyWw0NvkW9egpKofXl9im0e7nZCZxAcaEpy x0LYbJ+WKzTXLSJoniYlwInNURk8Fz55Nqy0p3FTScL2yOAfvMePGpICNkozR30dW2YY yptN51Mmyk8fx45kbzBByNaJ+oX0tFFgZsWgi5VGdsbO38SebVeRuqrn0juUhxaQD7Px Zmsg== 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 k16si24260151pls.8.2021.10.25.12.32.49; Mon, 25 Oct 2021 12:33:20 -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 S235735AbhJYTcc (ORCPT + 99 others); Mon, 25 Oct 2021 15:32:32 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58190 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235905AbhJYTa1 (ORCPT ); Mon, 25 Oct 2021 15:30:27 -0400 Received: from localhost (unknown [IPv6:2804:14c:124:8a08::1002]) (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 BE0D41F430A9; Mon, 25 Oct 2021 20:28:02 +0100 (BST) From: Gabriel Krisman Bertazi To: amir73il@gmail.com, jack@suse.com Cc: djwong@kernel.org, tytso@mit.edu, david@fromorbit.com, dhowells@redhat.com, khazhy@google.com, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, kernel@collabora.com, Jan Kara , Gabriel Krisman Bertazi Subject: [PATCH v9 01/31] fsnotify: pass data_type to fsnotify_name() Date: Mon, 25 Oct 2021 16:27:16 -0300 Message-Id: <20211025192746.66445-2-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211025192746.66445-1-krisman@collabora.com> References: <20211025192746.66445-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