From patchwork Tue Feb 6 12:09:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 197420 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1501735dyb; Tue, 6 Feb 2024 04:28:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IETnQDEGCxV0J00hA7yES7GGdTnXSsu7z2GGWLQHiLFg/rGMqbaNg3DsnzPJUK5YkRPA9k9 X-Received: by 2002:a17:903:2792:b0:1d9:119e:af45 with SMTP id jw18-20020a170903279200b001d9119eaf45mr1251468plb.41.1707222491685; Tue, 06 Feb 2024 04:28:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707222491; cv=pass; d=google.com; s=arc-20160816; b=KNobQ/NtCcTUbMd3jLz0J3rWNT0gg53HsnKYO6duy/XgcO1DQ/R5DxK9Jrmjhk6mg9 Y4RkvHAy89k5HkLr0VJs5Qc5CLlGlwuyRfygB9IbM/qNk1zvCXVojJ5dzarTqe2RVYZI 9Gs/3kutI9vjLo9Hl7RtXfL0i9Mkn6Rp/eOFUFp9mOoJtZ1BFlnV9tXQ9JL662wTN9U8 q/hL7hNNWPl/WDqRVQkor8To8kISftbsp0Wj7nORImgxlmofrT4Z00ZzHa+dZCz5rmsq CyeEImUgCQbRfadxU3uv2Eaw4/OBNw4JsXyKEJTyiEJAtk1GdOHwwAk7oTq38FTldX6S Dudw== 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=5P4MAWSKMmD3/d6RtYJCLwc+pyfvZUI8lTsxddGrfqo=; fh=ESN71XiXU8hbpcqe/TnZIfQ07UGlWpZARTDt5Vi+j0E=; b=tFWfjXFA4hVFdryBrbJwlhiUz0z7M6Wv6oIYbVeccU1nvlxdJhEk8jzRtT51kf84P9 5xaqvJPaST/DqSvSfweIPRy8XNO8cKZRz7nFhRkdrQ7nYVNUH8Dl6/GwzIeDdBOQsKxd Rr8Rmd2u2DKpNlzIDvU/mWRSGgCC3qGsS+UDetu1JwTNkQGo4azcNbhr9HC7fdFOTnfJ ysAJyH2E+a9X/iBL3rE/YofZegEkSB/8Nct7SFNhedBKTkjOiAi/MrNWSGF3qBYWKOt1 cuiISqQIk0CuXm/pko8JFd2qpwo696wPhcRZbZ3vcvvfTGoODwNrQDgg1a/ou0HhT8O4 C2Dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54925-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54925-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCU+TsUv5czXIb0bFLWU8geevqqhNid4RiprH+Dg832fhUe3clBT7pWZOX7IHr6V81kkjqYhT4pc0Genv/s/oJLi3aOksQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z6-20020a170903018600b001d8dbb867a5si1576528plg.592.2024.02.06.04.28.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 04:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54925-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54925-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54925-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 780C8283835 for ; Tue, 6 Feb 2024 12:28:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47A32152BE9; Tue, 6 Feb 2024 12:09:42 +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 85E5213B78C; Tue, 6 Feb 2024 12:09:26 +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=1707221366; cv=none; b=IfX9Xk3XubcyC2gexM/2wtfG4EXnczgimHjxMKZgrmY63rQpPTcRZjqoSzvcLGYzMxqBr/ti8dSIL8b80NZ9gwCNPq6rmp/FkNYAAB1Byie1JXOEXAxCCJG9o2330yEJvRUu2e/XkhUuwwblcOOKjlgiuBfEnlsNZ40u/jdQ/Ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707221366; c=relaxed/simple; bh=WyXLYu467PqbTFP05lGa1iuD6tL0QtugqCd95Pr2/KA=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=cL9DUA+9hhPfrREwbPhGQjPTc2oCnTi/Ld+LZPIkkHHoRn46dvGH7YvoDrKZQa9Y0oF03E28InQtZkBMlfHAcIScPa3SCz7lXoCcsSKm4LAxwdyVjcaphvRRUkNQ5T38P/g0mLL2vpH6QxyTIGXTxlECc+saHJXIT0mlZOnU6M4= 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 62B27C433C7; Tue, 6 Feb 2024 12:09:26 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rXKGw-00000006bQq-3STz; Tue, 06 Feb 2024 07:09:54 -0500 Message-ID: <20240206120954.681339731@rostedt.homelinux.com> User-Agent: quilt/0.67 Date: Tue, 06 Feb 2024 07:09:56 -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 Subject: [v6.6][PATCH 51/57] eventfs: Remove unused d_parent pointer field 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: 1790152531521583944 X-GMAIL-MSGID: 1790152531521583944 From: Linus Torvalds It's never used Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.961772428@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) (cherry picked from commit 408600be78cdb8c650a97ecc7ff411cb216811b5) --- fs/tracefs/event_inode.c | 4 +--- fs/tracefs/internal.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 04c2ab90f93e..16ca8d9759b1 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -680,10 +680,8 @@ struct eventfs_inode *eventfs_create_dir(const char *name, struct eventfs_inode INIT_LIST_HEAD(&ei->list); mutex_lock(&eventfs_mutex); - if (!parent->is_freed) { + if (!parent->is_freed) list_add_tail(&ei->list, &parent->children); - ei->d_parent = parent->dentry; - } mutex_unlock(&eventfs_mutex); /* Was the parent freed? */ diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h index 09037e2c173d..932733a2696a 100644 --- a/fs/tracefs/internal.h +++ b/fs/tracefs/internal.h @@ -36,7 +36,6 @@ struct eventfs_attr { * @name: the name of the directory to create * @children: link list into the child eventfs_inode * @dentry: the dentry of the directory - * @d_parent: pointer to the parent's dentry * @d_children: The array of dentries to represent the files when created * @entry_attrs: Saved mode and ownership of the @d_children * @attr: Saved mode and ownership of eventfs_inode itself @@ -51,7 +50,6 @@ struct eventfs_inode { const char *name; struct list_head children; struct dentry *dentry; /* Check is_freed to access */ - struct dentry *d_parent; struct dentry **d_children; struct eventfs_attr *entry_attrs; struct eventfs_attr attr;