summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/configfs.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@kernel.org>2024-06-17 09:27:26 +0200
committerKeith Busch <kbusch@kernel.org>2024-06-17 20:29:22 +0200
commitf31e85a4d7c6ac4a3e014129c9cdc31592ea29f3 (patch)
treec73afac14764e1b33ce50186e372e84743bc85f9 /drivers/nvme/target/configfs.c
parentnvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA. (diff)
downloadlinux-f31e85a4d7c6ac4a3e014129c9cdc31592ea29f3.tar.xz
linux-f31e85a4d7c6ac4a3e014129c9cdc31592ea29f3.zip
nvmet: do not return 'reserved' for empty TSAS values
The 'TSAS' value is only defined for TCP and RDMA, but returning 'reserved' for undefined values tricked nvmetcli to try to write 'reserved' when restoring from a config file. This caused an error and the configuration would not be applied. Fixes: 3f123494db72 ("nvmet: make TCP sectype settable via configfs") Signed-off-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/target/configfs.c')
-rw-r--r--drivers/nvme/target/configfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index bd87dfd173a4..e60224356048 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -410,7 +410,7 @@ static ssize_t nvmet_addr_tsas_show(struct config_item *item,
return sprintf(page, "%s\n", nvmet_addr_tsas_rdma[i].name);
}
}
- return sprintf(page, "reserved\n");
+ return sprintf(page, "\n");
}
static ssize_t nvmet_addr_tsas_store(struct config_item *item,