aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Bortoli <tomasbortoli@gmail.com>2018-09-03 12:03:21 -0400
committerDominique Martinet <dominique.martinet@cea.fr>2018-09-07 12:40:04 -0400
commit6d35190f395316916c8bb4aabd35a182890bf856 (patch)
treea7d11d6911f4af00bf7a53d2080b47cabc935348
parent426d5a0f9733ecc2c4d7b252672fa8b1970d1c91 (diff)
9p: Rename req to rreq in trans_fd
In struct p9_conn, rename req to rreq as it is used by the read routine. Link: http://lkml.kernel.org/r/20180903160321.2181-1-tomasbortoli@gmail.com Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> Suggested-by: Jun Piao <piaojun@huawei.com> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
-rw-r--r--net/9p/trans_fd.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index aca528722183..12559c474dde 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -131,7 +131,7 @@ struct p9_conn {
131 int err; 131 int err;
132 struct list_head req_list; 132 struct list_head req_list;
133 struct list_head unsent_req_list; 133 struct list_head unsent_req_list;
134 struct p9_req_t *req; 134 struct p9_req_t *rreq;
135 struct p9_req_t *wreq; 135 struct p9_req_t *wreq;
136 char tmp_buf[7]; 136 char tmp_buf[7];
137 struct p9_fcall rc; 137 struct p9_fcall rc;
@@ -323,7 +323,7 @@ static void p9_read_work(struct work_struct *work)
323 m->rc.offset += err; 323 m->rc.offset += err;
324 324
325 /* header read in */ 325 /* header read in */
326 if ((!m->req) && (m->rc.offset == m->rc.capacity)) { 326 if ((!m->rreq) && (m->rc.offset == m->rc.capacity)) {
327 p9_debug(P9_DEBUG_TRANS, "got new header\n"); 327 p9_debug(P9_DEBUG_TRANS, "got new header\n");
328 328
329 /* Header size */ 329 /* Header size */
@@ -347,23 +347,23 @@ static void p9_read_work(struct work_struct *work)
347 "mux %p pkt: size: %d bytes tag: %d\n", 347 "mux %p pkt: size: %d bytes tag: %d\n",
348 m, m->rc.size, m->rc.tag); 348 m, m->rc.size, m->rc.tag);
349 349
350 m->req = p9_tag_lookup(m->client, m->rc.tag); 350 m->rreq = p9_tag_lookup(m->client, m->rc.tag);
351 if (!m->req || (m->req->status != REQ_STATUS_SENT)) { 351 if (!m->rreq || (m->rreq->status != REQ_STATUS_SENT)) {
352 p9_debug(P9_DEBUG_ERROR, "Unexpected packet tag %d\n", 352 p9_debug(P9_DEBUG_ERROR, "Unexpected packet tag %d\n",
353 m->rc.tag); 353 m->rc.tag);
354 err = -EIO; 354 err = -EIO;
355 goto error; 355 goto error;
356 } 356 }
357 357
358 if (!m->req->rc.sdata) { 358 if (!m->rreq->rc.sdata) {
359 p9_debug(P9_DEBUG_ERROR, 359 p9_debug(P9_DEBUG_ERROR,
360 "No recv fcall for tag %d (req %p), disconnecting!\n", 360 "No recv fcall for tag %d (req %p), disconnecting!\n",
361 m->rc.tag, m->req); 361 m->rc.tag, m->rreq);
362 m->req = NULL; 362 m->rreq = NULL;
363 err = -EIO; 363 err = -EIO;
364 goto error; 364 goto error;
365 } 365 }
366 m->rc.sdata = m->req->rc.sdata; 366 m->rc.sdata = m->rreq->rc.sdata;
367 memcpy(m->rc.sdata, m->tmp_buf, m->rc.capacity); 367 memcpy(m->rc.sdata, m->tmp_buf, m->rc.capacity);
368 m->rc.capacity = m->rc.size; 368 m->rc.capacity = m->rc.size;
369 } 369 }
@@ -371,21 +371,21 @@ static void p9_read_work(struct work_struct *work)
371 /* packet is read in 371 /* packet is read in
372 * not an else because some packets (like clunk) have no payload 372 * not an else because some packets (like clunk) have no payload
373 */ 373 */
374 if ((m->req) && (m->rc.offset == m->rc.capacity)) { 374 if ((m->rreq) && (m->rc.offset == m->rc.capacity)) {
375 p9_debug(P9_DEBUG_TRANS, "got new packet\n"); 375 p9_debug(P9_DEBUG_TRANS, "got new packet\n");
376 m->req->rc.size = m->rc.offset; 376 m->rreq->rc.size = m->rc.offset;
377 spin_lock(&m->client->lock); 377 spin_lock(&m->client->lock);
378 if (m->req->status != REQ_STATUS_ERROR) 378 if (m->rreq->status != REQ_STATUS_ERROR)
379 status = REQ_STATUS_RCVD; 379 status = REQ_STATUS_RCVD;
380 list_del(&m->req->req_list); 380 list_del(&m->rreq->req_list);
381 /* update req->status while holding client->lock */ 381 /* update req->status while holding client->lock */
382 p9_client_cb(m->client, m->req, status); 382 p9_client_cb(m->client, m->rreq, status);
383 spin_unlock(&m->client->lock); 383 spin_unlock(&m->client->lock);
384 m->rc.sdata = NULL; 384 m->rc.sdata = NULL;
385 m->rc.offset = 0; 385 m->rc.offset = 0;
386 m->rc.capacity = 0; 386 m->rc.capacity = 0;
387 p9_req_put(m->req); 387 p9_req_put(m->rreq);
388 m->req = NULL; 388 m->rreq = NULL;
389 } 389 }
390 390
391end_clear: 391end_clear: