aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-09-18 19:20:34 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:30 -0400
commitbf5ea0e2f29b00d4fe5f203d8e59120f797ce451 (patch)
treeaddbc8640de6368c2f13aca0bdafa63a64b0c3b9 /fs/cifs/cifssmb.c
parent6fc05c25ca35e65ee1759dd803f23576a268f5ec (diff)
cifs: change signing routines to deal with smb_rqst structs
We need a way to represent a call to be sent on the wire that does not require having all of the page data kmapped. Behold the smb_rqst struct. This new struct represents an array of kvecs immediately followed by an array of pages. Convert the signing routines to use these structs under the hood and turn the existing functions for this into wrappers around that. For now, we're just changing these functions to take different args. Later, we'll teach them how to deal with arrays of pages. Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c4f43cf671dc..6786b5ee5326 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1541,6 +1541,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
1541 struct cifs_readdata *rdata = mid->callback_data; 1541 struct cifs_readdata *rdata = mid->callback_data;
1542 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); 1542 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink);
1543 struct TCP_Server_Info *server = tcon->ses->server; 1543 struct TCP_Server_Info *server = tcon->ses->server;
1544 struct smb_rqst rqst = { .rq_iov = rdata->iov,
1545 .rq_nvec = rdata->nr_iov };
1544 1546
1545 cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__, 1547 cFYI(1, "%s: mid=%llu state=%d result=%d bytes=%u", __func__,
1546 mid->mid, mid->mid_state, rdata->result, rdata->bytes); 1548 mid->mid, mid->mid_state, rdata->result, rdata->bytes);
@@ -1552,9 +1554,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
1552 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 1554 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
1553 int rc = 0; 1555 int rc = 0;
1554 1556
1555 rc = cifs_verify_signature(rdata->iov, rdata->nr_iov, 1557 rc = cifs_verify_signature(&rqst, server,
1556 server, 1558 mid->sequence_number + 1);
1557 mid->sequence_number + 1);
1558 if (rc) 1559 if (rc)
1559 cERROR(1, "SMB signature verification returned " 1560 cERROR(1, "SMB signature verification returned "
1560 "error = %d", rc); 1561 "error = %d", rc);