提交 81e3d025 编写于 作者: C Colin Ian King 提交者: Mike Marshall

orangefs: replace vmalloc and memset with vzalloc

Use vzalloc instead of the vmalloc, memset combo
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 c2676ef8
......@@ -463,11 +463,10 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
if (op->downcall.type != ORANGEFS_VFS_OP_READDIR)
goto wakeup;
op->downcall.trailer_buf = vmalloc(op->downcall.trailer_size);
op->downcall.trailer_buf = vzalloc(op->downcall.trailer_size);
if (!op->downcall.trailer_buf)
goto Enomem;
memset(op->downcall.trailer_buf, 0, op->downcall.trailer_size);
if (!copy_from_iter_full(op->downcall.trailer_buf,
op->downcall.trailer_size, iter)) {
gossip_err("%s: failed to copy trailer.\n", __func__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册