nvmet: replace kstrndup() with kmemdup_nul()

It is more efficient to use kmemdup_nul() if the size is known exactly.

The doc in kernel:
"Note: Use kmemdup_nul() instead if the size is known exactly."

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Chen Zhou 2020-05-08 19:59:06 +08:00 • committed by Christoph Hellwig
commit 09bb8986c9