Skip to content

Commit 81e3d02

Browse files
Colin Ian Kinghubcapsc
authored andcommitted
orangefs: replace vmalloc and memset with vzalloc
Use vzalloc instead of the vmalloc, memset combo Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Mike Marshall <[email protected]>
1 parent c2676ef commit 81e3d02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/orangefs/devorangefs-req.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,10 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
463463
if (op->downcall.type != ORANGEFS_VFS_OP_READDIR)
464464
goto wakeup;
465465

466-
op->downcall.trailer_buf = vmalloc(op->downcall.trailer_size);
466+
op->downcall.trailer_buf = vzalloc(op->downcall.trailer_size);
467467
if (!op->downcall.trailer_buf)
468468
goto Enomem;
469469

470-
memset(op->downcall.trailer_buf, 0, op->downcall.trailer_size);
471470
if (!copy_from_iter_full(op->downcall.trailer_buf,
472471
op->downcall.trailer_size, iter)) {
473472
gossip_err("%s: failed to copy trailer.\n", __func__);

0 commit comments

Comments
 (0)