diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-07 10:43:36 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 10:43:36 +1100 |
commit | 6cb6524d90b6e5497e79a1474bdb2f26755d1c02 (patch) | |
tree | fd475ac8f57a6bd39c976056324d1bc79d11b4c9 /fs/9p/mux.c | |
parent | 837e9594fc3cb9a06bddd7ecf66151334a2e13d2 (diff) | |
parent | 410c05427a69f53851637ccb85c2212131409fbd (diff) | |
download | linux-6cb6524d90b6e5497e79a1474bdb2f26755d1c02.tar.gz linux-6cb6524d90b6e5497e79a1474bdb2f26755d1c02.tar.bz2 linux-6cb6524d90b6e5497e79a1474bdb2f26755d1c02.zip |
Merge ../linux-2.6
Diffstat (limited to 'fs/9p/mux.c')
-rw-r--r-- | fs/9p/mux.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/9p/mux.c b/fs/9p/mux.c index 945cb368d451..ea1134eb47c8 100644 --- a/fs/9p/mux.c +++ b/fs/9p/mux.c @@ -471,10 +471,13 @@ static void v9fs_write_work(void *a) } spin_lock(&m->lock); - req = - list_entry(m->unsent_req_list.next, struct v9fs_req, +again: + req = list_entry(m->unsent_req_list.next, struct v9fs_req, req_list); list_move_tail(&req->req_list, &m->req_list); + if (req->err == ERREQFLUSH) + goto again; + m->wbuf = req->tcall->sdata; m->wsize = req->tcall->size; m->wpos = 0; @@ -525,7 +528,7 @@ static void process_request(struct v9fs_mux_data *m, struct v9fs_req *req) struct v9fs_str *ename; tag = req->tag; - if (req->rcall->id == RERROR && !req->err) { + if (!req->err && req->rcall->id == RERROR) { ecode = req->rcall->params.rerror.errno; ename = &req->rcall->params.rerror.error; @@ -551,7 +554,10 @@ static void process_request(struct v9fs_mux_data *m, struct v9fs_req *req) req->err = -EIO; } - if (req->cb && req->err != ERREQFLUSH) { + if (req->err == ERREQFLUSH) + return; + + if (req->cb) { dprintk(DEBUG_MUX, "calling callback tcall %p rcall %p\n", req->tcall, req->rcall); @@ -812,6 +818,7 @@ v9fs_mux_rpc_cb(void *a, struct v9fs_fcall *tc, struct v9fs_fcall *rc, int err) struct v9fs_mux_rpc *r; if (err == ERREQFLUSH) { + kfree(rc); dprintk(DEBUG_MUX, "err req flush\n"); return; } |