From patchwork Thu Feb 1 15:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 13541368 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6F29160895; Thu, 1 Feb 2024 16:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804160; cv=none; b=S0JyU8S9o6z6tPLawayfje7KS9T8ZDoEekuyrq1mlON/7bmTUdT59N7Xvda+IkbcMFaq0H3UwbbzWRwZm1pQxRRrP6GShoDLEQnUqMYeqdf9k/Uc6qx+ZVBlKsN8rpcRIoQmDftff2xOZhkBE5v1IaQz935c2Ed1VZtyWQ4mm0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804160; c=relaxed/simple; bh=lNtIhhFDOlXg3opQxPWZoYHwa0F4HyqlbB3ETO/rgP4=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=aBEJMUw4SW44XD7MVs2b6xj4GJUq4mL+NiGGs6jimyT1mJBEXwTLCNmwj2jm+SbbqX4wuBXbY4mWAiF2jENI2l5ekdKYenxSck7bwCTNQpwGqZcQEYtupiwKF5FcuGWWbt51y4LvXNTqpWkg7Xtz8IGBHzC9J34/kq5M3HvnhHs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B97EC43390; Thu, 1 Feb 2024 16:16:00 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rVZjd-00000005Tji-1JJ6; Thu, 01 Feb 2024 11:16:17 -0500 Message-ID: <20240201161617.166973329@goodmis.org> User-Agent: quilt/0.67 Date: Thu, 01 Feb 2024 10:34:49 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Linus Torvalds , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Christian Brauner , Al Viro , Ajay Kaher , stable@vger.kernel.org, Al Viro Subject: [PATCH 3/6] eventfs: Remove fsnotify*() functions from lookup() References: <20240201153446.138990674@goodmis.org> Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: "Steven Rostedt (Google)" The dentries and inodes are created when referenced in the lookup code. There's no reason to call fsnotify_*() functions when they are created by a reference. It doesn't make any sense. Link: https://lore.kernel.org/linux-trace-kernel/20240201002719.GS2087318@ZenIV/ Cc: stable@vger.kernel.org Fixes: a376007917776 ("eventfs: Implement functions to create files and dirs when accessed"); Suggested-by: Al Viro Signed-off-by: Steven Rostedt (Google) --- fs/tracefs/event_inode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index ca7daee7c811..9e031e5a2713 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -366,7 +366,6 @@ static struct dentry *lookup_file(struct eventfs_inode *parent_ei, dentry->d_fsdata = get_ei(parent_ei); d_add(dentry, inode); - fsnotify_create(dentry->d_parent->d_inode, dentry); return NULL; }; @@ -408,7 +407,6 @@ static struct dentry *lookup_dir_entry(struct dentry *dentry, inc_nlink(inode); d_add(dentry, inode); inc_nlink(dentry->d_parent->d_inode); - fsnotify_mkdir(dentry->d_parent->d_inode, dentry); return NULL; }