Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1930746pxb; Mon, 22 Feb 2021 15:07:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVZxuxLnf3KuizPgBQzBcWlDgrkAI19imKvLQHhXCCKYgIdDkHRKCE3hmbDKkpiK0B9H9t X-Received: by 2002:a17:906:9147:: with SMTP id y7mr21331241ejw.243.1614035227274; Mon, 22 Feb 2021 15:07:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614035227; cv=none; d=google.com; s=arc-20160816; b=ntQvIu6EpDrAeKuIZYvGBJ1v7Q+dSgf3U98GXaxZcBiieLkE1XcqCh9kt1SdaUEZOB G7fIn7STrTVerYuz17QUJ6mxUCZUYKugmBevDnniJyevFU/FiwHLa461zbz4HVdvUa8x kQzSWEJZUmhaFdQh/VO4Q9U9ISKxeAfn3jhgHTFPNNRZEm7of3eF0iyNt50m0c4zfPob MDAbFzqjqFCu1Vf2i9dXK8tHtLcG3KZuC3sXLXx5GCgbMriwdTv90ZCBtQfjwjeZk//h MH4re1kz95MzyPlWF9IpV+rhS5qIyZZY155aW9LgwBCXo7M/ViATYq2Hwlu1uETjDhZm 6NdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=+uDsJO9KZFi1+K2QdUz0KyVBa4EG0R7j574qlwdvHcY=; b=S3N9EaHiOlUiypg/iB7j/ne2wx18C3WUp9APbZXTWw6UD2X6/3ThxVyvhEgV+226pF 9Ry6K4EdOxo+dpt6nuJeburlMPhzDFMpXBuFsLw4Ct17k/aLu2qIOe0NbZ1Nh1eWFUP3 GkDa1BpMUoqqIlOfn9hhvq/QmS7zaBh9xBowcp0NSNRbk28/k3iMPHwmZ/ACBLcIbrXU FWxVH00BWEQQATXbvnB0HrD/5NXdfA6tgWUOaRjyHXfQfYZazK7TtiaggHWGMvdH3H1I efshMDo/JXKLt5QGTQXKJrsePsdDMQKBnC/JKMgzx7FC3hj6HH8VMCP3HWDc7bm+i+Fr gTfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si363478edy.78.2021.02.22.15.06.43; Mon, 22 Feb 2021 15:07:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230114AbhBVXDk (ORCPT + 99 others); Mon, 22 Feb 2021 18:03:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:50502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbhBVXDi (ORCPT ); Mon, 22 Feb 2021 18:03:38 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CCF2964E07; Mon, 22 Feb 2021 23:02:56 +0000 (UTC) Date: Mon, 22 Feb 2021 18:02:55 -0500 From: Steven Rostedt To: axboe@kernel.dk Cc: Greg Kroah-Hartman , mingo@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blktrace: remove debugfs file dentries from struct blk_trace Message-ID: <20210222180255.1b117616@gandalf.local.home> In-Reply-To: <20210216155247.1015870-1-gregkh@linuxfoundation.org> References: <20210216155247.1015870-1-gregkh@linuxfoundation.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jens, I guess this goes through your tree. I'm pinging you in case you did what I did, and confused this patch as one of Greg's stable patches (which I almost archived as such)! No, this is an actual update from Greg, not a patch that was backported. -- Steve On Tue, 16 Feb 2021 16:52:47 +0100 Greg Kroah-Hartman wrote: > These debugfs dentries do not need to be saved for anything as the whole > directory and everything in it is properly cleaned up when the parent > directory is removed. So remove them from struct blk_trace and don't > save them when created as it's not necessary. > > Cc: Jens Axboe > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: linux-block@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > include/linux/blktrace_api.h | 2 -- > kernel/trace/blktrace.c | 8 ++------ > 2 files changed, 2 insertions(+), 8 deletions(-) > > diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h > index 05556573b896..79979d33c140 100644 > --- a/include/linux/blktrace_api.h > +++ b/include/linux/blktrace_api.h > @@ -23,8 +23,6 @@ struct blk_trace { > u32 pid; > u32 dev; > struct dentry *dir; > - struct dentry *dropped_file; > - struct dentry *msg_file; > struct list_head running_list; > atomic_t dropped; > }; > diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c > index fb0fe4c66b84..67c730f0b6ef 100644 > --- a/kernel/trace/blktrace.c > +++ b/kernel/trace/blktrace.c > @@ -311,8 +311,6 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, > > static void blk_trace_free(struct blk_trace *bt) > { > - debugfs_remove(bt->msg_file); > - debugfs_remove(bt->dropped_file); > relay_close(bt->rchan); > debugfs_remove(bt->dir); > free_percpu(bt->sequence); > @@ -544,10 +542,8 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, > INIT_LIST_HEAD(&bt->running_list); > > ret = -EIO; > - bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt, > - &blk_dropped_fops); > - > - bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops); > + debugfs_create_file("dropped", 0444, dir, bt, &blk_dropped_fops); > + debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops); > > bt->rchan = relay_open("trace", dir, buts->buf_size, > buts->buf_nr, &blk_relay_callbacks, bt);