summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-05-19 16:22:53 -0400
committerSteve French <sfrench@us.ibm.com>2011-05-23 02:58:26 +0000
commitfcc31cb6f1ae6c4e64a463b124d3c2e9cbd7dd70 (patch)
treecf4b73bc9d8d5e71e71b76d69550a70f58fb8278 /fs/cifs/cifssmb.c
parent2c8f981d93f830c167c811f046b5107cc24b6e1b (diff)
downloadlinux-stable-fcc31cb6f1ae6c4e64a463b124d3c2e9cbd7dd70.tar.gz
linux-stable-fcc31cb6f1ae6c4e64a463b124d3c2e9cbd7dd70.tar.bz2
linux-stable-fcc31cb6f1ae6c4e64a463b124d3c2e9cbd7dd70.zip
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.c6
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)
{
ECHO_REQ *smb;
int rc = 0;
+ struct kvec iov;
cFYI(1, "In echo request");
@@ -739,9 +740,10 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
put_bcc(1, &smb->hdr);
smb->Data[0] = 'a';
inc_rfc1001_len(smb, 3);
+ iov.iov_base = smb;
+ iov.iov_len = be32_to_cpu(smb->hdr.smb_buf_length) + 4;
- rc = cifs_call_async(server, (struct smb_hdr *)smb,
- cifs_echo_callback, server);
+ rc = cifs_call_async(server, &iov, 1, cifs_echo_callback, server);
if (rc)
cFYI(1, "Echo request failed: %d", rc);