提交 1eb2f96d 编写于 作者: C Chen Zhou 提交者: J. Bruce Fields

sunrpc: use kmemdup_nul() in gssp_stringify()

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

According to doc:
"Note: Use kmemdup_nul() instead if the size is known exactly."
Signed-off-by: NChen Zhou <chenzhou10@huawei.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 c25bf185
......@@ -223,7 +223,7 @@ static int gssp_alloc_receive_pages(struct gssx_arg_accept_sec_context *arg)
static char *gssp_stringify(struct xdr_netobj *netobj)
{
return kstrndup(netobj->data, netobj->len, GFP_KERNEL);
return kmemdup_nul(netobj->data, netobj->len, GFP_KERNEL);
}
static void gssp_hostbased_service(char **principal)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册