diff options
-rw-r--r-- | include/net/9p/9p.h | 2 | ||||
-rw-r--r-- | net/9p/protocol.c | 9 | ||||
-rw-r--r-- | net/9p/trans_fd.c | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index d2c60c73619d..b77c1478c99f 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -56,9 +56,9 @@ enum p9_debug_flags { | |||
56 | P9_DEBUG_PKT = (1<<10), | 56 | P9_DEBUG_PKT = (1<<10), |
57 | }; | 57 | }; |
58 | 58 | ||
59 | #ifdef CONFIG_NET_9P_DEBUG | ||
59 | extern unsigned int p9_debug_level; | 60 | extern unsigned int p9_debug_level; |
60 | 61 | ||
61 | #ifdef CONFIG_NET_9P_DEBUG | ||
62 | #define P9_DPRINTK(level, format, arg...) \ | 62 | #define P9_DPRINTK(level, format, arg...) \ |
63 | do { \ | 63 | do { \ |
64 | if ((p9_debug_level & level) == level) {\ | 64 | if ((p9_debug_level & level) == level) {\ |
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 29be52439086..908e79faf48e 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -53,6 +53,7 @@ | |||
53 | static int | 53 | static int |
54 | p9pdu_writef(struct p9_fcall *pdu, int optional, const char *fmt, ...); | 54 | p9pdu_writef(struct p9_fcall *pdu, int optional, const char *fmt, ...); |
55 | 55 | ||
56 | #ifdef CONFIG_NET_9P_DEBUG | ||
56 | void | 57 | void |
57 | p9pdu_dump(int way, struct p9_fcall *pdu) | 58 | p9pdu_dump(int way, struct p9_fcall *pdu) |
58 | { | 59 | { |
@@ -81,6 +82,12 @@ p9pdu_dump(int way, struct p9_fcall *pdu) | |||
81 | else | 82 | else |
82 | P9_DPRINTK(P9_DEBUG_PKT, "]]](%d) %s\n", datalen, buf); | 83 | P9_DPRINTK(P9_DEBUG_PKT, "]]](%d) %s\n", datalen, buf); |
83 | } | 84 | } |
85 | #else | ||
86 | void | ||
87 | p9pdu_dump(int way, struct p9_fcall *pdu) | ||
88 | { | ||
89 | } | ||
90 | #endif | ||
84 | EXPORT_SYMBOL(p9pdu_dump); | 91 | EXPORT_SYMBOL(p9pdu_dump); |
85 | 92 | ||
86 | void p9stat_free(struct p9_wstat *stbuf) | 93 | void p9stat_free(struct p9_wstat *stbuf) |
@@ -542,8 +549,10 @@ int p9pdu_finalize(struct p9_fcall *pdu) | |||
542 | err = p9pdu_writef(pdu, 0, "d", size); | 549 | err = p9pdu_writef(pdu, 0, "d", size); |
543 | pdu->size = size; | 550 | pdu->size = size; |
544 | 551 | ||
552 | #ifdef CONFIG_NET_9P_DEBUG | ||
545 | if ((p9_debug_level & P9_DEBUG_PKT) == P9_DEBUG_PKT) | 553 | if ((p9_debug_level & P9_DEBUG_PKT) == P9_DEBUG_PKT) |
546 | p9pdu_dump(0, pdu); | 554 | p9pdu_dump(0, pdu); |
555 | #endif | ||
547 | 556 | ||
548 | P9_DPRINTK(P9_DEBUG_9P, ">>> size=%d type: %d tag: %d\n", pdu->size, | 557 | P9_DPRINTK(P9_DEBUG_9P, ">>> size=%d type: %d tag: %d\n", pdu->size, |
549 | pdu->id, pdu->tag); | 558 | pdu->id, pdu->tag); |
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index be65d8242fd2..1df0356f242b 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c | |||
@@ -678,11 +678,9 @@ static int p9_fd_request(struct p9_client *client, struct p9_req_t *req) | |||
678 | 678 | ||
679 | static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req) | 679 | static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req) |
680 | { | 680 | { |
681 | struct p9_trans_fd *ts = client->trans; | ||
682 | struct p9_conn *m = ts->conn; | ||
683 | int ret = 1; | 681 | int ret = 1; |
684 | 682 | ||
685 | P9_DPRINTK(P9_DEBUG_TRANS, "mux %p req %p\n", m, req); | 683 | P9_DPRINTK(P9_DEBUG_TRANS, "client %p req %p\n", client, req); |
686 | 684 | ||
687 | spin_lock(&client->lock); | 685 | spin_lock(&client->lock); |
688 | list_del(&req->req_list); | 686 | list_del(&req->req_list); |