From patchwork Tue Feb 6 11:32:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 197346 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1482447dyb; Tue, 6 Feb 2024 03:53:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGp/HA89FE5VbFcP41lUSMGmU6QeeVdjqDRM19G6getRAmkplzmxUwxD5xavhu+KISaaI1o X-Received: by 2002:a17:906:646:b0:a35:e7a1:66ec with SMTP id t6-20020a170906064600b00a35e7a166ecmr1659780ejb.44.1707220390576; Tue, 06 Feb 2024 03:53:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707220390; cv=pass; d=google.com; s=arc-20160816; b=GZGfxIkeFCV/tKDudoOxesnaZv5nTPoXBOHzghwK4e5V5bD/sv87metdeKjh0sbCtl OnSA9zkwPOrF+VJuMzCm5lQUAAxrmaPwm2K8cu07v4tlXwOAmqb1qYHM3yH3xsZHhbyv /8dOcQkKJ1rVG+W+h6MAfu/jL7ItTSXwobSLAhrpW3/A+LPhkj+dZu6vFN74vwxJz8F5 4ehzpfbUpa9PBf+FzpWi+cDETuHUnl+Kf1eXl0rPXaSIb3am8Q8S/HjDdGK/MB+eunzX jfKd1ZpVlAwEOApimayI6cDooX3j//KeDzcm9FCOUo9crwataJ2wF3of/8Ay/b5gmOfd a1Mw== 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=aQIx6UaqQxtN6Say8Loh6h9yebHf9foO8TQH+O37ceU=; b=M7TlSgWiqsuukIerMvtMPIDmH3T8+9cPZxUN54nf5ZMmFzDHM9xf43K92TNLUTXMf0 3sD7hBu9vxAb7caHyiiX+yv5hfqI5Cum22i2L9Yot+JsKAvHsKAXqrmI8IUtT17rD8/k WseWz+V9/PK0iwN1f/hqDYfqD+gKJXp5bcvk2V2BXQeJ5Q5y20WGXqWNEkfN951eZQA2 iL1G9JfmHZnVz5xOcUTFlvbJG2+IgmM29vxu5oU2BAqQR0gcjjIRx1ZITBTT5lNSpaK8 lSC8F7afb+hZqED65j8UtCNpYODCsR55Mnh2ovncxqID7/hudyafVwy0Nel92KTXNVfG Wihw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-54804-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54804-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWCAKjZRTWcZACw13zraJFiFbBVH8rtO3kE1WWvz/RT8fY5COxQPehE5B+imTeeudIvj9geGr7fodyhYsrDHc3XgYo0iA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d8-20020a17090648c800b00a36715df0f8si1035313ejt.112.2024.02.06.03.53.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:53:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54804-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-54804-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54804-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 2D1991F21BB8 for ; Tue, 6 Feb 2024 11:53:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39141134759; Tue, 6 Feb 2024 11:33:39 +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 A6FDF134CC2; Tue, 6 Feb 2024 11:33:32 +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=1707219212; cv=none; b=nStlZScr91mcHlkzgQi24CbkI+vBugWEShqiRzZGGBd2wcX8g3eazMiOgR1jmHnhJtQvTbbSEF5A7NRbiTesMhoObKz+gqafVBon2hX71aViOsGn7dNE1e+6cDkQmy02xbh9x7vvR7Ko0ZeSkwssrzVsxKQZ8QO/K3m59FtvXsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707219212; c=relaxed/simple; bh=WyXLYu467PqbTFP05lGa1iuD6tL0QtugqCd95Pr2/KA=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=bPXjXaNc+71j/HipkXw+UurMookgUP+MbgkMbHGZul3ZrTZn06ziITqIicpqgLrmF8LKuV8fgN9HmMz9H45r1Sv8JpbKSY1OJz1HkxniPr4GgPF5jVTtoNiLTOd7e4YghXNa3i+3JgdDXSzfAzj0tzRO86XQVFciC42EpKjdNvg= 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 96F8BC433A6; Tue, 6 Feb 2024 11:33:32 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rXJiC-00000006aOq-49aQ; Tue, 06 Feb 2024 06:34:00 -0500 Message-ID: <20240206113400.846719926@rostedt.homelinux.com> User-Agent: quilt/0.67 Date: Tue, 06 Feb 2024 06:32:15 -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.7][PATCH v2 17/23] eventfs: Remove unused d_parent pointer field References: <20240206113158.822006147@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: 1790150328368131294 X-GMAIL-MSGID: 1790150328368131294 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;