From patchwork Tue Jan 30 19:03:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Torvalds X-Patchwork-Id: 194278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1436281dyb; Tue, 30 Jan 2024 11:05:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHebVyBQrSQ7dVh1osDwDSjilVcbTI7yRmrg9NdMWJLY335JnSpInrHnPWm7d2KTQh4XUjG X-Received: by 2002:a17:906:2354:b0:a35:7191:d952 with SMTP id m20-20020a170906235400b00a357191d952mr6119787eja.53.1706641510051; Tue, 30 Jan 2024 11:05:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706641510; cv=pass; d=google.com; s=arc-20160816; b=whaKzW/7OU9kEsWXbA9GzrQ9rjIA7LB+eIXtEvDNgdadxtCpAAC55403zgbr2ZaSl/ TcW09AifEbe91wWFtv4/lIxGF6MJScCGgBnMWDF5RmbBIffTTy+2r7DvNkfh5IozXG4O rcUoV2y6z0dH2CuokRxZT8U+mSDIwANz84I1SvJrL+yFj+hNfPTTql9QzXcedtMM3ti6 Q4PO17tbqQQ/w6gb0G8M1aM0nafXY5Ky0vTUtC5psxxPk9HbFMuD4wopqi5EaXypBVs8 mm5lKdyaUoxyXb+1FZMHZh0athG4uWcxaTQmNtA4n5+IHTOXv8YISQmeajLrzgb6m529 o3pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Zs62IJhwdmF2K5b/X0hA5YSVDgHXig4aJyLkpkF+3Pk=; fh=aD/wDFT3pdBCiZXVST/riRN8xCPBouJr3XfOtoKVvRw=; b=dJRCaSZzBJdNeXZW6DN/Ea+PiPUJ8kpak0RFDL/FerYRoLHAA5lrDyFzDV4f3quAt8 arAHn/OedU4mEbz/DYinm8xBTJqy3Sf38RIXR+KcNTmijZzCsNaYYX49OnPD+BaPunlZ yAnnDdnCLHWa2oQNynXTlQ7lkoRVTKkX0Gb5RpsPr6FFjtdQH4xKZaL4NNjjDjzABLW4 FKHP1o71Ra5LdvfkUqNv2nvEXUrjUKisPSg9L3/YruGKj6Zj0yxTkfwZZY0vt45aglbv 6o9uXVYt4MnKoftPfYQn3nBThZOIOyMRpKBFonhxxE79WglkFzyWl06V0rIqwqQC2OAh F7pQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HE4bR2zZ; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45157-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45157-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g26-20020a170906199a00b00a3084baf944si4842324ejd.390.2024.01.30.11.05.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 11:05:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45157-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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HE4bR2zZ; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-45157-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45157-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 8DF291F26852 for ; Tue, 30 Jan 2024 19:05:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF853762F5; Tue, 30 Jan 2024 19:04:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="HE4bR2zZ" 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 20788762CE; Tue, 30 Jan 2024 19:04:20 +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=1706641461; cv=none; b=iWDtrsQTVlFu5eCKEMyxxGsdFA607TjAzbQNad4n/BLhTURrlbV68I9tYRJJ3DvGLmIHKY5lJUsyezLUarsSilmiSs2WrsY1kOfgmxmfGWgJF8GDZmLdeGKWyXW28ITHXZJNJiUZAQMfuvWa1r8oz8SjUBy1QFreZryyFdvbC48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706641461; c=relaxed/simple; bh=VfkCiOcbDiF97nCdF1XS/rB91kgxot2LBBvCXyBvEHs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DCb56iAsAPw5P1qSTGqAt9q60jE73ofoLOjw4aIQYvPiGT+kcPvUTy795FHZEwQZmrAv4kxJXS20RvrU4ziLaq9yGkvYBXnbBMsgvoXStAl5sFrRHlJkBbVfE68h82rTXN/N3jluFIogg7bCNQ3ZsqOyCquPSQNQrNG81iQ3FDU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=HE4bR2zZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 695FAC433C7; Tue, 30 Jan 2024 19:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1706641460; bh=VfkCiOcbDiF97nCdF1XS/rB91kgxot2LBBvCXyBvEHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HE4bR2zZg6i+6WEvZ49qbdu3atDQF/Z8KiZkSjdlT+O1NoUOIzsHjUoIRCP0QPJPP aJ4XKQn5U4yPeZG9xliQ//NBL4c/PRXF4H9a/nrpDxp+YP61Y7NoCjk25mH6+H2tL8 w4VfRlXOs48PNEwx2vOS8lxTp5vkNw+uvpbN60D0= From: Linus Torvalds To: Steven Rostedt Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Linus Torvalds Subject: [PATCH 4/6] eventfs: remove unused 'd_parent' pointer field Date: Tue, 30 Jan 2024 11:03:53 -0800 Message-ID: <20240130190355.11486-4-torvalds@linux-foundation.org> X-Mailer: git-send-email 2.43.0.5.g38fb137bdb In-Reply-To: <20240130190355.11486-1-torvalds@linux-foundation.org> References: <20240130190355.11486-1-torvalds@linux-foundation.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: 1789543328341086871 X-GMAIL-MSGID: 1789543328341086871 It's never used Signed-off-by: Linus Torvalds --- 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 ad11063bdd53..1d0102bfd7da 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -685,10 +685,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 91c2bf0b91d9..8f38740bfb5b 100644 --- a/fs/tracefs/internal.h +++ b/fs/tracefs/internal.h @@ -35,7 +35,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 @@ -50,7 +49,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;