nvme: move setting the write cache flags out of nvme_set_queue_limits
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Mar 2024 14:04:53 +0000 (07:04 -0700)
committerKeith Busch <kbusch@kernel.org>
Mon, 4 Mar 2024 16:24:56 +0000 (08:24 -0800)
commitd60c23e4552b04fda600c6a8681dfe57b3ee2bd8
tree42d180042b1c4d8684725d38d255845258ab2c10
parenta5b1cd61820e88d90454ad87154856a7a20aafbf
nvme: move setting the write cache flags out of nvme_set_queue_limits

nvme_set_queue_limits is used on the admin queue and all gendisks
including hidden ones that don't support block I/O.  The write cache
setting on the other hand only makes sense for block I/O.  Move the
blk_queue_write_cache call to nvme_update_ns_info_block instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c