Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437869

Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0)

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0)
Date 2016-07-06 19:50 +0200
Message-ID <rRZ7s-3Lq-3@gated-at.bofh.it> (permalink)
References <rRV3P-1jb-15@gated-at.bofh.it> <rRYO5-3Ee-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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);

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0) weiyj_lk@163.com - 2016-07-06 15:30 +0200
  Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0) Mike Marshall <hubcap@omnibond.com> - 2016-07-06 19:30 +0200
    Re: [PATCH -next] orangefs: use vzalloc() instead of  vmalloc()/memset(0) Joe Perches <joe@perches.com> - 2016-07-06 19:50 +0200
      Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0) Mike Marshall <hubcap@omnibond.com> - 2016-07-06 20:10 +0200
        Re: [PATCH -next] orangefs: use vzalloc() instead of  vmalloc()/memset(0) Joe Perches <joe@perches.com> - 2016-07-06 20:20 +0200
          Re: [PATCH -next] orangefs: use vzalloc() instead of vmalloc()/memset(0) Mike Marshall <hubcap@omnibond.com> - 2016-07-06 21:10 +0200

csiph-web