Unverified Commit ef8c8a59 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11777 blktrace: fix blktrace is disabled when CONFIG_BLK_DEBUG_FS is disabled

parents 4cfa0367 524ce5d7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -553,18 +553,15 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
	if (!bt->msg_data)
		goto err;

#ifdef CONFIG_BLK_DEBUG_FS
	/*
	 * When tracing whole make_request drivers (multiqueue) block devices,
	 * reuse the existing debugfs directory created by the block layer on
	 * init. For request-based block devices, all partitions block devices,
	 * When tracing the whole disk reuse the existing debugfs directory
	 * created by the block layer on init. For partitions block devices,
	 * and scsi-generic block devices we create a temporary new debugfs
	 * directory that will be removed once the trace ends.
	 */
	if (q->mq_ops && bdev && bdev == bdev->bd_contains)
	if (bdev && bdev == bdev->bd_contains)
		dir = q->debugfs_dir;
	else
#endif
		bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);

	/*