nvme-auth: don't keep long lived 4k dhchap buffer
authorSagi Grimberg <sagi@grimberg.me>
Sun, 13 Nov 2022 11:24:13 +0000 (13:24 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 Nov 2022 07:36:35 +0000 (08:36 +0100)
commitb7d604cae8f6edde53ac8aa9038ee154be562eb5
tree3364fbe4f52ae0681cb0607e0e7033a7d0ac6d3b
parentbfc4068e1e55e30a86f0e82e15163a60f99a894d
nvme-auth: don't keep long lived 4k dhchap buffer

dhchap structure is per-queue, it is wasteful to keep it for the entire
lifetime of the queue. Allocate it dynamically and get rid of it after
authentication. We don't need kzalloc because all accessors are clearing
it before writing to it.

Also, remove redundant chap buf_size which is always 4096, use a define
instead.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/auth.c