From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71F72C38A30 for ; Sun, 19 Apr 2020 19:46:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3D32221927 for ; Sun, 19 Apr 2020 19:46:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D32221927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 59E968E000E; Sun, 19 Apr 2020 15:45:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 579538E0003; Sun, 19 Apr 2020 15:45:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43EF98E000E; Sun, 19 Apr 2020 15:45:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0163.hostedemail.com [216.40.44.163]) by kanga.kvack.org (Postfix) with ESMTP id 2CBC88E0003 for ; Sun, 19 Apr 2020 15:45:52 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E2F16824556B for ; Sun, 19 Apr 2020 19:45:51 +0000 (UTC) X-FDA: 76725634902.23.lead49_504784707a130 X-HE-Tag: lead49_504784707a130 X-Filterd-Recvd-Size: 3732 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Sun, 19 Apr 2020 19:45:51 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id d17so3982076pgo.0 for ; Sun, 19 Apr 2020 12:45:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8eAcVIKDv5Pxv4vhGmI5RPGxd5/34ByDOVy4yEbxjOw=; b=p8YJS9xu52yI3B/shXMrJ3SZjPsllZ3meRGVXrfALG5OaNS2y+G136Uh4Dk6dqyVvT 7YrUHZGaSWGM5CONxNbRk9l6ihfI/qPwGkdpr+G/n9ExPK5BiiBAj0w9eWlarWyiFfO5 /1ad5ivMIppeI/oF6427GcPRGfKsI9/y0PgbQEt5BGxQOooO9FrL9LcJytghcQ21Lq3X DW9jd1COq+Lq64MgsLriSDS5E0t1O/n9ezyHejXbogVeGgofwpOeCtJl0eXCxZzFtcj+ GQZCgYamPxBIahBYRByvVsx/ngZ8xV3RSojoZVKd5mgbqx/un72KbkLY1D2XPY6qHzoU VhDw== X-Gm-Message-State: AGi0PuaXjLkLTveaCxMGo38oxodHw7yB0+X8lt7VLCKLA04P06Em8nWx bLetMTctsYji8ZuZGMhZA8E= X-Google-Smtp-Source: APiQypJKWR3D9PTkDLW015p+SOWl71AOzd1pfWUaHiOwDS7oh/tvTofjj4cC8q+yS3mo4hA7hYStiQ== X-Received: by 2002:a63:3814:: with SMTP id f20mr4061780pga.283.1587325550777; Sun, 19 Apr 2020 12:45:50 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id v94sm12047750pjb.39.2020.04.19.12.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 12:45:43 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 10FCD422E5; Sun, 19 Apr 2020 19:45:39 +0000 (UTC) From: Luis Chamberlain To: axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org Cc: mhocko@suse.com, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v2 09/10] block: panic if block debugfs dir is not created Date: Sun, 19 Apr 2020 19:45:28 +0000 Message-Id: <20200419194529.4872-10-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200419194529.4872-1-mcgrof@kernel.org> References: <20200419194529.4872-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: If DEBUG_FS is disabled we have another inline blk_debugfs_register() which just returns 0. If BLK_DEV_IO_TRACE is enabled we rely on the block debugfs directory to have been created. If BLK_DEV_IO_TRACE is not enabled though, but if debugfs is still enabled we will always create a debugfs directory for a request_queue. Instead of special-casing this just for BLK_DEV_IO_TRACE, ensure this block debugfs dir is always created at boot if we have enabled debugfs. Signed-off-by: Luis Chamberlain --- block/blk-debugfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-debugfs.c b/block/blk-debugfs.c index 761318dcbf40..d6ec980e7531 100644 --- a/block/blk-debugfs.c +++ b/block/blk-debugfs.c @@ -15,6 +15,8 @@ struct dentry *blk_debugfs_root; void blk_debugfs_register(void) { blk_debugfs_root =3D debugfs_create_dir("block", NULL); + if (!blk_debugfs_root) + panic("Failed to create block debugfs directory\n"); } =20 int __must_check blk_queue_debugfs_register(struct request_queue *q) --=20 2.25.1