Patch "blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     blk-mq-don-t-create-hctx-debugfs-dir-until-q-debugfs.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0889d9553eeacb52795ee634966918a62e0ec4f1
Author: Ming Lei <ming.lei@xxxxxxxxxx>
Date:   Mon Jul 11 17:08:08 2022 +0800

    blk-mq: don't create hctx debugfs dir until q->debugfs_dir is created
    
    [ Upstream commit f3ec5d11554778c24ac8915e847223ed71d104fc ]
    
    blk_mq_debugfs_register_hctx() can be called by blk_mq_update_nr_hw_queues
    when gendisk isn't added yet, such as nvme tcp.
    
    Fixes the warning of 'debugfs: Directory 'hctx0' with parent '/' already present!'
    which can be observed reliably when running blktests nvme/005.
    
    Fixes: 6cfc0081b046 ("blk-mq: no need to check return value of debugfs_create functions")
    Reported-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
    Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
    Tested-by: Yi Zhang <yi.zhang@xxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Link: https://lore.kernel.org/r/20220711090808.259682-1-ming.lei@xxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index b5f26082b959..212e1e795469 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -881,6 +881,9 @@ void blk_mq_debugfs_register_hctx(struct request_queue *q,
 	char name[20];
 	int i;
 
+	if (!q->debugfs_dir)
+		return;
+
 	snprintf(name, sizeof(name), "hctx%u", hctx->queue_num);
 	hctx->debugfs_dir = debugfs_create_dir(name, q->debugfs_dir);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux