aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r--fs/cifs/misc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 907531ac5888..03a1f491d39b 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -67,12 +67,12 @@ _FreeXid(unsigned int xid)
67 spin_unlock(&GlobalMid_Lock); 67 spin_unlock(&GlobalMid_Lock);
68} 68}
69 69
70struct cifsSesInfo * 70struct cifs_ses *
71sesInfoAlloc(void) 71sesInfoAlloc(void)
72{ 72{
73 struct cifsSesInfo *ret_buf; 73 struct cifs_ses *ret_buf;
74 74
75 ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL); 75 ret_buf = kzalloc(sizeof(struct cifs_ses), GFP_KERNEL);
76 if (ret_buf) { 76 if (ret_buf) {
77 atomic_inc(&sesInfoAllocCount); 77 atomic_inc(&sesInfoAllocCount);
78 ret_buf->status = CifsNew; 78 ret_buf->status = CifsNew;
@@ -85,7 +85,7 @@ sesInfoAlloc(void)
85} 85}
86 86
87void 87void
88sesInfoFree(struct cifsSesInfo *buf_to_free) 88sesInfoFree(struct cifs_ses *buf_to_free)
89{ 89{
90 if (buf_to_free == NULL) { 90 if (buf_to_free == NULL) {
91 cFYI(1, "Null buffer passed to sesInfoFree"); 91 cFYI(1, "Null buffer passed to sesInfoFree");
@@ -105,11 +105,11 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
105 kfree(buf_to_free); 105 kfree(buf_to_free);
106} 106}
107 107
108struct cifsTconInfo * 108struct cifs_tcon *
109tconInfoAlloc(void) 109tconInfoAlloc(void)
110{ 110{
111 struct cifsTconInfo *ret_buf; 111 struct cifs_tcon *ret_buf;
112 ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL); 112 ret_buf = kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL);
113 if (ret_buf) { 113 if (ret_buf) {
114 atomic_inc(&tconInfoAllocCount); 114 atomic_inc(&tconInfoAllocCount);
115 ret_buf->tidStatus = CifsNew; 115 ret_buf->tidStatus = CifsNew;
@@ -124,7 +124,7 @@ tconInfoAlloc(void)
124} 124}
125 125
126void 126void
127tconInfoFree(struct cifsTconInfo *buf_to_free) 127tconInfoFree(struct cifs_tcon *buf_to_free)
128{ 128{
129 if (buf_to_free == NULL) { 129 if (buf_to_free == NULL) {
130 cFYI(1, "Null buffer passed to tconInfoFree"); 130 cFYI(1, "Null buffer passed to tconInfoFree");
@@ -295,11 +295,11 @@ __u16 GetNextMid(struct TCP_Server_Info *server)
295 case it is responsbility of caller to set the mid */ 295 case it is responsbility of caller to set the mid */
296void 296void
297header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , 297header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
298 const struct cifsTconInfo *treeCon, int word_count 298 const struct cifs_tcon *treeCon, int word_count
299 /* length of fixed section (word count) in two byte units */) 299 /* length of fixed section (word count) in two byte units */)
300{ 300{
301 struct list_head *temp_item; 301 struct list_head *temp_item;
302 struct cifsSesInfo *ses; 302 struct cifs_ses *ses;
303 char *temp = (char *) buffer; 303 char *temp = (char *) buffer;
304 304
305 memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */ 305 memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */
@@ -359,7 +359,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
359 "did not match tcon uid"); 359 "did not match tcon uid");
360 spin_lock(&cifs_tcp_ses_lock); 360 spin_lock(&cifs_tcp_ses_lock);
361 list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) { 361 list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {
362 ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list); 362 ses = list_entry(temp_item, struct cifs_ses, smb_ses_list);
363 if (ses->linux_uid == current_fsuid()) { 363 if (ses->linux_uid == current_fsuid()) {
364 if (ses->server == treeCon->ses->server) { 364 if (ses->server == treeCon->ses->server) {
365 cFYI(1, "found matching uid substitute right smb_uid"); 365 cFYI(1, "found matching uid substitute right smb_uid");
@@ -380,7 +380,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
380 if (treeCon->nocase) 380 if (treeCon->nocase)
381 buffer->Flags |= SMBFLG_CASELESS; 381 buffer->Flags |= SMBFLG_CASELESS;
382 if ((treeCon->ses) && (treeCon->ses->server)) 382 if ((treeCon->ses) && (treeCon->ses->server))
383 if (treeCon->ses->server->secMode & 383 if (treeCon->ses->server->sec_mode &
384 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 384 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
385 buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 385 buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
386 } 386 }
@@ -507,8 +507,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
507{ 507{
508 struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf; 508 struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;
509 struct list_head *tmp, *tmp1, *tmp2; 509 struct list_head *tmp, *tmp1, *tmp2;
510 struct cifsSesInfo *ses; 510 struct cifs_ses *ses;
511 struct cifsTconInfo *tcon; 511 struct cifs_tcon *tcon;
512 struct cifsInodeInfo *pCifsInode; 512 struct cifsInodeInfo *pCifsInode;
513 struct cifsFileInfo *netfile; 513 struct cifsFileInfo *netfile;
514 514
@@ -566,9 +566,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
566 /* look up tcon based on tid & uid */ 566 /* look up tcon based on tid & uid */
567 spin_lock(&cifs_tcp_ses_lock); 567 spin_lock(&cifs_tcp_ses_lock);
568 list_for_each(tmp, &srv->smb_ses_list) { 568 list_for_each(tmp, &srv->smb_ses_list) {
569 ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); 569 ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
570 list_for_each(tmp1, &ses->tcon_list) { 570 list_for_each(tmp1, &ses->tcon_list) {
571 tcon = list_entry(tmp1, struct cifsTconInfo, tcon_list); 571 tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
572 if (tcon->tid != buf->Tid) 572 if (tcon->tid != buf->Tid)
573 continue; 573 continue;
574 574