From patchwork Fri Feb 2 02:30:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 195533 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp165427dyc; Thu, 1 Feb 2024 18:32:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5cBb8Aa0SJ8M57vi1AmGr8ywL0ETsqAePveEQpuYBU93oYzfNnZWRgMozQEbaBIKEKDeS X-Received: by 2002:a17:906:1355:b0:a36:459:51fd with SMTP id x21-20020a170906135500b00a36045951fdmr547705ejb.69.1706841156188; Thu, 01 Feb 2024 18:32:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706841156; cv=pass; d=google.com; s=arc-20160816; b=Enn/zOI73bmnulK+BPajltYEV44QO/x5OwEaN/RXq4M6JqDwQvBL6HwH5weEoww1hZ TY8ppeoeUB9E85eXAptqMKZ7OlRen1pVJ705hsVa5Nx3bGQ0GJiFk7ot+B91dQmGmgBj o7ZLB3xXmSrB3MJzdlEU/iUK39sseiEg59hiUDoSgTVRYpUuj2TtypY6b5tF13twuUbW Y1wqGUBzXJTwB+3J08zjrmkqPnwvXshksSbfyz3q6kqiOCn8BqM4VtSiVCLUXpqaWY6n vTYdh03wPJJZbzBbYFrfpl74kyw369pWaS7yLAdyz96dmwwGlblV2FR4ggFj/1l+QEIv udKA== 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=JfNPPKjFOyd7HwLDhh4hreDzawWhjlCOEnp7c3TSB2M=; b=ZYN24bAHYEBQuuKJMALWfB420qLNfZQlB8C64kQBODGyvlLq/pF1M+6BAuhhyzFzbL arWeltgvUPhGe870nR8lmXRBJ3/tHbC3GDw9cGbwI/MKz5igYWMxh7CW6CIWCorCPie1 F2G0OTnMC6IHvARHeepp0wmIg7g32s0j9w2B6QzStRCEWOTPucepFc8N2wmFXv/P7h1N X6cNK1VQPtGgo6f8ZN9RDv04wMA+5KOnZf+BR1lEKNOnflnqbdrPFsWHWTd/2bu6KN9E jtK7/pN0O02TbnH8U816kgxKlhmRvdQRXRtUIsItjaqMWBNOFWzPXyGZy+7rZ0iukqQd LuUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-49100-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49100-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVh3K6p17h2j/ckGGOqnXdg/xPGlELoautFxZG5epg2I6bEL65+3emtpsb1NJBzDsUBCZGVTcnDr4B05L3HTwKy2301ow== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qw22-20020a170906fcb600b00a28f4f98d3bsi361089ejb.717.2024.02.01.18.32.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 18:32:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49100-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-49100-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49100-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 C80331F22AF9 for ; Fri, 2 Feb 2024 02:32:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 345981799F; Fri, 2 Feb 2024 02:30:09 +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 78629E563; Fri, 2 Feb 2024 02:30:05 +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=1706841005; cv=none; b=sgZ9Y854jx6Jt2l5Cvq9kFg4PAID18wiL7zj6UmraHHllPG82yEeXYSMHkFPuDmwkBBFvqqkZikxUQP3tRYLNjWiMFAiaXD43A1QMn3WvVHliotUXM2Xpn4sZTL1e1PPoyzAVPjSZllfVtljWx4P2wrC0cCieksQKELwXIyk9/w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706841005; c=relaxed/simple; bh=6ZjGB20lu+D72LkOxZozH0kq/zHvSI+SlGbD2+KSFzM=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=sRy8CM92HTBBpn1/UlaZfViI9FkVjXKTv4K5aU3SYL+hu8jhSOef4wU2OagVdEXp6SZDHaUV9nVvvHFd3wWw5x3AebHfolugkcsZPgYxNup6dWvv92IylLZ3x/y5QfeW/SSt/HnKcUCw5uG5oPzrt8b6prgd+8LKDHhbgaWPaNM= 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 017A2C43143; Fri, 2 Feb 2024 02:30:04 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rVjJv-00000005k8a-01rm; Thu, 01 Feb 2024 21:30:23 -0500 Message-ID: <20240202023022.865893901@goodmis.org> User-Agent: quilt/0.67 Date: Thu, 01 Feb 2024 21:30:05 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , stable@vger.kernel.org, Christian Brauner , Al Viro , Ajay Kaher , Greg Kroah-Hartman , Linus Torvalds Subject: [for-linus][PATCH 06/13] eventfs: Remove unused d_parent pointer field References: <20240202022959.515961549@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: 1789752672489207277 X-GMAIL-MSGID: 1789752672489207277 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;