diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-05-19 16:22:53 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-05-22 22:58:26 -0400 |
commit | fcc31cb6f1ae6c4e64a463b124d3c2e9cbd7dd70 (patch) | |
tree | cf4b73bc9d8d5e71e71b76d69550a70f58fb8278 /fs/cifs/cifssmb.c | |
parent | 2c8f981d93f830c167c811f046b5107cc24b6e1b (diff) |
cifs: make cifs_send_async take a kvec array
We'll need this for async writes, so convert the call to take a kvec
array. CIFSSMBEcho is changed to put a kvec on the stack and pass
in the SMB buffer using that.
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 83df937b814e..8791c74575d9 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -725,6 +725,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server) | |||
725 | { | 725 | { |
726 | ECHO_REQ *smb; | 726 | ECHO_REQ *smb; |
727 | int rc = 0; | 727 | int rc = 0; |
728 | struct kvec iov; | ||
728 | 729 | ||
729 | cFYI(1, "In echo request"); | 730 | cFYI(1, "In echo request"); |
730 | 731 | ||
@@ -739,9 +740,10 @@ CIFSSMBEcho(struct TCP_Server_Info *server) | |||
739 | put_bcc(1, &smb->hdr); | 740 | put_bcc(1, &smb->hdr); |
740 | smb->Data[0] = 'a'; | 741 | smb->Data[0] = 'a'; |
741 | inc_rfc1001_len(smb, 3); | 742 | inc_rfc1001_len(smb, 3); |
743 | iov.iov_base = smb; | ||
744 | iov.iov_len = be32_to_cpu(smb->hdr.smb_buf_length) + 4; | ||
742 | 745 | ||
743 | rc = cifs_call_async(server, (struct smb_hdr *)smb, | 746 | rc = cifs_call_async(server, &iov, 1, cifs_echo_callback, server); |
744 | cifs_echo_callback, server); | ||
745 | if (rc) | 747 | if (rc) |
746 | cFYI(1, "Echo request failed: %d", rc); | 748 | cFYI(1, "Echo request failed: %d", rc); |
747 | 749 | ||