From: Joe Perches <joe@perches.com>
To: Mike Marshall <hubcap@omnibond.com>, weiyj_lk@163.com
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0)
Date: Wed, 06 Jul 2016 10:49:45 -0700 [thread overview]
Message-ID: <1467827385.8360.30.camel@perches.com> (raw)
In-Reply-To: <CAOg9mSStropnZ2LiOFgF6t1Tm3YBeR6eEE8d6m=+wORBVh8ugA@mail.gmail.com>
On Wed, 2016-07-06 at 13:28 -0400, Mike Marshall wrote:
> Wei...
>
> I have applied your patch and tested it, it seems good.
>
> The gossip statement still references vmalloc, I used
> "git commit --amend" to fix that for my test. I'll do the
> same when I push to kernel.org too, if you're OK with that,
> unless you want to fix it yourself and resend the patch...
Better still would be to remove the gossip_err() altogether
as v.alloc already does a dump_stack on OOM.
> > diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
[]
> > @@ -442,14 +442,12 @@ 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 == NULL) {
> > gossip_err("%s: failed trailer vmalloc.\n",
> > __func__);
> > goto Enomem;
> > }
> > - memset(op->downcall.trailer_buf, 0, op->downcall.trailer_size);
next prev parent reply other threads:[~2016-07-06 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 13:23 [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0) weiyj_lk
2016-07-06 17:28 ` Mike Marshall
2016-07-06 17:49 ` Joe Perches [this message]
2016-07-06 18:00 ` Mike Marshall
2016-07-06 18:11 ` Joe Perches
2016-07-06 19:01 ` Mike Marshall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467827385.8360.30.camel@perches.com \
--to=joe@perches.com \
--cc=hubcap@omnibond.com \
--cc=linux-kernel@vger.kernel.org \
--cc=weiyj_lk@163.com \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox