Skip to content

Commit

Permalink
CIFS: Setup async request in ops struct
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
piastry committed Jul 24, 2012
1 parent 25e2663 commit 4574084
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ struct smb_version_operations {
/* setup request: allocate mid, sign message */
int (*setup_request)(struct cifs_ses *, struct kvec *, unsigned int,
struct mid_q_entry **);
/* setup async request: allocate mid, sign message */
int (*setup_async_request)(struct TCP_Server_Info *, struct kvec *,
unsigned int, struct mid_q_entry **);
/* check response: verify signature, map error */
int (*check_receive)(struct mid_q_entry *, struct TCP_Server_Info *,
bool);
Expand Down
2 changes: 2 additions & 0 deletions fs/cifs/cifsproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
char *in_buf, int flags);
extern int cifs_setup_request(struct cifs_ses *, struct kvec *, unsigned int,
struct mid_q_entry **);
extern int cifs_setup_async_request(struct TCP_Server_Info *, struct kvec *,
unsigned int, struct mid_q_entry **);
extern int cifs_check_receive(struct mid_q_entry *mid,
struct TCP_Server_Info *server, bool log_error);
extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *,
Expand Down
1 change: 1 addition & 0 deletions fs/cifs/smb1ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ struct smb_version_operations smb1_operations = {
.send_cancel = send_nt_cancel,
.compare_fids = cifs_compare_fids,
.setup_request = cifs_setup_request,
.setup_async_request = cifs_setup_async_request,
.check_receive = cifs_check_receive,
.add_credits = cifs_add_credits,
.set_credits = cifs_set_credits,
Expand Down
4 changes: 2 additions & 2 deletions fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
return 0;
}

static int
int
cifs_setup_async_request(struct TCP_Server_Info *server, struct kvec *iov,
unsigned int nvec, struct mid_q_entry **ret_mid)
{
Expand Down Expand Up @@ -391,7 +391,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
return rc;

mutex_lock(&server->srv_mutex);
rc = cifs_setup_async_request(server, iov, nvec, &mid);
rc = server->ops->setup_async_request(server, iov, nvec, &mid);
if (rc) {
mutex_unlock(&server->srv_mutex);
add_credits(server, 1, optype);
Expand Down

0 comments on commit 4574084

Please sign in to comment.