From patchwork Wed Jan 31 18:49:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 194905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp2096090dyb; Wed, 31 Jan 2024 10:59:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEsUcv4mc2b2/7gUh3jrqcMyyMB+MUpdv9uFgmTtgkP0FMCvpEgCsL9053L/13I18Ju4fbG X-Received: by 2002:a05:6a20:9591:b0:19e:3ae2:eff2 with SMTP id iu17-20020a056a20959100b0019e3ae2eff2mr857971pzb.32.1706727582056; Wed, 31 Jan 2024 10:59:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706727582; cv=pass; d=google.com; s=arc-20160816; b=wp8lo9ABc+7Do/RyUTz4zWgdYJmlH3QYw40dwCxynchFpEgMENCAnfbxScylwVqDHX HJ/bkx+M4jmCEn0cFP4ZnWs3U2ItnKb0k+gxa+NUhy44Qkmz+CcHs8QDsMQQejv9XePY i4nbWwkhba541N9g5qvMhueuTYiz8JK+lHdJdyzUUVOnIsQk969RZ0s/rSrRtsQDhxB2 VIKR1KZ1MV//8ZJ+o77Y6Gg4Y9NSvo4FuwPPGrGC6Z3+qpThmtCGjMhZ9rGzvs2nrzl+ Q7Gnd3WI+urwzZn+bLnHGs0Nkx/jXunl9LrKT8fZBeNFHoWbq8ZS4p+zHbyW2BXKZ3V3 AmQg== 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=Y/Z1i7KKyGeglSC2joikdWawCAxxaeMwyoZXZt4ik18=; fh=d0dr3kBjFWcIY4wLX+VuApF5Zn4oGdjVDQxXlAbAQ40=; b=Qc87+E100Stxl/9ZOSUSDI6kfboZx0VnJo57fgoX+nvVv/wtQ0MQNEdfLvqPJmQMNk 6eYRxERE1qPU/xleJq6KzYdC8aFOCbiR4M0T/KBJh/Xi11xu79Kolss/02damM4c6Vu3 u1CGRTkkyKkiOoxksWxApV1aFDcX9qrLZ3CpmqaI52hlgHw2PhtDQjBlotkgqi3sRFKh IRA6zg6kdvhZu2SeFlnLih1QchfKK5gAzeaYFOUjfPgd2uTGj9b2LK/wviHK6ptvhMIT GHSD6pTywFtLsg2vtezjAvjbgIc4aJTnGcgxsLfpMg5yoS5iW2sdnJ+tB6EUs4lH+IYW 57ZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-46993-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46993-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXNASfzV0b0CrDi+l2/jnhouzUXyjRcPgONLlGDYGWSBdeS0T07frdCG4FpNM/0zKNk6m4fIMVcYe0VPpmGiOsOwDxclQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o14-20020a17090ac70e00b00295b3ecc46bsi1795303pjt.168.2024.01.31.10.59.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 10:59:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46993-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-46993-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46993-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 12E90284DB3 for ; Wed, 31 Jan 2024 18:57:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3A5313AA33; Wed, 31 Jan 2024 18:55:01 +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 A369838FA0; Wed, 31 Jan 2024 18:54:58 +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=1706727298; cv=none; b=NEs6IleJ5snY2LbZIDGbZXJHdome6f4cKx8bTlWb/m/nRmF90fvfXj4H0O5IqISJbI+J0NunuVYAtxhG6clmVqMS3cQqmNoXnJByke/ZgWMwDBJOsKSLGAJqaBH2cpvcX1Hh3WQX1XRRbzaE7DRqP2hqAGQijMcyZ/8bxuoTCIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706727298; c=relaxed/simple; bh=ryuvbz2YC+7XgFZae3ZU4jkaJ3KY5fCxQDuCm/pUEeI=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=QJiG8RDtGXy2q5lEeyGyyUy5+ygjOo4FX2aoEoC0jipKI1uZY1+qr0Wr4M+GBbaY+7KFIdDT9FtYdYuvX4dslI+af5VBe009cyiv8tnu8FbllbUgZD6+f+kIEMT4TqrdE7gMEV0uj1smOD0y0qU4QWldF7mRTMkyRMCE5fsjp2I= 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 2A4DFC41679; Wed, 31 Jan 2024 18:54:58 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1rVFjt-000000055Ro-0RDp; Wed, 31 Jan 2024 13:55:13 -0500 Message-ID: <20240131185512.961772428@goodmis.org> User-Agent: quilt/0.67 Date: Wed, 31 Jan 2024 13:49:23 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Linus Torvalds , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Christian Brauner , Al Viro , Ajay Kaher , Greg Kroah-Hartman , stable@vger.kernel.org Subject: [PATCH v2 5/7] eventfs: Remove unused d_parent pointer field References: <20240131184918.945345370@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: 1789633580802444901 X-GMAIL-MSGID: 1789633580802444901 From: Linus Torvalds It's never used Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Cc: stable@vger.kernel.org Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) --- Original-patch: https://lore.kernel.org/linux-trace-kernel/20240130190355.11486-4-torvalds@linux-foundation.org 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 4878f4d578be..0289ec787367 100644 --- a/fs/tracefs/event_inode.c +++ b/fs/tracefs/event_inode.c @@ -686,10 +686,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;