[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a4e6962a0809231333x48c1d4b8t1b18eae40cd148ee@mail.gmail.com>
Date: Tue, 23 Sep 2008 15:33:14 -0500
From: "Eric Van Hensbergen" <ericvh@...il.com>
To: "Abhishek Kulkarni" <kulkarni@...l.gov>
Cc: v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 9p bug fix: return non-zero error value in p9_put_data
Hey - first of all, sorry for the long delay on responding to this,
I've just gotten back to my patch queue.
On Tue, Sep 2, 2008 at 2:04 PM, Abhishek Kulkarni <kulkarni@...l.gov> wrote:
> Resubmitting my previous 9p bug fix patch that removes the bogus return
> value in p9_put_data which made every p9_client_write fail.
>
> Signed-off-by: Abhishek Kulkarni <kulkarni@...l.gov>
> ---
Please include the original description when resubmitting patches --
this will allow me to suck it into my tree more effectively.
>
> -static int
> +static void
> p9_put_data(struct cbuf *bufp, const char *data, int count,
> unsigned char **pdata)
> {
> *pdata = buf_alloc(bufp, count);
> memmove(*pdata, data, count);
> - return count;
> }
>
What happens if buf_alloc returns NULL?
Isn't the right behavior something more along the lines of:
static int
p9_put_data(struct cbuf *bufp, const char *data, int count,
unsigned char **pdata)
{
*pdata = buf_alloc(bufp, count);'
if(*pdata)
memmove(*pdata, data, count);
return 0;
else
return ENOMEM;
}
-eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists