@@ -2524,9 +2524,9 @@ create_query_id_buf(void)
/* See MS-SMB2 2.2.13.2.9 */
static int
-add_query_id_context(struct kvec *iov, unsigned int *num_iovec)
+add_query_id_context(struct smb2_create_req *req,
+ struct kvec *iov, unsigned int *num_iovec)
{
- struct smb2_create_req *req = iov[0].iov_base;
unsigned int num = *num_iovec;
iov[num].iov_base = create_query_id_buf();
@@ -2922,7 +2922,7 @@ SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
(struct create_context *)iov[n_iov-1].iov_base;
ccontext->Next = cpu_to_le32(iov[n_iov-1].iov_len);
}
- add_query_id_context(iov, &n_iov);
+ add_query_id_context(req, iov, &n_iov);
rqst->rq_nvec = n_iov;
return 0;
We have the correctly-typed struct smb2_create_req * available in the caller. Signed-off-by: Volker Lendecke <vl@samba.org> --- fs/cifs/smb2pdu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)