From: "Eric Van Hensbergen" <ericvh@gmail.com>
To: "Abhishek Kulkarni" <kulkarni@lanl.gov>
Cc: v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p bug fix: return non-zero error value in p9_put_data
Date: Tue, 23 Sep 2008 15:33:14 -0500 [thread overview]
Message-ID: <a4e6962a0809231333x48c1d4b8t1b18eae40cd148ee@mail.gmail.com> (raw)
In-Reply-To: <1220382298.14226.4.camel@blender>
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@lanl.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@lanl.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
prev parent reply other threads:[~2008-09-23 20:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 17:30 Abhishek Kulkarni
2008-08-26 18:53 ` [V9fs-developer] " Latchesar Ionkov
2008-08-28 18:10 ` Eric Van Hensbergen
2008-08-28 18:35 ` Abhishek Kulkarni
2008-09-02 19:04 ` Abhishek Kulkarni
2008-09-23 20:33 ` Eric Van Hensbergen [this message]
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=a4e6962a0809231333x48c1d4b8t1b18eae40cd148ee@mail.gmail.com \
--to=ericvh@gmail.com \
--cc=kulkarni@lanl.gov \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®