Skip to content

Commit 60ff779

Browse files
Andi Shytidavem330
authored andcommitted
9p: client: remove unused code and any reference to "cancelled" function
This patch reverts commit 80b4526 which was implementing a 'cancelled' functionality to notify that a cancelled request will not be replied. This implementation was not used anywhere and therefore removed. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4ce1fd6 commit 60ff779

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

‎include/net/9p/transport.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
* @close: member function to discard a connection on this transport
4141
* @request: member function to issue a request to the transport
4242
* @cancel: member function to cancel a request (if it hasn't been sent)
43-
* @cancelled: member function to notify that a cancelled request will not
44-
* not receive a reply
4543
*
4644
* This is the basic API for a transport module which is registered by the
4745
* transport module with the 9P core network module and used by the client
@@ -60,7 +58,6 @@ struct p9_trans_module {
6058
void (*close) (struct p9_client *);
6159
int (*request) (struct p9_client *, struct p9_req_t *req);
6260
int (*cancel) (struct p9_client *, struct p9_req_t *req);
63-
int (*cancelled)(struct p9_client *, struct p9_req_t *req);
6461
int (*zc_request)(struct p9_client *, struct p9_req_t *,
6562
char *, char *, int , int, int, int);
6663
};

‎net/9p/client.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -658,17 +658,12 @@ static int p9_client_flush(struct p9_client *c, struct p9_req_t *oldreq)
658658

659659
/*
660660
* if we haven't received a response for oldreq,
661-
* remove it from the list, and notify the transport
662-
* layer that the reply will never arrive.
661+
* remove it from the list
663662
*/
664-
spin_lock(&c->lock);
665663
if (oldreq->status == REQ_STATUS_FLSH) {
664+
spin_lock(&c->lock);
666665
list_del(&oldreq->req_list);
667666
spin_unlock(&c->lock);
668-
if (c->trans_mod->cancelled)
669-
c->trans_mod->cancelled(c, req);
670-
} else {
671-
spin_unlock(&c->lock);
672667
}
673668

674669
p9_free_req(c, req);

0 commit comments

Comments
 (0)