From nobody Tue Dec 23 14:11:29 2025 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 6C454FC03; Fri, 2 Feb 2024 02:30:06 +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=1706841006; cv=none; b=apPK8tNkUTFn+ICTl4gXOkjFXfJNDPBA17RsFX30gMUrk/5jKaMQFZ+Nw4Tz99cWUKTHUFB80MyGkNeokNkFQ2COnGk8tNe6NAfq+Ob2Xyxm4T2VyT/RQ++TAOx2uOCjclRhk49p5GZ/VYQbTpf0GP+IE2jFjnAcj2tFHFZQhu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706841006; c=relaxed/simple; bh=c2ljJPiZws6OX2OlljjxZ50rg8MQ1U9fnX0GsF88OI4=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Lt1aCBWheqeqzt3jbeEgLJS+OrkpfEGhiIEWzinPgR4w3Mbz36QIYeIR7y2ZnJ2DZLJ9VkRmxQqL8Iv9vsOwveYa6PAAnLyNTCd3fbUzBa6wnaIeFrqxgRK31go6MSpsiiytNvmSjQvGvPBVSLUZASWvGgavxJFgLasMutP7BFc= 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 DAC6CC43142; Fri, 2 Feb 2024 02:30:05 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rVjJv-00000005kBZ-45i4; Thu, 01 Feb 2024 21:30:23 -0500 Message-ID: <20240202023023.834732790@goodmis.org> User-Agent: quilt/0.67 Date: Thu, 01 Feb 2024 21:30:11 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , stable@vger.kernel.org, Linus Torvalds , Christian Brauner , Al Viro , Ajay Kaher , Al Viro Subject: [for-linus][PATCH 12/13] eventfs: Remove fsnotify*() functions from lookup() References: <20240202022959.515961549@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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@Z= enIV/ Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.166973329@g= oodmis.org Cc: stable@vger.kernel.org Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Fixes: a376007917776 ("eventfs: Implement functions to create files and dir= s 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 =3D get_ei(parent_ei); =20 d_add(dentry, inode); - fsnotify_create(dentry->d_parent->d_inode, dentry); return NULL; }; =20 @@ -408,7 +407,6 @@ static struct dentry *lookup_dir_entry(struct dentry *d= entry, inc_nlink(inode); d_add(dentry, inode); inc_nlink(dentry->d_parent->d_inode); - fsnotify_mkdir(dentry->d_parent->d_inode, dentry); return NULL; } =20 --=20 2.43.0