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>
---
net/9p/conv.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/net/9p/conv.c b/net/9p/conv.c
index 4454720..08ec35a 100644
--- a/net/9p/conv.c
+++ b/net/9p/conv.c
@@ -446,13 +446,12 @@ p9_put_str(struct cbuf *bufp, char *data, struct
p9_str *str)
}
}
-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;
}
static int
@@ -851,7 +850,7 @@ EXPORT_SYMBOL(p9_create_tread);
struct p9_fcall *p9_create_twrite(u32 fid, u64 offset, u32 count,
const char *data)
{
- int size, err;
+ int size;
struct p9_fcall *fc;
struct cbuf buffer;
struct cbuf *bufp = &buffer;
@@ -865,12 +864,7 @@ struct p9_fcall *p9_create_twrite(u32 fid, u64
offset, u32 count,
p9_put_int32(bufp, fid, &fc->params.twrite.fid);
p9_put_int64(bufp, offset, &fc->params.twrite.offset);
p9_put_int32(bufp, count, &fc->params.twrite.count);
- err = p9_put_data(bufp, data, count, &fc->params.twrite.data);
- if (err) {
- kfree(fc);
- fc = ERR_PTR(err);
- goto error;
- }
+ p9_put_data(bufp, data, count, &fc->params.twrite.data);
if (buf_check_overflow(bufp)) {
kfree(fc);
--
1.5.4.3
On Thu, 2008-08-28 at 12:35 -0600, Abhishek Kulkarni wrote:
--