]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: replace kstrndup() with kmemdup_nul()
authorChen Zhou <chenzhou10@huawei.com>
Fri, 8 May 2020 11:59:06 +0000 (19:59 +0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 27 May 2020 05:12:36 +0000 (07:12 +0200)
commit139cb113bc8fb7edab948776889b7707a25d816f
treea48707b70b820add97541e3e3f4fe87b161c4150
parent0823c7dffb8b254c28aa6fa759827c16c2540d19
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>
drivers/nvme/target/configfs.c