···6767 spin_unlock(&GlobalMid_Lock);6868}69697070-struct cifsSesInfo *7070+struct cifs_ses *7171sesInfoAlloc(void)7272{7373- struct cifsSesInfo *ret_buf;7373+ struct cifs_ses *ret_buf;74747575- ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL);7575+ ret_buf = kzalloc(sizeof(struct cifs_ses), GFP_KERNEL);7676 if (ret_buf) {7777 atomic_inc(&sesInfoAllocCount);7878 ret_buf->status = CifsNew;···8585}86868787void8888-sesInfoFree(struct cifsSesInfo *buf_to_free)8888+sesInfoFree(struct cifs_ses *buf_to_free)8989{9090 if (buf_to_free == NULL) {9191 cFYI(1, "Null buffer passed to sesInfoFree");···105105 kfree(buf_to_free);106106}107107108108-struct cifsTconInfo *108108+struct cifs_tcon *109109tconInfoAlloc(void)110110{111111- struct cifsTconInfo *ret_buf;112112- ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL);111111+ struct cifs_tcon *ret_buf;112112+ ret_buf = kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL);113113 if (ret_buf) {114114 atomic_inc(&tconInfoAllocCount);115115 ret_buf->tidStatus = CifsNew;···124124}125125126126void127127-tconInfoFree(struct cifsTconInfo *buf_to_free)127127+tconInfoFree(struct cifs_tcon *buf_to_free)128128{129129 if (buf_to_free == NULL) {130130 cFYI(1, "Null buffer passed to tconInfoFree");···295295 case it is responsbility of caller to set the mid */296296void297297header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,298298- const struct cifsTconInfo *treeCon, int word_count298298+ const struct cifs_tcon *treeCon, int word_count299299 /* length of fixed section (word count) in two byte units */)300300{301301 struct list_head *temp_item;302302- struct cifsSesInfo *ses;302302+ struct cifs_ses *ses;303303 char *temp = (char *) buffer;304304305305 memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */···359359 "did not match tcon uid");360360 spin_lock(&cifs_tcp_ses_lock);361361 list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {362362- ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list);362362+ ses = list_entry(temp_item, struct cifs_ses, smb_ses_list);363363 if (ses->linux_uid == current_fsuid()) {364364 if (ses->server == treeCon->ses->server) {365365 cFYI(1, "found matching uid substitute right smb_uid");···380380 if (treeCon->nocase)381381 buffer->Flags |= SMBFLG_CASELESS;382382 if ((treeCon->ses) && (treeCon->ses->server))383383- if (treeCon->ses->server->secMode &383383+ if (treeCon->ses->server->sec_mode &384384 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))385385 buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;386386 }···507507{508508 struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;509509 struct list_head *tmp, *tmp1, *tmp2;510510- struct cifsSesInfo *ses;511511- struct cifsTconInfo *tcon;510510+ struct cifs_ses *ses;511511+ struct cifs_tcon *tcon;512512 struct cifsInodeInfo *pCifsInode;513513 struct cifsFileInfo *netfile;514514···566566 /* look up tcon based on tid & uid */567567 spin_lock(&cifs_tcp_ses_lock);568568 list_for_each(tmp, &srv->smb_ses_list) {569569- ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list);569569+ ses = list_entry(tmp, struct cifs_ses, smb_ses_list);570570 list_for_each(tmp1, &ses->tcon_list) {571571- tcon = list_entry(tmp1, struct cifsTconInfo, tcon_list);571571+ tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);572572 if (tcon->tid != buf->Tid)573573 continue;574574
+4-4
fs/cifs/readdir.c
···195195 int len;196196 int oplock = 0;197197 int rc;198198- struct cifsTconInfo *ptcon = cifs_sb_tcon(cifs_sb);198198+ struct cifs_tcon *ptcon = cifs_sb_tcon(cifs_sb);199199 char *tmpbuffer;200200201201 rc = CIFSSMBOpen(xid, ptcon, full_path, FILE_OPEN, GENERIC_READ,···223223 struct cifsFileInfo *cifsFile;224224 struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);225225 struct tcon_link *tlink = NULL;226226- struct cifsTconInfo *pTcon;226226+ struct cifs_tcon *pTcon;227227228228 if (file->private_data == NULL) {229229 tlink = cifs_sb_tlink(cifs_sb);···496496 assume that they are located in the findfirst return buffer.*/497497/* We start counting in the buffer with entry 2 and increment for every498498 entry (do not increment for . or .. entry) */499499-static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,499499+static int find_cifs_entry(const int xid, struct cifs_tcon *pTcon,500500 struct file *file, char **ppCurrentEntry, int *num_to_ret)501501{502502 int rc = 0;···764764{765765 int rc = 0;766766 int xid, i;767767- struct cifsTconInfo *pTcon;767767+ struct cifs_tcon *pTcon;768768 struct cifsFileInfo *cifsFile = NULL;769769 char *current_entry;770770 int num_to_fill = 0;
+21-21
fs/cifs/sess.c
···3737 * the socket has been reestablished (so we know whether to use vc 0).3838 * Called while holding the cifs_tcp_ses_lock, so do not block3939 */4040-static bool is_first_ses_reconnect(struct cifsSesInfo *ses)4040+static bool is_first_ses_reconnect(struct cifs_ses *ses)4141{4242 struct list_head *tmp;4343- struct cifsSesInfo *tmp_ses;4343+ struct cifs_ses *tmp_ses;44444545 list_for_each(tmp, &ses->server->smb_ses_list) {4646- tmp_ses = list_entry(tmp, struct cifsSesInfo,4646+ tmp_ses = list_entry(tmp, struct cifs_ses,4747 smb_ses_list);4848 if (tmp_ses->need_reconnect == false)4949 return false;···6161 * any vc but zero (some servers reset the connection on vcnum zero)6262 *6363 */6464-static __le16 get_next_vcnum(struct cifsSesInfo *ses)6464+static __le16 get_next_vcnum(struct cifs_ses *ses)6565{6666 __u16 vcnum = 0;6767 struct list_head *tmp;6868- struct cifsSesInfo *tmp_ses;6868+ struct cifs_ses *tmp_ses;6969 __u16 max_vcs = ses->server->max_vcs;7070 __u16 i;7171 int free_vc_found = 0;···8787 free_vc_found = 1;88888989 list_for_each(tmp, &ses->server->smb_ses_list) {9090- tmp_ses = list_entry(tmp, struct cifsSesInfo,9090+ tmp_ses = list_entry(tmp, struct cifs_ses,9191 smb_ses_list);9292 if (tmp_ses->vcnum == i) {9393 free_vc_found = 0;···114114 return cpu_to_le16(vcnum);115115}116116117117-static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)117117+static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB)118118{119119 __u32 capabilities = 0;120120···136136 capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |137137 CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;138138139139- if (ses->server->secMode &139139+ if (ses->server->sec_mode &140140 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))141141 pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;142142···181181 *pbcc_area = bcc_ptr;182182}183183184184-static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses,184184+static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,185185 const struct nls_table *nls_cp)186186{187187 char *bcc_ptr = *pbcc_area;···204204}205205206206207207-static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,207207+static void unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,208208 const struct nls_table *nls_cp)209209{210210 char *bcc_ptr = *pbcc_area;···236236 *pbcc_area = bcc_ptr;237237}238238239239-static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,239239+static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,240240 const struct nls_table *nls_cp)241241{242242 char *bcc_ptr = *pbcc_area;···276276}277277278278static void279279-decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,279279+decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,280280 const struct nls_table *nls_cp)281281{282282 int len;···310310}311311312312static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,313313- struct cifsSesInfo *ses,313313+ struct cifs_ses *ses,314314 const struct nls_table *nls_cp)315315{316316 int rc = 0;···364364}365365366366static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,367367- struct cifsSesInfo *ses)367367+ struct cifs_ses *ses)368368{369369 unsigned int tioffset; /* challenge message target info area */370370 unsigned int tilen; /* challenge message target info area length */···411411/* We do not malloc the blob, it is passed in pbuffer, because412412 it is fixed size, and small, making this approach cleaner */413413static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,414414- struct cifsSesInfo *ses)414414+ struct cifs_ses *ses)415415{416416 NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer;417417 __u32 flags;···424424 flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET |425425 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |426426 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;427427- if (ses->server->secMode &427427+ if (ses->server->sec_mode &428428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {429429 flags |= NTLMSSP_NEGOTIATE_SIGN;430430 if (!ses->server->session_estab)···449449 This function returns the length of the data in the blob */450450static int build_ntlmssp_auth_blob(unsigned char *pbuffer,451451 u16 *buflen,452452- struct cifsSesInfo *ses,452452+ struct cifs_ses *ses,453453 const struct nls_table *nls_cp)454454{455455 int rc;···464464 NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO |465465 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |466466 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;467467- if (ses->server->secMode &467467+ if (ses->server->sec_mode &468468 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))469469 flags |= NTLMSSP_NEGOTIATE_SIGN;470470- if (ses->server->secMode & SECMODE_SIGN_REQUIRED)470470+ if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED)471471 flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;472472473473 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE);···551551}552552553553int554554-CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses,554554+CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,555555 const struct nls_table *nls_cp)556556{557557 int rc = 0;···657657 */658658659659 rc = calc_lanman_hash(ses->password, ses->server->cryptkey,660660- ses->server->secMode & SECMODE_PW_ENCRYPT ?660660+ ses->server->sec_mode & SECMODE_PW_ENCRYPT ?661661 true : false, lnm_session_key);662662663663 ses->flags |= CIFS_SES_LANMAN;
+10-10
fs/cifs/transport.c
···295295 return 0;296296}297297298298-static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf,298298+static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf,299299 struct mid_q_entry **ppmidQ)300300{301301 if (ses->server->tcpStatus == CifsExiting) {···355355 return rc;356356357357 /* enable signing if server requires it */358358- if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))358358+ if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))359359 hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;360360361361 mutex_lock(&server->srv_mutex);···409409 *410410 */411411int412412-SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses,412412+SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,413413 struct smb_hdr *in_buf, int flags)414414{415415 int rc;···504504 min_t(u32, 92, be32_to_cpu(mid->resp_buf->smb_buf_length)));505505506506 /* convert the length into a more usable form */507507- if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {507507+ if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {508508 /* FIXME: add code to kill session */509509 if (cifs_verify_signature(mid->resp_buf, server,510510 mid->sequence_number + 1) != 0)···516516}517517518518int519519-SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,519519+SendReceive2(const unsigned int xid, struct cifs_ses *ses,520520 struct kvec *iov, int n_vec, int *pRespBufType /* ret */,521521 const int flags)522522{···645645}646646647647int648648-SendReceive(const unsigned int xid, struct cifsSesInfo *ses,648648+SendReceive(const unsigned int xid, struct cifs_ses *ses,649649 struct smb_hdr *in_buf, struct smb_hdr *out_buf,650650 int *pbytes_returned, const int long_op)651651{···761761 blocking lock to return. */762762763763static int764764-send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon,764764+send_lock_cancel(const unsigned int xid, struct cifs_tcon *tcon,765765 struct smb_hdr *in_buf,766766 struct smb_hdr *out_buf)767767{768768 int bytes_returned;769769- struct cifsSesInfo *ses = tcon->ses;769769+ struct cifs_ses *ses = tcon->ses;770770 LOCK_REQ *pSMB = (LOCK_REQ *)in_buf;771771772772 /* We just modify the current in_buf to change···783783}784784785785int786786-SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,786786+SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,787787 struct smb_hdr *in_buf, struct smb_hdr *out_buf,788788 int *pbytes_returned)789789{790790 int rc = 0;791791 int rstart = 0;792792 struct mid_q_entry *midQ;793793- struct cifsSesInfo *ses;793793+ struct cifs_ses *ses;794794795795 if (tcon == NULL || tcon->ses == NULL) {796796 cERROR(1, "Null smb session");