From patchwork Sun Feb 4 01:16:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 196392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp148276dyb; Sat, 3 Feb 2024 17:23:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYwUtKNrHFjM7BYNb8PG5r3rJwPbDECG2K3R13XHxwnXqKZeWiAPjp4H6YDpw2muHFPi4G X-Received: by 2002:a05:622a:268c:b0:42b:ff78:2033 with SMTP id kd12-20020a05622a268c00b0042bff782033mr2576058qtb.56.1707009794370; Sat, 03 Feb 2024 17:23:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707009794; cv=pass; d=google.com; s=arc-20160816; b=T998Omdds6salJigoZ0pvnuVuoSDds9nxN1LgkBawYwwCHBrVDpFR4gDhmD/XQa0Gc Pp3ap3cHddWKpfKTtmVzy7i5L9kmWp1eW+TkZXF+oEVmNGqfmLzSNhpqAAzAJ5SED2aU 8tc60SoYVRd0wF/ee79OQK5NT6q+iAj5KpImoUEq2+JIZbiFso/Kbn+ZqMH3NUztrP8Q +C1jKEkpVBaVAzxRpyekI9RftSVznBdR8l8y+uq6Z1gjuX/lMQ3llj8ODqWdv9c5IdKE OHElX5ugtYxavVp/vcMLBQ7Lq2IWppMTr1ibiZpKUyqkMbOHvee+PlPr9yzyAgiPxqMw /SAA== 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=IE+OBaRn2JS7wfyfQbpNdsst8lzA+UlBabjQDbi1O0s=; fh=UUPXfBh3D2C5KJSgaedc/OBvhJpysaplAGuqV+VzIws=; b=htVs9I7XqP1gZnIrBWXdwhm26FhvQdOpRj/SOYARis4SXEpo1hxVyKYh5fdQQx/Huf BWyBohlsIz3FYFvM7roSgwZ/2mmdVSdglHrImK/IKSkYPCOwgtCT8/02iEisknGvelEE 56KsUQoKNWWaLOsXfdymzZwpGd0LSdG/SkC0NHd9txT4P8MAjJeOlVUM89kw4DiKse3D +Zop2ySu4jLCidz9Nmr73TAef0Pd+0GP6BlvYtUgvxfA2m5l6QtyCBwQckw3BqjARwht lG6YYKj/5nr6Pwr4ylxXwUG2KtbMEJjKA8viSVSWNp4WWHKycdxb7Dl10IlPKjB3fDle Hi8A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-51352-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51352-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCV9k9jYMOeRowE9CDVajMmDsnuab/SLB7SsMQUmi5bP4ZHRPRAwhA7pZ6Z1dCpyUi9fcZiY0bLjj/iSsXfZfQbgxqjqPA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e10-20020a05622a110a00b0042c134e4232si1905811qty.341.2024.02.03.17.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 17:23:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51352-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-51352-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51352-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 29C1F1C21082 for ; Sun, 4 Feb 2024 01:23:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BD3E182BB; Sun, 4 Feb 2024 01:18:12 +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 DA4E6C2FE; Sun, 4 Feb 2024 01:18:07 +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=1707009487; cv=none; b=hYoxle+rixhdxqYAtSbL1iQneRPwfoD7CsO7HrS1l+Gl58qINl5on2F65Q8q0PYdqGr2nNSwqMebFK0HAQpzG7/lL/dtk1xHB4JdbHmu3pVNaIRecycgJLUcb3SdtBapLadtLwnpIunsTg6tnO6LpRwpiX3bQvEHI7VEK4sisQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707009487; c=relaxed/simple; bh=6ZjGB20lu+D72LkOxZozH0kq/zHvSI+SlGbD2+KSFzM=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=jywflouJluNoBvjaa5btLXQNm+7e3cQHiwbv+EhX8rdJla46pl4MpWj38Fevz4zT148sURU/U083KVs7syZqBbVMWpUN+N9rhH1SpozbWMuewvGpTtuNyz9T6iF9PVILLwBYFW4Pil+bP0dpFwgt1E6XRHDdI2LzBjOYEbMCBnU= 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 1D72DC32788; Sun, 4 Feb 2024 01:18:07 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rWR9R-00000006Oss-3KkG; Sat, 03 Feb 2024 20:18:29 -0500 Message-ID: <20240204011829.656627126@goodmis.org> User-Agent: quilt/0.67 Date: Sat, 03 Feb 2024 20:16:32 -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 , Andrew Morton , Christian Brauner , Al Viro , Ajay Kaher Subject: [v6.7][PATCH 17/23] eventfs: Remove unused d_parent pointer field References: <20240204011615.703023949@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: 1789929502291528225 X-GMAIL-MSGID: 1789929502291528225 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) --- 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;