]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: keep ctrl->namespaces ordered
authorChristoph Hellwig <hch@lst.de>
Tue, 14 Sep 2021 06:38:20 +0000 (08:38 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 21 Sep 2021 07:17:15 +0000 (09:17 +0200)
commit4a7aaecf7e408c7bbcdcbf10cc403f25fe8cadd0
tree4bc87ffe43966189450a1223ea144384313073f0
parentfece49a818e5def4d6dad33ea6b03fa6cddc21e9
nvme: keep ctrl->namespaces ordered

Various places in the nvme code that rely on ctrl->namespace to be
ordered.  Ensure that the namespae is inserted into the list at the
right position from the start instead of sorting it after the fact.

Fixes: e0a487cadca7 ("NVMe: Implement namespace list scanning")
Reported-by: Anton Eidelman <anton.eidelman@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
drivers/nvme/host/core.c