From patchwork Tue Feb 6 12:10:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 197422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1501953dyb; Tue, 6 Feb 2024 04:28:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGUB0t1JGXKHrpbWO+I0+39UHftMpM7WBn00DW9A/MT79eJVHICQvZXg0wvnFp5gSKESHkO X-Received: by 2002:a17:906:35d6:b0:a35:7191:d952 with SMTP id p22-20020a17090635d600b00a357191d952mr1641206ejb.53.1707222520110; Tue, 06 Feb 2024 04:28:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707222520; cv=pass; d=google.com; s=arc-20160816; b=W4gCtM1B7jqRY3Ab2Wk2dqVNqrkn6Q8acgThYNCaq1+/HsnH6JsYFMVvsD1xFJwd20 KmfOocPihSrDkFO8NaL19wd9cVwuJsNgr7ckq32e6deDnLREcm4wqzBxL8R0/zminP7T S1vH6xueKOQOU7HiNResPCFlQ1ri5t3W3Fh5aeq4L98n15/9b5LAYpcNe121y5mMz5Ow h0oY8v9jBXkl7LCe09yNl5SQ2UAEW2vdGDuyrggqr7kdaXy2qEenl9TsOC77nOWOkj5A Hi9Mj5i9wvCKsjATXwXkGIPsC3a2YO3h+EyMnBkmFJy1qefTrSx3aX3myzqsGqS06pxC Ii6w== 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=//znUvdDCjBcws5msj92W0S44vVgjzgRljeV2BJnUc4=; fh=gThGqSUruJbY6z60+wplBbDwf7HqKD8P/S69vjrZ7gI=; b=JD+OqP6s3HQjHIQvSWia0UClC2ALcBlLP9BGaZY6rWM92zhl1JwtIdQX1bG3YtpYBn OF5+7JV71vhc7yzOzks+S1lz3jXeRF9eATLTcDcm8WmTmiZkJ4VfSZvQRPMusvhJQDQu XKWSJpurk9QiI5y0HDkheTNYAZh+6yGDFPL+elqUVFX8LxdbOXt2KGDM1JTKhwyZ2qbn HLROyoU92M1fFjblTBC79+RellXKhaEnGJxMSvOPSdKMyY2iIr6uSRE9Heal4SfTXVKy 4Ruh3IY+zK8swDSPFY0Va2HxEpfhnvPU7Gkajs6A9F5HQ02e0l1KyrlTxTRvgHqwnrpF 6QBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54930-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54930-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCX97PXXGEnPTB74ePhg00h93m2JyumMMYzAeJPfHTyjFgXunpW2wQ7g79Qz9rGa0YKQklHnpVM0cx3rGhHJd0FZuFpo/w== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id rs7-20020a170907036700b00a3633ac23b9si1030599ejb.550.2024.02.06.04.28.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 04:28:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54930-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54930-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54930-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 B49B91F245CA for ; Tue, 6 Feb 2024 12:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26159152C1E; Tue, 6 Feb 2024 12:09:43 +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 4A94B13BEA8; Tue, 6 Feb 2024 12:09:27 +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=1707221367; cv=none; b=iDedLZV81DB0aW4gB97tnVwrNINqAd2iy1h7ZdYAIS13AhH8nWrh4Ebty+1gHc5/ou12aK54oHxxwVJ4VOORc/G07hmbEbgUICQ6PPyhVdB8OZZzuRJFAx+ID0YtdYwMjmFaggA+xy1CQBUBN6OJd6EaInD19FS+WhtKYlmWU5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707221367; c=relaxed/simple; bh=5yqaMUzsL24Xo1kXlS9YCQkGhNmG85TgGVOtLxrgq1g=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Zww4dqfKknUfiTMIry+SARhCEVqPEwGS08GrtuJX0dUpcBL8GihkBr+BebVe+7/MrOfbCUJOlMBiNATcA35UHWGDWXVsSYtpsmKk4kMCakdy1CBSBRPz3tX2QJu7B/5vxFpjG7G84ac3ln8U4SkvsjZqfvt0zIW0oRZFwxr6iyI= 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 32E20C43390; Tue, 6 Feb 2024 12:09:27 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rXKGx-00000006bTL-2hfg; Tue, 06 Feb 2024 07:09:55 -0500 Message-ID: <20240206120955.500466790@rostedt.homelinux.com> User-Agent: quilt/0.67 Date: Tue, 06 Feb 2024 07:10:01 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Torvalds , Greg Kroah-Hartman , Sasha Levin , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Christian Brauner , Al Viro , Ajay Kaher , Al Viro Subject: [v6.6][PATCH 56/57] eventfs: Remove fsnotify*() functions from lookup() References: <20240206120905.570408983@rostedt.homelinux.com> 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: 1790152561125695146 X-GMAIL-MSGID: 1790152561125695146 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/ Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.166973329@goodmis.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 dirs when accessed"); Suggested-by: Al Viro Signed-off-by: Steven Rostedt (Google) (cherry picked from commit 12d823b31fadf47c8f36ecada7abac5f903cac33) --- 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; }