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: 195390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp270148dyb; Thu, 1 Feb 2024 08:20:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGn8/awOEmuGkoNFqaO+lPDIe43nOCxP6S77JAo31J1XVihBTCdBf+6aYY+eVXQAFuKqFCk X-Received: by 2002:a05:6402:34c3:b0:55f:301b:14cd with SMTP id w3-20020a05640234c300b0055f301b14cdmr3307371edc.25.1706804458327; Thu, 01 Feb 2024 08:20:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706804458; cv=pass; d=google.com; s=arc-20160816; b=qzkgVO/W5vINV+pI0S3tF0tpNe+1Gb3NStzPo8ypzxZQli5qoVczIjqeX2QFZtKPlA haG6/LsJGmP8cnI9aMp0HrGMDS1h8WrdG1O20l2BqYZ+otFYALf10XNlwlYZCakvS4xq xpz68ZkGTRFN+vRV9Qvlbhf1UebwoX0zVdOMi+vuYiAPYsr/dKmNMpmLG2/xfQVxZcn1 r0CT2ZXhU4VhrH6v/utyBu2JICQs8vTkNnTtgi2aoXebM/GgO9+A+Not1CWc8O1fmCqt bOKfLXLSeW+yJLN5ukLJ4TIlzosZ9t2+m0SxREd08YjL76n0qhwqVfF8hcm5Xh1e360e x/CA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=KXAqDTnlm0DO1DdjCTEjqXM6jS6xVsGTaBngp6Vll60=; fh=nuYD5cJW25J1JOUSVVd7gStSleJak9e/0Hp0y2oPHcQ=; b=uEa+r3FGd2qaZHVuVyxvtQo2PgwstXUP1q6Y9iB019bosLNf9UXCjQEh3uEqWL0xJc kq92/tSmteRnv1m3va8B0oXgbDsfWirTxhxURtMeB4/XjBRFIMMhEF1jLTZ6euEN+4A4 H9e37inSnfNIr9cGXG5gcGCb3aL9NpfOMibA3auAlWq0l4HEvl9yqt/su/eNBHAB+ZcH KKFvz6eokWE4ZlkPW9N/rAcEnyLh5uxMi5XU5bV7MMX5OQv0TX3Qp/j9L2qZqzXOiPNF Udonz7rmQed/4Xwz4+Z9QlXIcE5gVCGFUsTLaEQ9SpTN3mydWwT3MgppWTVQflNhgpvk Fj9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-48503-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48503-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVh/mMBfJG6VkvUFTbCU6Uk7Ca8eGKhA7+ZtxzU+SViZnFTHm/eK3b2SUZBjTAUbj7sDRsUTzSUvITUa2Sc00MB3Zoc8g== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fj16-20020a0564022b9000b0055a3abbbfaesi7010887edb.323.2024.02.01.08.20.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:20:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48503-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-48503-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48503-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB0581F2296A for ; Thu, 1 Feb 2024 16:20:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AD2F15D5C6; Thu, 1 Feb 2024 16:16:02 +0000 (UTC) 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789714191778415647 X-GMAIL-MSGID: 1789714191778415647 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; }