nvme-fc: Ensure private pointers are NULL if no data
authorJames Smart <jsmart2021@gmail.com>
Tue, 31 Mar 2020 16:49:50 +0000 (09:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:18:33 +0000 (16:18 -0600)
commitf56bf76f79f3dc15f17433dda1b567d34f18e699
tree2995bba623452667df8340e2f439e1ac310ea492
parent3b8281b02bdc6fc7bed6f20af6fd7933a86b94e2
nvme-fc: Ensure private pointers are NULL if no data

Ensure that when allocations are done, and the lldd options indicate
no private data is needed, that private pointers will be set to NULL
(catches driver error that forgot to set private data size).

Slightly reorg the allocations so that private data follows allocations
for LS request/response buffers. Ensures better alignments for the buffers
as well as the private pointer.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c
drivers/nvme/target/fc.c