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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 BDBECC3A5A9 for ; Sun, 19 Apr 2020 19:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C0E32145D for ; Sun, 19 Apr 2020 19:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587325566; bh=3ermhqtRTukrfIyxromhdTXML7WENrc2Gg+w0I86O8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ICnri0Q7ca7rmrSTFmudEHTXC6XokupJxpGmnmzz39hsjeNF4sG62bZeniJtONnLo 35lZbwZDoN0TVoDosBkQsFHuUJgKYZN1CTge1uFRKvoTLTthYr9eWTY+eVcXIwzWP1 5Znm2swiiKtJOkZfW8MjXVfwRPiQeCeO8p9Ey7nM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbgDSTpx (ORCPT ); Sun, 19 Apr 2020 15:45:53 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45240 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbgDSTpv (ORCPT ); Sun, 19 Apr 2020 15:45:51 -0400 Received: by mail-pf1-f195.google.com with SMTP id w65so3871804pfc.12; 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=RI7Tb7ixJCt7mw/hARKoiiuSv/PYwKGbDB0yUl4YY04/uKh4eVKP8I5syQ+xeI9Pjg iPQA8Q+ASOqzkEMHzMznAh4kaQR9/JN66r6tXUK0XdROzHecPRBUcWq4HShlkeZ9CPTb kjmBTD4VA0bBGBFQpIiY2ge0HA4azg4CQCeJ8oZLdGe8l8d4RJIQFqrKXbXXOshUKN5L vc+qltOeB7Sn/1YXyNPHtTuv0wYmxDJzJnnYR+Yar70eqICcLRO21+oL7VDnOj3N7jY4 Ix7vwhCQ/eaqE1u3+PVRLmk9aPw3wbAxzfC439nDa+Rf8FbRdXZgbU8CUkUNdS52IjUp onoQ== X-Gm-Message-State: AGi0PubRsfaehcCTpI/oyeEd5qyhjEy3Cu8XQfg++g9NF2nSfN5UmEjU /xAR30Y7wgF4PY5k0TLtn6Y= 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: 8bit Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 = debugfs_create_dir("block", NULL); + if (!blk_debugfs_root) + panic("Failed to create block debugfs directory\n"); } int __must_check blk_queue_debugfs_register(struct request_queue *q) -- 2.25.1