summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-26 19:42:47 +0000
committerMike Marshall <hubcap@omnibond.com>2018-04-02 08:10:17 -0400
commit81e3d0253f87d369a1d957eb3173fd596126383c (patch)
tree5248677e2d0f3df505bc85bb3f8f70fa6b103746 /fs
parentc2676ef801f50cc759d205a89adbf733c798d052 (diff)
downloadlinux-stable-81e3d0253f87d369a1d957eb3173fd596126383c.tar.gz
linux-stable-81e3d0253f87d369a1d957eb3173fd596126383c.tar.bz2
linux-stable-81e3d0253f87d369a1d957eb3173fd596126383c.zip
orangefs: replace vmalloc and memset with vzalloc
Use vzalloc instead of the vmalloc, memset combo Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/orangefs/devorangefs-req.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index b03057afac2a..319cf9dcacdd 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -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__);