diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-05-17 17:53:29 +0400 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2012-05-23 12:33:12 +0400 |
commit | 452757897a311b939ae202744754ffd9ce6704d8 (patch) | |
tree | 29f14cb0476af25d2bcd10883e0d612711462f29 /fs/cifs/transport.c | |
parent | 8aa26f3ed80ddbaf78804b6481fcfdbd447caa1c (diff) | |
download | op-kernel-dev-452757897a311b939ae202744754ffd9ce6704d8.zip op-kernel-dev-452757897a311b939ae202744754ffd9ce6704d8.tar.gz |
CIFS: Move add/set_credits and get_credits_field to ops structure
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 87bd998..1b36ffe 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -304,7 +304,8 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int optype, static int wait_for_free_request(struct TCP_Server_Info *server, const int optype) { - return wait_for_free_credits(server, optype, get_credits_field(server)); + return wait_for_free_credits(server, optype, + server->ops->get_credits_field(server)); } static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, @@ -396,7 +397,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, rc = cifs_setup_async_request(server, iov, nvec, &mid); if (rc) { mutex_unlock(&server->srv_mutex); - cifs_add_credits(server, 1); + add_credits(server, 1); wake_up(&server->request_q); return rc; } @@ -418,7 +419,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, return rc; out_err: delete_mid(mid); - cifs_add_credits(server, 1); + add_credits(server, 1); wake_up(&server->request_q); return rc; } @@ -582,7 +583,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses, mutex_unlock(&ses->server->srv_mutex); cifs_small_buf_release(buf); /* Update # of requests on wire to server */ - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } @@ -612,7 +613,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses, midQ->callback = DeleteMidQEntry; spin_unlock(&GlobalMid_Lock); cifs_small_buf_release(buf); - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } spin_unlock(&GlobalMid_Lock); @@ -622,7 +623,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses, rc = cifs_sync_mid_result(midQ, ses->server); if (rc != 0) { - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } @@ -648,7 +649,7 @@ SendReceive2(const unsigned int xid, struct cifs_ses *ses, midQ->resp_buf = NULL; out: delete_mid(midQ); - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } @@ -698,7 +699,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses, if (rc) { mutex_unlock(&ses->server->srv_mutex); /* Update # of requests on wire to server */ - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } @@ -730,7 +731,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses, /* no longer considered to be "in-flight" */ midQ->callback = DeleteMidQEntry; spin_unlock(&GlobalMid_Lock); - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } spin_unlock(&GlobalMid_Lock); @@ -738,7 +739,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses, rc = cifs_sync_mid_result(midQ, ses->server); if (rc != 0) { - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } @@ -754,7 +755,7 @@ SendReceive(const unsigned int xid, struct cifs_ses *ses, rc = cifs_check_receive(midQ, ses->server, 0); out: delete_mid(midQ); - cifs_add_credits(ses->server, 1); + add_credits(ses->server, 1); return rc; } |