Skip to content

Commit

Permalink
smb3: rename encryption_required to smb3_encryption_required
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
Steve French authored and Steve French committed May 27, 2018
1 parent 3fa9a54 commit 5a77e75
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions fs/cifs/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static const int smb2_req_struct_sizes[NUMBER_OF_SMB2_COMMANDS] = {
/* SMB2_OPLOCK_BREAK */ 24 /* BB this is 36 for LEASE_BREAK variant */
};

static int encryption_required(const struct cifs_tcon *tcon)
static int smb3_encryption_required(const struct cifs_tcon *tcon)
{
if (!tcon)
return 0;
Expand Down Expand Up @@ -145,7 +145,7 @@ smb2_hdr_assemble(struct smb2_sync_hdr *shdr, __le16 smb2_cmd,
shdr->Flags |= SMB2_FLAGS_DFS_OPERATIONS; */

if (tcon->ses && tcon->ses->server && tcon->ses->server->sign &&
!encryption_required(tcon))
!smb3_encryption_required(tcon))
shdr->Flags |= SMB2_FLAGS_SIGNED;
out:
return;
Expand Down Expand Up @@ -1403,7 +1403,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
return rc;
}

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

iov[0].iov_base = (char *)req;
Expand All @@ -1419,7 +1419,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,

/* 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 */
if ((ses->server->dialect == SMB311_PROT_ID) &&
!encryption_required(tcon))
!smb3_encryption_required(tcon))
req->sync_hdr.Flags |= SMB2_FLAGS_SIGNED;

rc = smb2_send_recv(xid, ses, iov, 2, &resp_buftype, flags, &rsp_iov);
Expand Down Expand Up @@ -1508,7 +1508,7 @@ SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon)
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

flags |= CIFS_NO_RESP;
Expand Down Expand Up @@ -1844,7 +1844,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

if (oparms->create_options & CREATE_OPTION_READONLY)
Expand Down Expand Up @@ -2027,7 +2027,7 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->CtlCode = cpu_to_le32(opcode);
Expand Down Expand Up @@ -2185,7 +2185,7 @@ SMB2_close_flags(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->PersistentFileId = persistent_fid;
Expand Down Expand Up @@ -2300,7 +2300,7 @@ query_info(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->InfoType = info_type;
Expand Down Expand Up @@ -2544,7 +2544,7 @@ SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->PersistentFileId = persistent_fid;
Expand Down Expand Up @@ -2768,7 +2768,7 @@ smb2_async_readv(struct cifs_readdata *rdata)
return rc;
}

if (encryption_required(io_parms.tcon))
if (smb3_encryption_required(io_parms.tcon))
flags |= CIFS_TRANSFORM_REQ;

req_len = cpu_to_be32(total_len);
Expand Down Expand Up @@ -2824,7 +2824,7 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
if (rc)
return rc;

if (encryption_required(io_parms->tcon))
if (smb3_encryption_required(io_parms->tcon))
flags |= CIFS_TRANSFORM_REQ;

iov[0].iov_base = (char *)req;
Expand Down Expand Up @@ -2960,7 +2960,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
goto async_writev_out;
}

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

shdr = (struct smb2_sync_hdr *)req;
Expand Down Expand Up @@ -3098,7 +3098,7 @@ SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms,
if (io_parms->tcon->ses->server == NULL)
return -ECONNABORTED;

if (encryption_required(io_parms->tcon))
if (smb3_encryption_required(io_parms->tcon))
flags |= CIFS_TRANSFORM_REQ;

req->sync_hdr.ProcessId = cpu_to_le32(io_parms->pid);
Expand Down Expand Up @@ -3208,7 +3208,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

switch (srch_inf->info_level) {
Expand Down Expand Up @@ -3341,7 +3341,7 @@ send_set_info(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->sync_hdr.ProcessId = cpu_to_le32(pid);
Expand Down Expand Up @@ -3536,7 +3536,7 @@ SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->VolatileFid = volatile_fid;
Expand Down Expand Up @@ -3628,7 +3628,7 @@ SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

rc = smb2_send_recv(xid, ses, &iov, 1, &resp_buftype, flags, &rsp_iov);
Expand Down Expand Up @@ -3686,7 +3686,7 @@ SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

rc = smb2_send_recv(xid, ses, &iov, 1, &resp_buftype, flags, &rsp_iov);
Expand Down Expand Up @@ -3743,7 +3743,7 @@ smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->sync_hdr.ProcessId = cpu_to_le32(pid);
Expand Down Expand Up @@ -3807,7 +3807,7 @@ SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;

if (encryption_required(tcon))
if (smb3_encryption_required(tcon))
flags |= CIFS_TRANSFORM_REQ;

req->sync_hdr.CreditRequest = cpu_to_le16(1);
Expand Down

0 comments on commit 5a77e75

Please sign in to comment.