@@ -2285,10 +2285,10 @@ add_durable_reconnect_v2_context(struct kvec *iov, unsigned int *num_iovec,
}
static int
-add_durable_context(struct kvec *iov, unsigned int *num_iovec,
+add_durable_context(struct smb2_create_req *req,
+ struct kvec *iov, unsigned int *num_iovec,
struct cifs_open_parms *oparms, bool use_persistent)
{
- struct smb2_create_req *req = iov[0].iov_base;
unsigned int num = *num_iovec;
if (use_persistent) {
@@ -2849,7 +2849,7 @@ SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
cpu_to_le32(server->vals->create_lease_size);
}
- rc = add_durable_context(iov, &n_iov, oparms,
+ rc = add_durable_context(req, iov, &n_iov, oparms,
tcon->use_persistent);
if (rc)
return rc;
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(-)