aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cache.c6
-rw-r--r--fs/cifs/cifs_debug.c26
-rw-r--r--fs/cifs/cifs_dfs_ref.c2
-rw-r--r--fs/cifs/cifs_spnego.c2
-rw-r--r--fs/cifs/cifs_spnego.h2
-rw-r--r--fs/cifs/cifsacl.c4
-rw-r--r--fs/cifs/cifsencrypt.c14
-rw-r--r--fs/cifs/cifsfs.c6
-rw-r--r--fs/cifs/cifsglob.h22
-rw-r--r--fs/cifs/cifsproto.h152
-rw-r--r--fs/cifs/cifssmb.c166
-rw-r--r--fs/cifs/connect.c90
-rw-r--r--fs/cifs/dir.c8
-rw-r--r--fs/cifs/file.c28
-rw-r--r--fs/cifs/fscache.c6
-rw-r--r--fs/cifs/fscache.h8
-rw-r--r--fs/cifs/inode.c40
-rw-r--r--fs/cifs/ioctl.c2
-rw-r--r--fs/cifs/link.c12
-rw-r--r--fs/cifs/misc.c32
-rw-r--r--fs/cifs/readdir.c8
-rw-r--r--fs/cifs/sess.c42
-rw-r--r--fs/cifs/transport.c20
-rw-r--r--fs/cifs/xattr.c8
24 files changed, 353 insertions, 353 deletions
diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c
index 53d57a3fe427..dd8584d35a14 100644
--- a/fs/cifs/cache.c
+++ b/fs/cifs/cache.c
@@ -146,7 +146,7 @@ static char *extract_sharename(const char *treename)
146static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer, 146static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,
147 uint16_t maxbuf) 147 uint16_t maxbuf)
148{ 148{
149 const struct cifsTconInfo *tcon = cookie_netfs_data; 149 const struct cifs_tcon *tcon = cookie_netfs_data;
150 char *sharename; 150 char *sharename;
151 uint16_t len; 151 uint16_t len;
152 152
@@ -173,7 +173,7 @@ cifs_fscache_super_get_aux(const void *cookie_netfs_data, void *buffer,
173 uint16_t maxbuf) 173 uint16_t maxbuf)
174{ 174{
175 struct cifs_fscache_super_auxdata auxdata; 175 struct cifs_fscache_super_auxdata auxdata;
176 const struct cifsTconInfo *tcon = cookie_netfs_data; 176 const struct cifs_tcon *tcon = cookie_netfs_data;
177 177
178 memset(&auxdata, 0, sizeof(auxdata)); 178 memset(&auxdata, 0, sizeof(auxdata));
179 auxdata.resource_id = tcon->resource_id; 179 auxdata.resource_id = tcon->resource_id;
@@ -192,7 +192,7 @@ fscache_checkaux cifs_fscache_super_check_aux(void *cookie_netfs_data,
192 uint16_t datalen) 192 uint16_t datalen)
193{ 193{
194 struct cifs_fscache_super_auxdata auxdata; 194 struct cifs_fscache_super_auxdata auxdata;
195 const struct cifsTconInfo *tcon = cookie_netfs_data; 195 const struct cifs_tcon *tcon = cookie_netfs_data;
196 196
197 if (datalen != sizeof(auxdata)) 197 if (datalen != sizeof(auxdata))
198 return FSCACHE_CHECKAUX_OBSOLETE; 198 return FSCACHE_CHECKAUX_OBSOLETE;
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 18f4272d9047..2fe3cf13b2e9 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -110,8 +110,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
110 struct list_head *tmp1, *tmp2, *tmp3; 110 struct list_head *tmp1, *tmp2, *tmp3;
111 struct mid_q_entry *mid_entry; 111 struct mid_q_entry *mid_entry;
112 struct TCP_Server_Info *server; 112 struct TCP_Server_Info *server;
113 struct cifsSesInfo *ses; 113 struct cifs_ses *ses;
114 struct cifsTconInfo *tcon; 114 struct cifs_tcon *tcon;
115 int i, j; 115 int i, j;
116 __u32 dev_type; 116 __u32 dev_type;
117 117
@@ -152,7 +152,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
152 tcp_ses_list); 152 tcp_ses_list);
153 i++; 153 i++;
154 list_for_each(tmp2, &server->smb_ses_list) { 154 list_for_each(tmp2, &server->smb_ses_list) {
155 ses = list_entry(tmp2, struct cifsSesInfo, 155 ses = list_entry(tmp2, struct cifs_ses,
156 smb_ses_list); 156 smb_ses_list);
157 if ((ses->serverDomain == NULL) || 157 if ((ses->serverDomain == NULL) ||
158 (ses->serverOS == NULL) || 158 (ses->serverOS == NULL) ||
@@ -171,7 +171,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
171 seq_printf(m, "TCP status: %d\n\tLocal Users To " 171 seq_printf(m, "TCP status: %d\n\tLocal Users To "
172 "Server: %d SecMode: 0x%x Req On Wire: %d", 172 "Server: %d SecMode: 0x%x Req On Wire: %d",
173 server->tcpStatus, server->srv_count, 173 server->tcpStatus, server->srv_count,
174 server->secMode, 174 server->sec_mode,
175 atomic_read(&server->inFlight)); 175 atomic_read(&server->inFlight));
176 176
177#ifdef CONFIG_CIFS_STATS2 177#ifdef CONFIG_CIFS_STATS2
@@ -183,7 +183,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
183 seq_puts(m, "\n\tShares:"); 183 seq_puts(m, "\n\tShares:");
184 j = 0; 184 j = 0;
185 list_for_each(tmp3, &ses->tcon_list) { 185 list_for_each(tmp3, &ses->tcon_list) {
186 tcon = list_entry(tmp3, struct cifsTconInfo, 186 tcon = list_entry(tmp3, struct cifs_tcon,
187 tcon_list); 187 tcon_list);
188 ++j; 188 ++j;
189 dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType); 189 dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
@@ -256,8 +256,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
256 int rc; 256 int rc;
257 struct list_head *tmp1, *tmp2, *tmp3; 257 struct list_head *tmp1, *tmp2, *tmp3;
258 struct TCP_Server_Info *server; 258 struct TCP_Server_Info *server;
259 struct cifsSesInfo *ses; 259 struct cifs_ses *ses;
260 struct cifsTconInfo *tcon; 260 struct cifs_tcon *tcon;
261 261
262 rc = get_user(c, buffer); 262 rc = get_user(c, buffer);
263 if (rc) 263 if (rc)
@@ -273,11 +273,11 @@ static ssize_t cifs_stats_proc_write(struct file *file,
273 server = list_entry(tmp1, struct TCP_Server_Info, 273 server = list_entry(tmp1, struct TCP_Server_Info,
274 tcp_ses_list); 274 tcp_ses_list);
275 list_for_each(tmp2, &server->smb_ses_list) { 275 list_for_each(tmp2, &server->smb_ses_list) {
276 ses = list_entry(tmp2, struct cifsSesInfo, 276 ses = list_entry(tmp2, struct cifs_ses,
277 smb_ses_list); 277 smb_ses_list);
278 list_for_each(tmp3, &ses->tcon_list) { 278 list_for_each(tmp3, &ses->tcon_list) {
279 tcon = list_entry(tmp3, 279 tcon = list_entry(tmp3,
280 struct cifsTconInfo, 280 struct cifs_tcon,
281 tcon_list); 281 tcon_list);
282 atomic_set(&tcon->num_smbs_sent, 0); 282 atomic_set(&tcon->num_smbs_sent, 0);
283 atomic_set(&tcon->num_writes, 0); 283 atomic_set(&tcon->num_writes, 0);
@@ -312,8 +312,8 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
312 int i; 312 int i;
313 struct list_head *tmp1, *tmp2, *tmp3; 313 struct list_head *tmp1, *tmp2, *tmp3;
314 struct TCP_Server_Info *server; 314 struct TCP_Server_Info *server;
315 struct cifsSesInfo *ses; 315 struct cifs_ses *ses;
316 struct cifsTconInfo *tcon; 316 struct cifs_tcon *tcon;
317 317
318 seq_printf(m, 318 seq_printf(m,
319 "Resources in use\nCIFS Session: %d\n", 319 "Resources in use\nCIFS Session: %d\n",
@@ -346,11 +346,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
346 server = list_entry(tmp1, struct TCP_Server_Info, 346 server = list_entry(tmp1, struct TCP_Server_Info,
347 tcp_ses_list); 347 tcp_ses_list);
348 list_for_each(tmp2, &server->smb_ses_list) { 348 list_for_each(tmp2, &server->smb_ses_list) {
349 ses = list_entry(tmp2, struct cifsSesInfo, 349 ses = list_entry(tmp2, struct cifs_ses,
350 smb_ses_list); 350 smb_ses_list);
351 list_for_each(tmp3, &ses->tcon_list) { 351 list_for_each(tmp3, &ses->tcon_list) {
352 tcon = list_entry(tmp3, 352 tcon = list_entry(tmp3,
353 struct cifsTconInfo, 353 struct cifs_tcon,
354 tcon_list); 354 tcon_list);
355 i++; 355 i++;
356 seq_printf(m, "\n%d) %s", i, tcon->treeName); 356 seq_printf(m, "\n%d) %s", i, tcon->treeName);
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index 2b68ac57d97d..8d8f28c94c0f 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -272,7 +272,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
272 struct dfs_info3_param *referrals = NULL; 272 struct dfs_info3_param *referrals = NULL;
273 unsigned int num_referrals = 0; 273 unsigned int num_referrals = 0;
274 struct cifs_sb_info *cifs_sb; 274 struct cifs_sb_info *cifs_sb;
275 struct cifsSesInfo *ses; 275 struct cifs_ses *ses;
276 char *full_path; 276 char *full_path;
277 int xid, i; 277 int xid, i;
278 int rc; 278 int rc;
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 33d221394aca..2272fd5fe5b7 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -95,7 +95,7 @@ struct key_type cifs_spnego_key_type = {
95 95
96/* get a key struct with a SPNEGO security blob, suitable for session setup */ 96/* get a key struct with a SPNEGO security blob, suitable for session setup */
97struct key * 97struct key *
98cifs_get_spnego_key(struct cifsSesInfo *sesInfo) 98cifs_get_spnego_key(struct cifs_ses *sesInfo)
99{ 99{
100 struct TCP_Server_Info *server = sesInfo->server; 100 struct TCP_Server_Info *server = sesInfo->server;
101 struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr; 101 struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr;
diff --git a/fs/cifs/cifs_spnego.h b/fs/cifs/cifs_spnego.h
index e4041ec4d712..31bef9ee078b 100644
--- a/fs/cifs/cifs_spnego.h
+++ b/fs/cifs/cifs_spnego.h
@@ -41,7 +41,7 @@ struct cifs_spnego_msg {
41 41
42#ifdef __KERNEL__ 42#ifdef __KERNEL__
43extern struct key_type cifs_spnego_key_type; 43extern struct key_type cifs_spnego_key_type;
44extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo); 44extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo);
45#endif /* KERNEL */ 45#endif /* KERNEL */
46 46
47#endif /* _CIFS_SPNEGO_H */ 47#endif /* _CIFS_SPNEGO_H */
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index f3c6fb9942ac..076b69ceef7f 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -945,7 +945,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
945 int oplock = 0; 945 int oplock = 0;
946 int xid, rc; 946 int xid, rc;
947 __u16 fid; 947 __u16 fid;
948 struct cifsTconInfo *tcon; 948 struct cifs_tcon *tcon;
949 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); 949 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
950 950
951 if (IS_ERR(tlink)) 951 if (IS_ERR(tlink))
@@ -1013,7 +1013,7 @@ static int set_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, const char *path,
1013 int oplock = 0; 1013 int oplock = 0;
1014 int xid, rc; 1014 int xid, rc;
1015 __u16 fid; 1015 __u16 fid;
1016 struct cifsTconInfo *tcon; 1016 struct cifs_tcon *tcon;
1017 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); 1017 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
1018 1018
1019 if (IS_ERR(tlink)) 1019 if (IS_ERR(tlink))
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 45c3f78c8f81..dfbd9f1f373d 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -229,7 +229,7 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,
229} 229}
230 230
231/* first calculate 24 bytes ntlm response and then 16 byte session key */ 231/* first calculate 24 bytes ntlm response and then 16 byte session key */
232int setup_ntlm_response(struct cifsSesInfo *ses) 232int setup_ntlm_response(struct cifs_ses *ses)
233{ 233{
234 int rc = 0; 234 int rc = 0;
235 unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE; 235 unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE;
@@ -312,7 +312,7 @@ int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
312 * Allocate domain name which gets freed when session struct is deallocated. 312 * Allocate domain name which gets freed when session struct is deallocated.
313 */ 313 */
314static int 314static int
315build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp) 315build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp)
316{ 316{
317 unsigned int dlen; 317 unsigned int dlen;
318 unsigned int wlen; 318 unsigned int wlen;
@@ -400,7 +400,7 @@ build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
400 * about target string i.e. for some, just user name might suffice. 400 * about target string i.e. for some, just user name might suffice.
401 */ 401 */
402static int 402static int
403find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp) 403find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)
404{ 404{
405 unsigned int attrsize; 405 unsigned int attrsize;
406 unsigned int type; 406 unsigned int type;
@@ -445,7 +445,7 @@ find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
445 return 0; 445 return 0;
446} 446}
447 447
448static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash, 448static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
449 const struct nls_table *nls_cp) 449 const struct nls_table *nls_cp)
450{ 450{
451 int rc = 0; 451 int rc = 0;
@@ -527,7 +527,7 @@ calc_exit_2:
527} 527}
528 528
529static int 529static int
530CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash) 530CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash)
531{ 531{
532 int rc; 532 int rc;
533 unsigned int offset = CIFS_SESS_KEY_SIZE + 8; 533 unsigned int offset = CIFS_SESS_KEY_SIZE + 8;
@@ -563,7 +563,7 @@ CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash)
563 563
564 564
565int 565int
566setup_ntlmv2_rsp(struct cifsSesInfo *ses, const struct nls_table *nls_cp) 566setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
567{ 567{
568 int rc; 568 int rc;
569 int baselen; 569 int baselen;
@@ -649,7 +649,7 @@ setup_ntlmv2_rsp_ret:
649} 649}
650 650
651int 651int
652calc_seckey(struct cifsSesInfo *ses) 652calc_seckey(struct cifs_ses *ses)
653{ 653{
654 int rc; 654 int rc;
655 struct crypto_blkcipher *tfm_arc4; 655 struct crypto_blkcipher *tfm_arc4;
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 26981bf2cf3f..989442dcfb45 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -208,7 +208,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
208{ 208{
209 struct super_block *sb = dentry->d_sb; 209 struct super_block *sb = dentry->d_sb;
210 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 210 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
211 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 211 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
212 int rc = -EOPNOTSUPP; 212 int rc = -EOPNOTSUPP;
213 int xid; 213 int xid;
214 214
@@ -361,7 +361,7 @@ static int
361cifs_show_options(struct seq_file *s, struct vfsmount *m) 361cifs_show_options(struct seq_file *s, struct vfsmount *m)
362{ 362{
363 struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb); 363 struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
364 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 364 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
365 struct sockaddr *srcaddr; 365 struct sockaddr *srcaddr;
366 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; 366 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr;
367 367
@@ -461,7 +461,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
461static void cifs_umount_begin(struct super_block *sb) 461static void cifs_umount_begin(struct super_block *sb)
462{ 462{
463 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 463 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
464 struct cifsTconInfo *tcon; 464 struct cifs_tcon *tcon;
465 465
466 if (cifs_sb == NULL) 466 if (cifs_sb == NULL)
467 return; 467 return;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 310cddabd3fd..6255fa812c7a 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -254,7 +254,7 @@ struct TCP_Server_Info {
254 struct mutex srv_mutex; 254 struct mutex srv_mutex;
255 struct task_struct *tsk; 255 struct task_struct *tsk;
256 char server_GUID[16]; 256 char server_GUID[16];
257 char secMode; 257 char sec_mode;
258 bool session_estab; /* mark when very first sess is established */ 258 bool session_estab; /* mark when very first sess is established */
259 u16 dialect; /* dialect index that server chose */ 259 u16 dialect; /* dialect index that server chose */
260 enum securityEnum secType; 260 enum securityEnum secType;
@@ -329,7 +329,7 @@ static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net)
329/* 329/*
330 * Session structure. One of these for each uid session with a particular host 330 * Session structure. One of these for each uid session with a particular host
331 */ 331 */
332struct cifsSesInfo { 332struct cifs_ses {
333 struct list_head smb_ses_list; 333 struct list_head smb_ses_list;
334 struct list_head tcon_list; 334 struct list_head tcon_list;
335 struct mutex session_mutex; 335 struct mutex session_mutex;
@@ -369,11 +369,11 @@ struct cifsSesInfo {
369 * there is one of these for each connection to a resource on a particular 369 * there is one of these for each connection to a resource on a particular
370 * session 370 * session
371 */ 371 */
372struct cifsTconInfo { 372struct cifs_tcon {
373 struct list_head tcon_list; 373 struct list_head tcon_list;
374 int tc_count; 374 int tc_count;
375 struct list_head openFileList; 375 struct list_head openFileList;
376 struct cifsSesInfo *ses; /* pointer to session associated with */ 376 struct cifs_ses *ses; /* pointer to session associated with */
377 char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */ 377 char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */
378 char *nativeFileSystem; 378 char *nativeFileSystem;
379 char *password; /* for share-level security */ 379 char *password; /* for share-level security */
@@ -455,12 +455,12 @@ struct tcon_link {
455#define TCON_LINK_IN_TREE 2 455#define TCON_LINK_IN_TREE 2
456 unsigned long tl_time; 456 unsigned long tl_time;
457 atomic_t tl_count; 457 atomic_t tl_count;
458 struct cifsTconInfo *tl_tcon; 458 struct cifs_tcon *tl_tcon;
459}; 459};
460 460
461extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb); 461extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb);
462 462
463static inline struct cifsTconInfo * 463static inline struct cifs_tcon *
464tlink_tcon(struct tcon_link *tlink) 464tlink_tcon(struct tcon_link *tlink)
465{ 465{
466 return tlink->tl_tcon; 466 return tlink->tl_tcon;
@@ -477,7 +477,7 @@ cifs_get_tlink(struct tcon_link *tlink)
477} 477}
478 478
479/* This function is always expected to succeed */ 479/* This function is always expected to succeed */
480extern struct cifsTconInfo *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb); 480extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
481 481
482/* 482/*
483 * This info hangs off the cifsFileInfo structure, pointed to by llist. 483 * This info hangs off the cifsFileInfo structure, pointed to by llist.
@@ -535,7 +535,7 @@ struct cifs_io_parms {
535 __u32 pid; 535 __u32 pid;
536 __u64 offset; 536 __u64 offset;
537 unsigned int length; 537 unsigned int length;
538 struct cifsTconInfo *tcon; 538 struct cifs_tcon *tcon;
539}; 539};
540 540
541/* 541/*
@@ -615,7 +615,7 @@ convert_delimiter(char *path, char delim)
615#ifdef CONFIG_CIFS_STATS 615#ifdef CONFIG_CIFS_STATS
616#define cifs_stats_inc atomic_inc 616#define cifs_stats_inc atomic_inc
617 617
618static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon, 618static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
619 unsigned int bytes) 619 unsigned int bytes)
620{ 620{
621 if (bytes) { 621 if (bytes) {
@@ -625,7 +625,7 @@ static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon,
625 } 625 }
626} 626}
627 627
628static inline void cifs_stats_bytes_read(struct cifsTconInfo *tcon, 628static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
629 unsigned int bytes) 629 unsigned int bytes)
630{ 630{
631 spin_lock(&tcon->stat_lock); 631 spin_lock(&tcon->stat_lock);
@@ -675,7 +675,7 @@ struct mid_q_entry {
675struct oplock_q_entry { 675struct oplock_q_entry {
676 struct list_head qhead; 676 struct list_head qhead;
677 struct inode *pinode; 677 struct inode *pinode;
678 struct cifsTconInfo *tcon; 678 struct cifs_tcon *tcon;
679 __u16 netfid; 679 __u16 netfid;
680}; 680};
681 681
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 17063455918f..953f84413c77 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -59,7 +59,7 @@ extern void cifs_destroy_idmaptrees(void);
59extern char *build_path_from_dentry(struct dentry *); 59extern char *build_path_from_dentry(struct dentry *);
60extern char *cifs_build_path_to_root(struct smb_vol *vol, 60extern char *cifs_build_path_to_root(struct smb_vol *vol,
61 struct cifs_sb_info *cifs_sb, 61 struct cifs_sb_info *cifs_sb,
62 struct cifsTconInfo *tcon); 62 struct cifs_tcon *tcon);
63extern char *build_wildcard_path_from_dentry(struct dentry *direntry); 63extern char *build_wildcard_path_from_dentry(struct dentry *direntry);
64extern char *cifs_compose_mount_options(const char *sb_mountdata, 64extern char *cifs_compose_mount_options(const char *sb_mountdata,
65 const char *fullpath, const struct dfs_info3_param *ref, 65 const char *fullpath, const struct dfs_info3_param *ref,
@@ -71,19 +71,19 @@ extern void DeleteMidQEntry(struct mid_q_entry *midEntry);
71extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, 71extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
72 unsigned int nvec, mid_callback_t *callback, 72 unsigned int nvec, mid_callback_t *callback,
73 void *cbdata, bool ignore_pend); 73 void *cbdata, bool ignore_pend);
74extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, 74extern int SendReceive(const unsigned int /* xid */ , struct cifs_ses *,
75 struct smb_hdr * /* input */ , 75 struct smb_hdr * /* input */ ,
76 struct smb_hdr * /* out */ , 76 struct smb_hdr * /* out */ ,
77 int * /* bytes returned */ , const int long_op); 77 int * /* bytes returned */ , const int long_op);
78extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, 78extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
79 struct smb_hdr *in_buf, int flags); 79 struct smb_hdr *in_buf, int flags);
80extern int cifs_check_receive(struct mid_q_entry *mid, 80extern int cifs_check_receive(struct mid_q_entry *mid,
81 struct TCP_Server_Info *server, bool log_error); 81 struct TCP_Server_Info *server, bool log_error);
82extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, 82extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *,
83 struct kvec *, int /* nvec to send */, 83 struct kvec *, int /* nvec to send */,
84 int * /* type of buf returned */ , const int flags); 84 int * /* type of buf returned */ , const int flags);
85extern int SendReceiveBlockingLock(const unsigned int xid, 85extern int SendReceiveBlockingLock(const unsigned int xid,
86 struct cifsTconInfo *ptcon, 86 struct cifs_tcon *ptcon,
87 struct smb_hdr *in_buf , 87 struct smb_hdr *in_buf ,
88 struct smb_hdr *out_buf, 88 struct smb_hdr *out_buf,
89 int *bytes_returned); 89 int *bytes_returned);
@@ -104,12 +104,12 @@ extern int cifs_fill_sockaddr(struct sockaddr *dst, const char *src, int len,
104 const unsigned short int port); 104 const unsigned short int port);
105extern int map_smb_to_linux_error(struct smb_hdr *smb, bool logErr); 105extern int map_smb_to_linux_error(struct smb_hdr *smb, bool logErr);
106extern void header_assemble(struct smb_hdr *, char /* command */ , 106extern void header_assemble(struct smb_hdr *, char /* command */ ,
107 const struct cifsTconInfo *, int /* length of 107 const struct cifs_tcon *, int /* length of
108 fixed section (word count) in two byte units */); 108 fixed section (word count) in two byte units */);
109extern int small_smb_init_no_tc(const int smb_cmd, const int wct, 109extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
110 struct cifsSesInfo *ses, 110 struct cifs_ses *ses,
111 void **request_buf); 111 void **request_buf);
112extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, 112extern int CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,
113 const struct nls_table *nls_cp); 113 const struct nls_table *nls_cp);
114extern __u16 GetNextMid(struct TCP_Server_Info *server); 114extern __u16 GetNextMid(struct TCP_Server_Info *server);
115extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); 115extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601);
@@ -165,94 +165,94 @@ void cifs_proc_init(void);
165void cifs_proc_clean(void); 165void cifs_proc_clean(void);
166 166
167extern int cifs_negotiate_protocol(unsigned int xid, 167extern int cifs_negotiate_protocol(unsigned int xid,
168 struct cifsSesInfo *ses); 168 struct cifs_ses *ses);
169extern int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses, 169extern int cifs_setup_session(unsigned int xid, struct cifs_ses *ses,
170 struct nls_table *nls_info); 170 struct nls_table *nls_info);
171extern int CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses); 171extern int CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses);
172 172
173extern int CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, 173extern int CIFSTCon(unsigned int xid, struct cifs_ses *ses,
174 const char *tree, struct cifsTconInfo *tcon, 174 const char *tree, struct cifs_tcon *tcon,
175 const struct nls_table *); 175 const struct nls_table *);
176 176
177extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, 177extern int CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
178 const char *searchName, const struct nls_table *nls_codepage, 178 const char *searchName, const struct nls_table *nls_codepage,
179 __u16 *searchHandle, struct cifs_search_info *psrch_inf, 179 __u16 *searchHandle, struct cifs_search_info *psrch_inf,
180 int map, const char dirsep); 180 int map, const char dirsep);
181 181
182extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, 182extern int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
183 __u16 searchHandle, struct cifs_search_info *psrch_inf); 183 __u16 searchHandle, struct cifs_search_info *psrch_inf);
184 184
185extern int CIFSFindClose(const int, struct cifsTconInfo *tcon, 185extern int CIFSFindClose(const int, struct cifs_tcon *tcon,
186 const __u16 search_handle); 186 const __u16 search_handle);
187 187
188extern int CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon, 188extern int CIFSSMBQFileInfo(const int xid, struct cifs_tcon *tcon,
189 u16 netfid, FILE_ALL_INFO *pFindData); 189 u16 netfid, FILE_ALL_INFO *pFindData);
190extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, 190extern int CIFSSMBQPathInfo(const int xid, struct cifs_tcon *tcon,
191 const unsigned char *searchName, 191 const unsigned char *searchName,
192 FILE_ALL_INFO *findData, 192 FILE_ALL_INFO *findData,
193 int legacy /* whether to use old info level */, 193 int legacy /* whether to use old info level */,
194 const struct nls_table *nls_codepage, int remap); 194 const struct nls_table *nls_codepage, int remap);
195extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, 195extern int SMBQueryInformation(const int xid, struct cifs_tcon *tcon,
196 const unsigned char *searchName, 196 const unsigned char *searchName,
197 FILE_ALL_INFO *findData, 197 FILE_ALL_INFO *findData,
198 const struct nls_table *nls_codepage, int remap); 198 const struct nls_table *nls_codepage, int remap);
199 199
200extern int CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon, 200extern int CIFSSMBUnixQFileInfo(const int xid, struct cifs_tcon *tcon,
201 u16 netfid, FILE_UNIX_BASIC_INFO *pFindData); 201 u16 netfid, FILE_UNIX_BASIC_INFO *pFindData);
202extern int CIFSSMBUnixQPathInfo(const int xid, 202extern int CIFSSMBUnixQPathInfo(const int xid,
203 struct cifsTconInfo *tcon, 203 struct cifs_tcon *tcon,
204 const unsigned char *searchName, 204 const unsigned char *searchName,
205 FILE_UNIX_BASIC_INFO *pFindData, 205 FILE_UNIX_BASIC_INFO *pFindData,
206 const struct nls_table *nls_codepage, int remap); 206 const struct nls_table *nls_codepage, int remap);
207 207
208extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 208extern int CIFSGetDFSRefer(const int xid, struct cifs_ses *ses,
209 const unsigned char *searchName, 209 const unsigned char *searchName,
210 struct dfs_info3_param **target_nodes, 210 struct dfs_info3_param **target_nodes,
211 unsigned int *number_of_nodes_in_array, 211 unsigned int *number_of_nodes_in_array,
212 const struct nls_table *nls_codepage, int remap); 212 const struct nls_table *nls_codepage, int remap);
213 213
214extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, 214extern int get_dfs_path(int xid, struct cifs_ses *pSesInfo,
215 const char *old_path, 215 const char *old_path,
216 const struct nls_table *nls_codepage, 216 const struct nls_table *nls_codepage,
217 unsigned int *pnum_referrals, 217 unsigned int *pnum_referrals,
218 struct dfs_info3_param **preferrals, 218 struct dfs_info3_param **preferrals,
219 int remap); 219 int remap);
220extern void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, 220extern void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
221 struct super_block *sb, struct smb_vol *vol); 221 struct super_block *sb, struct smb_vol *vol);
222extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, 222extern int CIFSSMBQFSInfo(const int xid, struct cifs_tcon *tcon,
223 struct kstatfs *FSData); 223 struct kstatfs *FSData);
224extern int SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, 224extern int SMBOldQFSInfo(const int xid, struct cifs_tcon *tcon,
225 struct kstatfs *FSData); 225 struct kstatfs *FSData);
226extern int CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, 226extern int CIFSSMBSetFSUnixInfo(const int xid, struct cifs_tcon *tcon,
227 __u64 cap); 227 __u64 cap);
228 228
229extern int CIFSSMBQFSAttributeInfo(const int xid, 229extern int CIFSSMBQFSAttributeInfo(const int xid,
230 struct cifsTconInfo *tcon); 230 struct cifs_tcon *tcon);
231extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon); 231extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifs_tcon *tcon);
232extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon); 232extern int CIFSSMBQFSUnixInfo(const int xid, struct cifs_tcon *tcon);
233extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, 233extern int CIFSSMBQFSPosixInfo(const int xid, struct cifs_tcon *tcon,
234 struct kstatfs *FSData); 234 struct kstatfs *FSData);
235 235
236extern int CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, 236extern int CIFSSMBSetPathInfo(const int xid, struct cifs_tcon *tcon,
237 const char *fileName, const FILE_BASIC_INFO *data, 237 const char *fileName, const FILE_BASIC_INFO *data,
238 const struct nls_table *nls_codepage, 238 const struct nls_table *nls_codepage,
239 int remap_special_chars); 239 int remap_special_chars);
240extern int CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, 240extern int CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
241 const FILE_BASIC_INFO *data, __u16 fid, 241 const FILE_BASIC_INFO *data, __u16 fid,
242 __u32 pid_of_opener); 242 __u32 pid_of_opener);
243extern int CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, 243extern int CIFSSMBSetFileDisposition(const int xid, struct cifs_tcon *tcon,
244 bool delete_file, __u16 fid, __u32 pid_of_opener); 244 bool delete_file, __u16 fid, __u32 pid_of_opener);
245#if 0 245#if 0
246extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, 246extern int CIFSSMBSetAttrLegacy(int xid, struct cifs_tcon *tcon,
247 char *fileName, __u16 dos_attributes, 247 char *fileName, __u16 dos_attributes,
248 const struct nls_table *nls_codepage); 248 const struct nls_table *nls_codepage);
249#endif /* possibly unneeded function */ 249#endif /* possibly unneeded function */
250extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, 250extern int CIFSSMBSetEOF(const int xid, struct cifs_tcon *tcon,
251 const char *fileName, __u64 size, 251 const char *fileName, __u64 size,
252 bool setAllocationSizeFlag, 252 bool setAllocationSizeFlag,
253 const struct nls_table *nls_codepage, 253 const struct nls_table *nls_codepage,
254 int remap_special_chars); 254 int remap_special_chars);
255extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, 255extern int CIFSSMBSetFileSize(const int xid, struct cifs_tcon *tcon,
256 __u64 size, __u16 fileHandle, __u32 opener_pid, 256 __u64 size, __u16 fileHandle, __u32 opener_pid,
257 bool AllocSizeFlag); 257 bool AllocSizeFlag);
258 258
@@ -266,83 +266,83 @@ struct cifs_unix_set_info_args {
266 dev_t device; 266 dev_t device;
267}; 267};
268 268
269extern int CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, 269extern int CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
270 const struct cifs_unix_set_info_args *args, 270 const struct cifs_unix_set_info_args *args,
271 u16 fid, u32 pid_of_opener); 271 u16 fid, u32 pid_of_opener);
272 272
273extern int CIFSSMBUnixSetPathInfo(const int xid, struct cifsTconInfo *pTcon, 273extern int CIFSSMBUnixSetPathInfo(const int xid, struct cifs_tcon *pTcon,
274 char *fileName, 274 char *fileName,
275 const struct cifs_unix_set_info_args *args, 275 const struct cifs_unix_set_info_args *args,
276 const struct nls_table *nls_codepage, 276 const struct nls_table *nls_codepage,
277 int remap_special_chars); 277 int remap_special_chars);
278 278
279extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, 279extern int CIFSSMBMkDir(const int xid, struct cifs_tcon *tcon,
280 const char *newName, 280 const char *newName,
281 const struct nls_table *nls_codepage, 281 const struct nls_table *nls_codepage,
282 int remap_special_chars); 282 int remap_special_chars);
283extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, 283extern int CIFSSMBRmDir(const int xid, struct cifs_tcon *tcon,
284 const char *name, const struct nls_table *nls_codepage, 284 const char *name, const struct nls_table *nls_codepage,
285 int remap_special_chars); 285 int remap_special_chars);
286extern int CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, 286extern int CIFSPOSIXDelFile(const int xid, struct cifs_tcon *tcon,
287 const char *name, __u16 type, 287 const char *name, __u16 type,
288 const struct nls_table *nls_codepage, 288 const struct nls_table *nls_codepage,
289 int remap_special_chars); 289 int remap_special_chars);
290extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, 290extern int CIFSSMBDelFile(const int xid, struct cifs_tcon *tcon,
291 const char *name, 291 const char *name,
292 const struct nls_table *nls_codepage, 292 const struct nls_table *nls_codepage,
293 int remap_special_chars); 293 int remap_special_chars);
294extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, 294extern int CIFSSMBRename(const int xid, struct cifs_tcon *tcon,
295 const char *fromName, const char *toName, 295 const char *fromName, const char *toName,
296 const struct nls_table *nls_codepage, 296 const struct nls_table *nls_codepage,
297 int remap_special_chars); 297 int remap_special_chars);
298extern int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, 298extern int CIFSSMBRenameOpenFile(const int xid, struct cifs_tcon *pTcon,
299 int netfid, const char *target_name, 299 int netfid, const char *target_name,
300 const struct nls_table *nls_codepage, 300 const struct nls_table *nls_codepage,
301 int remap_special_chars); 301 int remap_special_chars);
302extern int CIFSCreateHardLink(const int xid, 302extern int CIFSCreateHardLink(const int xid,
303 struct cifsTconInfo *tcon, 303 struct cifs_tcon *tcon,
304 const char *fromName, const char *toName, 304 const char *fromName, const char *toName,
305 const struct nls_table *nls_codepage, 305 const struct nls_table *nls_codepage,
306 int remap_special_chars); 306 int remap_special_chars);
307extern int CIFSUnixCreateHardLink(const int xid, 307extern int CIFSUnixCreateHardLink(const int xid,
308 struct cifsTconInfo *tcon, 308 struct cifs_tcon *tcon,
309 const char *fromName, const char *toName, 309 const char *fromName, const char *toName,
310 const struct nls_table *nls_codepage, 310 const struct nls_table *nls_codepage,
311 int remap_special_chars); 311 int remap_special_chars);
312extern int CIFSUnixCreateSymLink(const int xid, 312extern int CIFSUnixCreateSymLink(const int xid,
313 struct cifsTconInfo *tcon, 313 struct cifs_tcon *tcon,
314 const char *fromName, const char *toName, 314 const char *fromName, const char *toName,
315 const struct nls_table *nls_codepage); 315 const struct nls_table *nls_codepage);
316extern int CIFSSMBUnixQuerySymLink(const int xid, 316extern int CIFSSMBUnixQuerySymLink(const int xid,
317 struct cifsTconInfo *tcon, 317 struct cifs_tcon *tcon,
318 const unsigned char *searchName, char **syminfo, 318 const unsigned char *searchName, char **syminfo,
319 const struct nls_table *nls_codepage); 319 const struct nls_table *nls_codepage);
320#ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL 320#ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL
321extern int CIFSSMBQueryReparseLinkInfo(const int xid, 321extern int CIFSSMBQueryReparseLinkInfo(const int xid,
322 struct cifsTconInfo *tcon, 322 struct cifs_tcon *tcon,
323 const unsigned char *searchName, 323 const unsigned char *searchName,
324 char *symlinkinfo, const int buflen, __u16 fid, 324 char *symlinkinfo, const int buflen, __u16 fid,
325 const struct nls_table *nls_codepage); 325 const struct nls_table *nls_codepage);
326#endif /* temporarily unused until cifs_symlink fixed */ 326#endif /* temporarily unused until cifs_symlink fixed */
327extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, 327extern int CIFSSMBOpen(const int xid, struct cifs_tcon *tcon,
328 const char *fileName, const int disposition, 328 const char *fileName, const int disposition,
329 const int access_flags, const int omode, 329 const int access_flags, const int omode,
330 __u16 *netfid, int *pOplock, FILE_ALL_INFO *, 330 __u16 *netfid, int *pOplock, FILE_ALL_INFO *,
331 const struct nls_table *nls_codepage, int remap); 331 const struct nls_table *nls_codepage, int remap);
332extern int SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, 332extern int SMBLegacyOpen(const int xid, struct cifs_tcon *tcon,
333 const char *fileName, const int disposition, 333 const char *fileName, const int disposition,
334 const int access_flags, const int omode, 334 const int access_flags, const int omode,
335 __u16 *netfid, int *pOplock, FILE_ALL_INFO *, 335 __u16 *netfid, int *pOplock, FILE_ALL_INFO *,
336 const struct nls_table *nls_codepage, int remap); 336 const struct nls_table *nls_codepage, int remap);
337extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, 337extern int CIFSPOSIXCreate(const int xid, struct cifs_tcon *tcon,
338 u32 posix_flags, __u64 mode, __u16 *netfid, 338 u32 posix_flags, __u64 mode, __u16 *netfid,
339 FILE_UNIX_BASIC_INFO *pRetData, 339 FILE_UNIX_BASIC_INFO *pRetData,
340 __u32 *pOplock, const char *name, 340 __u32 *pOplock, const char *name,
341 const struct nls_table *nls_codepage, int remap); 341 const struct nls_table *nls_codepage, int remap);
342extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, 342extern int CIFSSMBClose(const int xid, struct cifs_tcon *tcon,
343 const int smb_file_id); 343 const int smb_file_id);
344 344
345extern int CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, 345extern int CIFSSMBFlush(const int xid, struct cifs_tcon *tcon,
346 const int smb_file_id); 346 const int smb_file_id);
347 347
348extern int CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms, 348extern int CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms,
@@ -354,28 +354,28 @@ extern int CIFSSMBWrite(const int xid, struct cifs_io_parms *io_parms,
354extern int CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms, 354extern int CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
355 unsigned int *nbytes, struct kvec *iov, const int nvec, 355 unsigned int *nbytes, struct kvec *iov, const int nvec,
356 const int long_op); 356 const int long_op);
357extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, 357extern int CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
358 const unsigned char *searchName, __u64 *inode_number, 358 const unsigned char *searchName, __u64 *inode_number,
359 const struct nls_table *nls_codepage, 359 const struct nls_table *nls_codepage,
360 int remap_special_chars); 360 int remap_special_chars);
361 361
362extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, 362extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
363 const __u16 netfid, const __u64 len, 363 const __u16 netfid, const __u64 len,
364 const __u64 offset, const __u32 numUnlock, 364 const __u64 offset, const __u32 numUnlock,
365 const __u32 numLock, const __u8 lockType, 365 const __u32 numLock, const __u8 lockType,
366 const bool waitFlag, const __u8 oplock_level); 366 const bool waitFlag, const __u8 oplock_level);
367extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, 367extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
368 const __u16 smb_file_id, const int get_flag, 368 const __u16 smb_file_id, const int get_flag,
369 const __u64 len, struct file_lock *, 369 const __u64 len, struct file_lock *,
370 const __u16 lock_type, const bool waitFlag); 370 const __u16 lock_type, const bool waitFlag);
371extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon); 371extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon);
372extern int CIFSSMBEcho(struct TCP_Server_Info *server); 372extern int CIFSSMBEcho(struct TCP_Server_Info *server);
373extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses); 373extern int CIFSSMBLogoff(const int xid, struct cifs_ses *ses);
374 374
375extern struct cifsSesInfo *sesInfoAlloc(void); 375extern struct cifs_ses *sesInfoAlloc(void);
376extern void sesInfoFree(struct cifsSesInfo *); 376extern void sesInfoFree(struct cifs_ses *);
377extern struct cifsTconInfo *tconInfoAlloc(void); 377extern struct cifs_tcon *tconInfoAlloc(void);
378extern void tconInfoFree(struct cifsTconInfo *); 378extern void tconInfoFree(struct cifs_tcon *);
379 379
380extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *); 380extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *);
381extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, 381extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *,
@@ -384,51 +384,51 @@ extern int cifs_verify_signature(struct smb_hdr *,
384 struct TCP_Server_Info *server, 384 struct TCP_Server_Info *server,
385 __u32 expected_sequence_number); 385 __u32 expected_sequence_number);
386extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *); 386extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *);
387extern int setup_ntlm_response(struct cifsSesInfo *); 387extern int setup_ntlm_response(struct cifs_ses *);
388extern int setup_ntlmv2_rsp(struct cifsSesInfo *, const struct nls_table *); 388extern int setup_ntlmv2_rsp(struct cifs_ses *, const struct nls_table *);
389extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *); 389extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *);
390extern void cifs_crypto_shash_release(struct TCP_Server_Info *); 390extern void cifs_crypto_shash_release(struct TCP_Server_Info *);
391extern int calc_seckey(struct cifsSesInfo *); 391extern int calc_seckey(struct cifs_ses *);
392 392
393#ifdef CONFIG_CIFS_WEAK_PW_HASH 393#ifdef CONFIG_CIFS_WEAK_PW_HASH
394extern int calc_lanman_hash(const char *password, const char *cryptkey, 394extern int calc_lanman_hash(const char *password, const char *cryptkey,
395 bool encrypt, char *lnm_session_key); 395 bool encrypt, char *lnm_session_key);
396#endif /* CIFS_WEAK_PW_HASH */ 396#endif /* CIFS_WEAK_PW_HASH */
397#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */ 397#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */
398extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, 398extern int CIFSSMBNotify(const int xid, struct cifs_tcon *tcon,
399 const int notify_subdirs, const __u16 netfid, 399 const int notify_subdirs, const __u16 netfid,
400 __u32 filter, struct file *file, int multishot, 400 __u32 filter, struct file *file, int multishot,
401 const struct nls_table *nls_codepage); 401 const struct nls_table *nls_codepage);
402#endif /* was needed for dnotify, and will be needed for inotify when VFS fix */ 402#endif /* was needed for dnotify, and will be needed for inotify when VFS fix */
403extern int CIFSSMBCopy(int xid, 403extern int CIFSSMBCopy(int xid,
404 struct cifsTconInfo *source_tcon, 404 struct cifs_tcon *source_tcon,
405 const char *fromName, 405 const char *fromName,
406 const __u16 target_tid, 406 const __u16 target_tid,
407 const char *toName, const int flags, 407 const char *toName, const int flags,
408 const struct nls_table *nls_codepage, 408 const struct nls_table *nls_codepage,
409 int remap_special_chars); 409 int remap_special_chars);
410extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, 410extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
411 const unsigned char *searchName, 411 const unsigned char *searchName,
412 const unsigned char *ea_name, char *EAData, 412 const unsigned char *ea_name, char *EAData,
413 size_t bufsize, const struct nls_table *nls_codepage, 413 size_t bufsize, const struct nls_table *nls_codepage,
414 int remap_special_chars); 414 int remap_special_chars);
415extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, 415extern int CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon,
416 const char *fileName, const char *ea_name, 416 const char *fileName, const char *ea_name,
417 const void *ea_value, const __u16 ea_value_len, 417 const void *ea_value, const __u16 ea_value_len,
418 const struct nls_table *nls_codepage, int remap_special_chars); 418 const struct nls_table *nls_codepage, int remap_special_chars);
419extern int CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, 419extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon,
420 __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen); 420 __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen);
421extern int CIFSSMBSetCIFSACL(const int, struct cifsTconInfo *, __u16, 421extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16,
422 struct cifs_ntsd *, __u32); 422 struct cifs_ntsd *, __u32);
423extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, 423extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon,
424 const unsigned char *searchName, 424 const unsigned char *searchName,
425 char *acl_inf, const int buflen, const int acl_type, 425 char *acl_inf, const int buflen, const int acl_type,
426 const struct nls_table *nls_codepage, int remap_special_chars); 426 const struct nls_table *nls_codepage, int remap_special_chars);
427extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, 427extern int CIFSSMBSetPosixACL(const int xid, struct cifs_tcon *tcon,
428 const unsigned char *fileName, 428 const unsigned char *fileName,
429 const char *local_acl, const int buflen, const int acl_type, 429 const char *local_acl, const int buflen, const int acl_type,
430 const struct nls_table *nls_codepage, int remap_special_chars); 430 const struct nls_table *nls_codepage, int remap_special_chars);
431extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, 431extern int CIFSGetExtAttr(const int xid, struct cifs_tcon *tcon,
432 const int netfid, __u64 *pExtAttrBits, __u64 *pMask); 432 const int netfid, __u64 *pExtAttrBits, __u64 *pMask);
433extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); 433extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb);
434extern bool CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr); 434extern bool CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr);
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index fc9b5fa98efd..1a9fe7f816d1 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -85,7 +85,7 @@ static struct {
85 85
86/* Mark as invalid, all open files on tree connections since they 86/* Mark as invalid, all open files on tree connections since they
87 were closed when session to server was lost */ 87 were closed when session to server was lost */
88static void mark_open_files_invalid(struct cifsTconInfo *pTcon) 88static void mark_open_files_invalid(struct cifs_tcon *pTcon)
89{ 89{
90 struct cifsFileInfo *open_file = NULL; 90 struct cifsFileInfo *open_file = NULL;
91 struct list_head *tmp; 91 struct list_head *tmp;
@@ -105,10 +105,10 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
105 105
106/* reconnect the socket, tcon, and smb session if needed */ 106/* reconnect the socket, tcon, and smb session if needed */
107static int 107static int
108cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) 108cifs_reconnect_tcon(struct cifs_tcon *tcon, int smb_command)
109{ 109{
110 int rc = 0; 110 int rc = 0;
111 struct cifsSesInfo *ses; 111 struct cifs_ses *ses;
112 struct TCP_Server_Info *server; 112 struct TCP_Server_Info *server;
113 struct nls_table *nls_codepage; 113 struct nls_table *nls_codepage;
114 114
@@ -227,7 +227,7 @@ out:
227 SMB information in the SMB header. If the return code is zero, this 227 SMB information in the SMB header. If the return code is zero, this
228 function must have filled in request_buf pointer */ 228 function must have filled in request_buf pointer */
229static int 229static int
230small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, 230small_smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
231 void **request_buf) 231 void **request_buf)
232{ 232{
233 int rc; 233 int rc;
@@ -253,7 +253,7 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
253 253
254int 254int
255small_smb_init_no_tc(const int smb_command, const int wct, 255small_smb_init_no_tc(const int smb_command, const int wct,
256 struct cifsSesInfo *ses, void **request_buf) 256 struct cifs_ses *ses, void **request_buf)
257{ 257{
258 int rc; 258 int rc;
259 struct smb_hdr *buffer; 259 struct smb_hdr *buffer;
@@ -279,7 +279,7 @@ small_smb_init_no_tc(const int smb_command, const int wct,
279 279
280/* If the return code is zero, this function must fill in request_buf pointer */ 280/* If the return code is zero, this function must fill in request_buf pointer */
281static int 281static int
282__smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, 282__smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
283 void **request_buf, void **response_buf) 283 void **request_buf, void **response_buf)
284{ 284{
285 *request_buf = cifs_buf_get(); 285 *request_buf = cifs_buf_get();
@@ -305,7 +305,7 @@ __smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
305 305
306/* If the return code is zero, this function must fill in request_buf pointer */ 306/* If the return code is zero, this function must fill in request_buf pointer */
307static int 307static int
308smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, 308smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
309 void **request_buf, void **response_buf) 309 void **request_buf, void **response_buf)
310{ 310{
311 int rc; 311 int rc;
@@ -318,7 +318,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
318} 318}
319 319
320static int 320static int
321smb_init_no_reconnect(int smb_command, int wct, struct cifsTconInfo *tcon, 321smb_init_no_reconnect(int smb_command, int wct, struct cifs_tcon *tcon,
322 void **request_buf, void **response_buf) 322 void **request_buf, void **response_buf)
323{ 323{
324 if (tcon->ses->need_reconnect || tcon->need_reconnect) 324 if (tcon->ses->need_reconnect || tcon->need_reconnect)
@@ -367,7 +367,7 @@ static inline void inc_rfc1001_len(void *pSMB, int count)
367} 367}
368 368
369int 369int
370CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) 370CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses)
371{ 371{
372 NEGOTIATE_REQ *pSMB; 372 NEGOTIATE_REQ *pSMB;
373 NEGOTIATE_RSP *pSMBr; 373 NEGOTIATE_RSP *pSMBr;
@@ -451,7 +451,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
451 rc = -EOPNOTSUPP; 451 rc = -EOPNOTSUPP;
452 goto neg_err_exit; 452 goto neg_err_exit;
453 } 453 }
454 server->secMode = (__u8)le16_to_cpu(rsp->SecurityMode); 454 server->sec_mode = (__u8)le16_to_cpu(rsp->SecurityMode);
455 server->maxReq = le16_to_cpu(rsp->MaxMpxCount); 455 server->maxReq = le16_to_cpu(rsp->MaxMpxCount);
456 server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize), 456 server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize),
457 (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); 457 (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);
@@ -505,7 +505,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
505 cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) { 505 cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) {
506 memcpy(ses->server->cryptkey, rsp->EncryptionKey, 506 memcpy(ses->server->cryptkey, rsp->EncryptionKey,
507 CIFS_CRYPTO_KEY_SIZE); 507 CIFS_CRYPTO_KEY_SIZE);
508 } else if (server->secMode & SECMODE_PW_ENCRYPT) { 508 } else if (server->sec_mode & SECMODE_PW_ENCRYPT) {
509 rc = -EIO; /* need cryptkey unless plain text */ 509 rc = -EIO; /* need cryptkey unless plain text */
510 goto neg_err_exit; 510 goto neg_err_exit;
511 } 511 }
@@ -527,11 +527,11 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
527 goto neg_err_exit; 527 goto neg_err_exit;
528 } 528 }
529 /* else wct == 17 NTLM */ 529 /* else wct == 17 NTLM */
530 server->secMode = pSMBr->SecurityMode; 530 server->sec_mode = pSMBr->SecurityMode;
531 if ((server->secMode & SECMODE_USER) == 0) 531 if ((server->sec_mode & SECMODE_USER) == 0)
532 cFYI(1, "share mode security"); 532 cFYI(1, "share mode security");
533 533
534 if ((server->secMode & SECMODE_PW_ENCRYPT) == 0) 534 if ((server->sec_mode & SECMODE_PW_ENCRYPT) == 0)
535#ifdef CONFIG_CIFS_WEAK_PW_HASH 535#ifdef CONFIG_CIFS_WEAK_PW_HASH
536 if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0) 536 if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0)
537#endif /* CIFS_WEAK_PW_HASH */ 537#endif /* CIFS_WEAK_PW_HASH */
@@ -617,7 +617,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
617 } else 617 } else
618 rc = -EOPNOTSUPP; 618 rc = -EOPNOTSUPP;
619 } 619 }
620 } else if (server->secMode & SECMODE_PW_ENCRYPT) { 620 } else if (server->sec_mode & SECMODE_PW_ENCRYPT) {
621 rc = -EIO; /* no crypt key only if plain text pwd */ 621 rc = -EIO; /* no crypt key only if plain text pwd */
622 goto neg_err_exit; 622 goto neg_err_exit;
623 } else 623 } else
@@ -630,27 +630,27 @@ signing_check:
630 /* MUST_SIGN already includes the MAY_SIGN FLAG 630 /* MUST_SIGN already includes the MAY_SIGN FLAG
631 so if this is zero it means that signing is disabled */ 631 so if this is zero it means that signing is disabled */
632 cFYI(1, "Signing disabled"); 632 cFYI(1, "Signing disabled");
633 if (server->secMode & SECMODE_SIGN_REQUIRED) { 633 if (server->sec_mode & SECMODE_SIGN_REQUIRED) {
634 cERROR(1, "Server requires " 634 cERROR(1, "Server requires "
635 "packet signing to be enabled in " 635 "packet signing to be enabled in "
636 "/proc/fs/cifs/SecurityFlags."); 636 "/proc/fs/cifs/SecurityFlags.");
637 rc = -EOPNOTSUPP; 637 rc = -EOPNOTSUPP;
638 } 638 }
639 server->secMode &= 639 server->sec_mode &=
640 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); 640 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED);
641 } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { 641 } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) {
642 /* signing required */ 642 /* signing required */
643 cFYI(1, "Must sign - secFlags 0x%x", secFlags); 643 cFYI(1, "Must sign - secFlags 0x%x", secFlags);
644 if ((server->secMode & 644 if ((server->sec_mode &
645 (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) { 645 (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) {
646 cERROR(1, "signing required but server lacks support"); 646 cERROR(1, "signing required but server lacks support");
647 rc = -EOPNOTSUPP; 647 rc = -EOPNOTSUPP;
648 } else 648 } else
649 server->secMode |= SECMODE_SIGN_REQUIRED; 649 server->sec_mode |= SECMODE_SIGN_REQUIRED;
650 } else { 650 } else {
651 /* signing optional ie CIFSSEC_MAY_SIGN */ 651 /* signing optional ie CIFSSEC_MAY_SIGN */
652 if ((server->secMode & SECMODE_SIGN_REQUIRED) == 0) 652 if ((server->sec_mode & SECMODE_SIGN_REQUIRED) == 0)
653 server->secMode &= 653 server->sec_mode &=
654 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); 654 ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED);
655 } 655 }
656 656
@@ -662,7 +662,7 @@ neg_err_exit:
662} 662}
663 663
664int 664int
665CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) 665CIFSSMBTDis(const int xid, struct cifs_tcon *tcon)
666{ 666{
667 struct smb_hdr *smb_buffer; 667 struct smb_hdr *smb_buffer;
668 int rc = 0; 668 int rc = 0;
@@ -749,7 +749,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
749} 749}
750 750
751int 751int
752CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) 752CIFSSMBLogoff(const int xid, struct cifs_ses *ses)
753{ 753{
754 LOGOFF_ANDX_REQ *pSMB; 754 LOGOFF_ANDX_REQ *pSMB;
755 int rc = 0; 755 int rc = 0;
@@ -776,7 +776,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
776 776
777 pSMB->hdr.Mid = GetNextMid(ses->server); 777 pSMB->hdr.Mid = GetNextMid(ses->server);
778 778
779 if (ses->server->secMode & 779 if (ses->server->sec_mode &
780 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 780 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
781 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 781 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
782 782
@@ -796,7 +796,7 @@ session_already_dead:
796} 796}
797 797
798int 798int
799CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, 799CIFSPOSIXDelFile(const int xid, struct cifs_tcon *tcon, const char *fileName,
800 __u16 type, const struct nls_table *nls_codepage, int remap) 800 __u16 type, const struct nls_table *nls_codepage, int remap)
801{ 801{
802 TRANSACTION2_SPI_REQ *pSMB = NULL; 802 TRANSACTION2_SPI_REQ *pSMB = NULL;
@@ -871,7 +871,7 @@ PsxDelete:
871} 871}
872 872
873int 873int
874CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, 874CIFSSMBDelFile(const int xid, struct cifs_tcon *tcon, const char *fileName,
875 const struct nls_table *nls_codepage, int remap) 875 const struct nls_table *nls_codepage, int remap)
876{ 876{
877 DELETE_FILE_REQ *pSMB = NULL; 877 DELETE_FILE_REQ *pSMB = NULL;
@@ -916,7 +916,7 @@ DelFileRetry:
916} 916}
917 917
918int 918int
919CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName, 919CIFSSMBRmDir(const int xid, struct cifs_tcon *tcon, const char *dirName,
920 const struct nls_table *nls_codepage, int remap) 920 const struct nls_table *nls_codepage, int remap)
921{ 921{
922 DELETE_DIRECTORY_REQ *pSMB = NULL; 922 DELETE_DIRECTORY_REQ *pSMB = NULL;
@@ -959,7 +959,7 @@ RmDirRetry:
959} 959}
960 960
961int 961int
962CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, 962CIFSSMBMkDir(const int xid, struct cifs_tcon *tcon,
963 const char *name, const struct nls_table *nls_codepage, int remap) 963 const char *name, const struct nls_table *nls_codepage, int remap)
964{ 964{
965 int rc = 0; 965 int rc = 0;
@@ -1002,7 +1002,7 @@ MkDirRetry:
1002} 1002}
1003 1003
1004int 1004int
1005CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags, 1005CIFSPOSIXCreate(const int xid, struct cifs_tcon *tcon, __u32 posix_flags,
1006 __u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData, 1006 __u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData,
1007 __u32 *pOplock, const char *name, 1007 __u32 *pOplock, const char *name,
1008 const struct nls_table *nls_codepage, int remap) 1008 const struct nls_table *nls_codepage, int remap)
@@ -1168,7 +1168,7 @@ access_flags_to_smbopen_mode(const int access_flags)
1168} 1168}
1169 1169
1170int 1170int
1171SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, 1171SMBLegacyOpen(const int xid, struct cifs_tcon *tcon,
1172 const char *fileName, const int openDisposition, 1172 const char *fileName, const int openDisposition,
1173 const int access_flags, const int create_options, __u16 *netfid, 1173 const int access_flags, const int create_options, __u16 *netfid,
1174 int *pOplock, FILE_ALL_INFO *pfile_info, 1174 int *pOplock, FILE_ALL_INFO *pfile_info,
@@ -1275,7 +1275,7 @@ OldOpenRetry:
1275} 1275}
1276 1276
1277int 1277int
1278CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, 1278CIFSSMBOpen(const int xid, struct cifs_tcon *tcon,
1279 const char *fileName, const int openDisposition, 1279 const char *fileName, const int openDisposition,
1280 const int access_flags, const int create_options, __u16 *netfid, 1280 const int access_flags, const int create_options, __u16 *netfid,
1281 int *pOplock, FILE_ALL_INFO *pfile_info, 1281 int *pOplock, FILE_ALL_INFO *pfile_info,
@@ -1390,7 +1390,7 @@ CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes,
1390 __u32 pid = io_parms->pid; 1390 __u32 pid = io_parms->pid;
1391 __u16 netfid = io_parms->netfid; 1391 __u16 netfid = io_parms->netfid;
1392 __u64 offset = io_parms->offset; 1392 __u64 offset = io_parms->offset;
1393 struct cifsTconInfo *tcon = io_parms->tcon; 1393 struct cifs_tcon *tcon = io_parms->tcon;
1394 unsigned int count = io_parms->length; 1394 unsigned int count = io_parms->length;
1395 1395
1396 cFYI(1, "Reading %d bytes on fid %d", count, netfid); 1396 cFYI(1, "Reading %d bytes on fid %d", count, netfid);
@@ -1502,7 +1502,7 @@ CIFSSMBWrite(const int xid, struct cifs_io_parms *io_parms,
1502 __u32 pid = io_parms->pid; 1502 __u32 pid = io_parms->pid;
1503 __u16 netfid = io_parms->netfid; 1503 __u16 netfid = io_parms->netfid;
1504 __u64 offset = io_parms->offset; 1504 __u64 offset = io_parms->offset;
1505 struct cifsTconInfo *tcon = io_parms->tcon; 1505 struct cifs_tcon *tcon = io_parms->tcon;
1506 unsigned int count = io_parms->length; 1506 unsigned int count = io_parms->length;
1507 1507
1508 *nbytes = 0; 1508 *nbytes = 0;
@@ -1714,7 +1714,7 @@ static void
1714cifs_writev_callback(struct mid_q_entry *mid) 1714cifs_writev_callback(struct mid_q_entry *mid)
1715{ 1715{
1716 struct cifs_writedata *wdata = mid->callback_data; 1716 struct cifs_writedata *wdata = mid->callback_data;
1717 struct cifsTconInfo *tcon = tlink_tcon(wdata->cfile->tlink); 1717 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
1718 unsigned int written; 1718 unsigned int written;
1719 WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf; 1719 WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf;
1720 1720
@@ -1763,7 +1763,7 @@ cifs_async_writev(struct cifs_writedata *wdata)
1763 int i, rc = -EACCES; 1763 int i, rc = -EACCES;
1764 WRITE_REQ *smb = NULL; 1764 WRITE_REQ *smb = NULL;
1765 int wct; 1765 int wct;
1766 struct cifsTconInfo *tcon = tlink_tcon(wdata->cfile->tlink); 1766 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
1767 struct inode *inode = wdata->cfile->dentry->d_inode; 1767 struct inode *inode = wdata->cfile->dentry->d_inode;
1768 struct kvec *iov = NULL; 1768 struct kvec *iov = NULL;
1769 1769
@@ -1866,7 +1866,7 @@ CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
1866 __u32 pid = io_parms->pid; 1866 __u32 pid = io_parms->pid;
1867 __u16 netfid = io_parms->netfid; 1867 __u16 netfid = io_parms->netfid;
1868 __u64 offset = io_parms->offset; 1868 __u64 offset = io_parms->offset;
1869 struct cifsTconInfo *tcon = io_parms->tcon; 1869 struct cifs_tcon *tcon = io_parms->tcon;
1870 unsigned int count = io_parms->length; 1870 unsigned int count = io_parms->length;
1871 1871
1872 *nbytes = 0; 1872 *nbytes = 0;
@@ -1964,7 +1964,7 @@ CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
1964 1964
1965 1965
1966int 1966int
1967CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, 1967CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
1968 const __u16 smb_file_id, const __u64 len, 1968 const __u16 smb_file_id, const __u64 len,
1969 const __u64 offset, const __u32 numUnlock, 1969 const __u64 offset, const __u32 numUnlock,
1970 const __u32 numLock, const __u8 lockType, 1970 const __u32 numLock, const __u8 lockType,
@@ -2034,7 +2034,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
2034} 2034}
2035 2035
2036int 2036int
2037CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, 2037CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
2038 const __u16 smb_file_id, const int get_flag, const __u64 len, 2038 const __u16 smb_file_id, const int get_flag, const __u64 len,
2039 struct file_lock *pLockData, const __u16 lock_type, 2039 struct file_lock *pLockData, const __u16 lock_type,
2040 const bool waitFlag) 2040 const bool waitFlag)
@@ -2172,7 +2172,7 @@ plk_err_exit:
2172 2172
2173 2173
2174int 2174int
2175CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) 2175CIFSSMBClose(const int xid, struct cifs_tcon *tcon, int smb_file_id)
2176{ 2176{
2177 int rc = 0; 2177 int rc = 0;
2178 CLOSE_REQ *pSMB = NULL; 2178 CLOSE_REQ *pSMB = NULL;
@@ -2205,7 +2205,7 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
2205} 2205}
2206 2206
2207int 2207int
2208CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id) 2208CIFSSMBFlush(const int xid, struct cifs_tcon *tcon, int smb_file_id)
2209{ 2209{
2210 int rc = 0; 2210 int rc = 0;
2211 FLUSH_REQ *pSMB = NULL; 2211 FLUSH_REQ *pSMB = NULL;
@@ -2226,7 +2226,7 @@ CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
2226} 2226}
2227 2227
2228int 2228int
2229CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, 2229CIFSSMBRename(const int xid, struct cifs_tcon *tcon,
2230 const char *fromName, const char *toName, 2230 const char *fromName, const char *toName,
2231 const struct nls_table *nls_codepage, int remap) 2231 const struct nls_table *nls_codepage, int remap)
2232{ 2232{
@@ -2293,7 +2293,7 @@ renameRetry:
2293 return rc; 2293 return rc;
2294} 2294}
2295 2295
2296int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, 2296int CIFSSMBRenameOpenFile(const int xid, struct cifs_tcon *pTcon,
2297 int netfid, const char *target_name, 2297 int netfid, const char *target_name,
2298 const struct nls_table *nls_codepage, int remap) 2298 const struct nls_table *nls_codepage, int remap)
2299{ 2299{
@@ -2373,7 +2373,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
2373} 2373}
2374 2374
2375int 2375int
2376CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName, 2376CIFSSMBCopy(const int xid, struct cifs_tcon *tcon, const char *fromName,
2377 const __u16 target_tid, const char *toName, const int flags, 2377 const __u16 target_tid, const char *toName, const int flags,
2378 const struct nls_table *nls_codepage, int remap) 2378 const struct nls_table *nls_codepage, int remap)
2379{ 2379{
@@ -2441,7 +2441,7 @@ copyRetry:
2441} 2441}
2442 2442
2443int 2443int
2444CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, 2444CIFSUnixCreateSymLink(const int xid, struct cifs_tcon *tcon,
2445 const char *fromName, const char *toName, 2445 const char *fromName, const char *toName,
2446 const struct nls_table *nls_codepage) 2446 const struct nls_table *nls_codepage)
2447{ 2447{
@@ -2530,7 +2530,7 @@ createSymLinkRetry:
2530} 2530}
2531 2531
2532int 2532int
2533CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon, 2533CIFSUnixCreateHardLink(const int xid, struct cifs_tcon *tcon,
2534 const char *fromName, const char *toName, 2534 const char *fromName, const char *toName,
2535 const struct nls_table *nls_codepage, int remap) 2535 const struct nls_table *nls_codepage, int remap)
2536{ 2536{
@@ -2615,7 +2615,7 @@ createHardLinkRetry:
2615} 2615}
2616 2616
2617int 2617int
2618CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, 2618CIFSCreateHardLink(const int xid, struct cifs_tcon *tcon,
2619 const char *fromName, const char *toName, 2619 const char *fromName, const char *toName,
2620 const struct nls_table *nls_codepage, int remap) 2620 const struct nls_table *nls_codepage, int remap)
2621{ 2621{
@@ -2687,7 +2687,7 @@ winCreateHardLinkRetry:
2687} 2687}
2688 2688
2689int 2689int
2690CIFSSMBUnixQuerySymLink(const int xid, struct cifsTconInfo *tcon, 2690CIFSSMBUnixQuerySymLink(const int xid, struct cifs_tcon *tcon,
2691 const unsigned char *searchName, char **symlinkinfo, 2691 const unsigned char *searchName, char **symlinkinfo,
2692 const struct nls_table *nls_codepage) 2692 const struct nls_table *nls_codepage)
2693{ 2693{
@@ -2792,7 +2792,7 @@ querySymLinkRetry:
2792 * it is not compiled in by default until callers fixed up and more tested. 2792 * it is not compiled in by default until callers fixed up and more tested.
2793 */ 2793 */
2794int 2794int
2795CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, 2795CIFSSMBQueryReparseLinkInfo(const int xid, struct cifs_tcon *tcon,
2796 const unsigned char *searchName, 2796 const unsigned char *searchName,
2797 char *symlinkinfo, const int buflen, __u16 fid, 2797 char *symlinkinfo, const int buflen, __u16 fid,
2798 const struct nls_table *nls_codepage) 2798 const struct nls_table *nls_codepage)
@@ -3030,7 +3030,7 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL,
3030} 3030}
3031 3031
3032int 3032int
3033CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, 3033CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon,
3034 const unsigned char *searchName, 3034 const unsigned char *searchName,
3035 char *acl_inf, const int buflen, const int acl_type, 3035 char *acl_inf, const int buflen, const int acl_type,
3036 const struct nls_table *nls_codepage, int remap) 3036 const struct nls_table *nls_codepage, int remap)
@@ -3118,7 +3118,7 @@ queryAclRetry:
3118} 3118}
3119 3119
3120int 3120int
3121CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, 3121CIFSSMBSetPosixACL(const int xid, struct cifs_tcon *tcon,
3122 const unsigned char *fileName, 3122 const unsigned char *fileName,
3123 const char *local_acl, const int buflen, 3123 const char *local_acl, const int buflen,
3124 const int acl_type, 3124 const int acl_type,
@@ -3198,7 +3198,7 @@ setACLerrorExit:
3198 3198
3199/* BB fix tabs in this function FIXME BB */ 3199/* BB fix tabs in this function FIXME BB */
3200int 3200int
3201CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, 3201CIFSGetExtAttr(const int xid, struct cifs_tcon *tcon,
3202 const int netfid, __u64 *pExtAttrBits, __u64 *pMask) 3202 const int netfid, __u64 *pExtAttrBits, __u64 *pMask)
3203{ 3203{
3204 int rc = 0; 3204 int rc = 0;
@@ -3291,7 +3291,7 @@ GetExtAttrOut:
3291 */ 3291 */
3292static int 3292static int
3293smb_init_nttransact(const __u16 sub_command, const int setup_count, 3293smb_init_nttransact(const __u16 sub_command, const int setup_count,
3294 const int parm_len, struct cifsTconInfo *tcon, 3294 const int parm_len, struct cifs_tcon *tcon,
3295 void **ret_buf) 3295 void **ret_buf)
3296{ 3296{
3297 int rc; 3297 int rc;
@@ -3374,7 +3374,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata,
3374 3374
3375/* Get Security Descriptor (by handle) from remote server for a file or dir */ 3375/* Get Security Descriptor (by handle) from remote server for a file or dir */
3376int 3376int
3377CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, 3377CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
3378 struct cifs_ntsd **acl_inf, __u32 *pbuflen) 3378 struct cifs_ntsd **acl_inf, __u32 *pbuflen)
3379{ 3379{
3380 int rc = 0; 3380 int rc = 0;
@@ -3466,7 +3466,7 @@ qsec_out:
3466} 3466}
3467 3467
3468int 3468int
3469CIFSSMBSetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, 3469CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
3470 struct cifs_ntsd *pntsd, __u32 acllen) 3470 struct cifs_ntsd *pntsd, __u32 acllen)
3471{ 3471{
3472 __u16 byte_count, param_count, data_count, param_offset, data_offset; 3472 __u16 byte_count, param_count, data_count, param_offset, data_offset;
@@ -3532,7 +3532,7 @@ setCifsAclRetry:
3532 3532
3533/* Legacy Query Path Information call for lookup to old servers such 3533/* Legacy Query Path Information call for lookup to old servers such
3534 as Win9x/WinME */ 3534 as Win9x/WinME */
3535int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, 3535int SMBQueryInformation(const int xid, struct cifs_tcon *tcon,
3536 const unsigned char *searchName, 3536 const unsigned char *searchName,
3537 FILE_ALL_INFO *pFinfo, 3537 FILE_ALL_INFO *pFinfo,
3538 const struct nls_table *nls_codepage, int remap) 3538 const struct nls_table *nls_codepage, int remap)
@@ -3600,7 +3600,7 @@ QInfRetry:
3600} 3600}
3601 3601
3602int 3602int
3603CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon, 3603CIFSSMBQFileInfo(const int xid, struct cifs_tcon *tcon,
3604 u16 netfid, FILE_ALL_INFO *pFindData) 3604 u16 netfid, FILE_ALL_INFO *pFindData)
3605{ 3605{
3606 struct smb_t2_qfi_req *pSMB = NULL; 3606 struct smb_t2_qfi_req *pSMB = NULL;
@@ -3667,7 +3667,7 @@ QFileInfoRetry:
3667} 3667}
3668 3668
3669int 3669int
3670CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, 3670CIFSSMBQPathInfo(const int xid, struct cifs_tcon *tcon,
3671 const unsigned char *searchName, 3671 const unsigned char *searchName,
3672 FILE_ALL_INFO *pFindData, 3672 FILE_ALL_INFO *pFindData,
3673 int legacy /* old style infolevel */, 3673 int legacy /* old style infolevel */,
@@ -3768,7 +3768,7 @@ QPathInfoRetry:
3768} 3768}
3769 3769
3770int 3770int
3771CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon, 3771CIFSSMBUnixQFileInfo(const int xid, struct cifs_tcon *tcon,
3772 u16 netfid, FILE_UNIX_BASIC_INFO *pFindData) 3772 u16 netfid, FILE_UNIX_BASIC_INFO *pFindData)
3773{ 3773{
3774 struct smb_t2_qfi_req *pSMB = NULL; 3774 struct smb_t2_qfi_req *pSMB = NULL;
@@ -3837,7 +3837,7 @@ UnixQFileInfoRetry:
3837} 3837}
3838 3838
3839int 3839int
3840CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, 3840CIFSSMBUnixQPathInfo(const int xid, struct cifs_tcon *tcon,
3841 const unsigned char *searchName, 3841 const unsigned char *searchName,
3842 FILE_UNIX_BASIC_INFO *pFindData, 3842 FILE_UNIX_BASIC_INFO *pFindData,
3843 const struct nls_table *nls_codepage, int remap) 3843 const struct nls_table *nls_codepage, int remap)
@@ -3923,7 +3923,7 @@ UnixQPathInfoRetry:
3923 3923
3924/* xid, tcon, searchName and codepage are input parms, rest are returned */ 3924/* xid, tcon, searchName and codepage are input parms, rest are returned */
3925int 3925int
3926CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, 3926CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
3927 const char *searchName, 3927 const char *searchName,
3928 const struct nls_table *nls_codepage, 3928 const struct nls_table *nls_codepage,
3929 __u16 *pnetfid, 3929 __u16 *pnetfid,
@@ -4071,7 +4071,7 @@ findFirstRetry:
4071 return rc; 4071 return rc;
4072} 4072}
4073 4073
4074int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, 4074int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
4075 __u16 searchHandle, struct cifs_search_info *psrch_inf) 4075 __u16 searchHandle, struct cifs_search_info *psrch_inf)
4076{ 4076{
4077 TRANSACTION2_FNEXT_REQ *pSMB = NULL; 4077 TRANSACTION2_FNEXT_REQ *pSMB = NULL;
@@ -4209,7 +4209,7 @@ FNext2_err_exit:
4209} 4209}
4210 4210
4211int 4211int
4212CIFSFindClose(const int xid, struct cifsTconInfo *tcon, 4212CIFSFindClose(const int xid, struct cifs_tcon *tcon,
4213 const __u16 searchHandle) 4213 const __u16 searchHandle)
4214{ 4214{
4215 int rc = 0; 4215 int rc = 0;
@@ -4241,7 +4241,7 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon,
4241} 4241}
4242 4242
4243int 4243int
4244CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, 4244CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
4245 const unsigned char *searchName, 4245 const unsigned char *searchName,
4246 __u64 *inode_number, 4246 __u64 *inode_number,
4247 const struct nls_table *nls_codepage, int remap) 4247 const struct nls_table *nls_codepage, int remap)
@@ -4443,7 +4443,7 @@ parse_DFS_referrals_exit:
4443} 4443}
4444 4444
4445int 4445int
4446CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 4446CIFSGetDFSRefer(const int xid, struct cifs_ses *ses,
4447 const unsigned char *searchName, 4447 const unsigned char *searchName,
4448 struct dfs_info3_param **target_nodes, 4448 struct dfs_info3_param **target_nodes,
4449 unsigned int *num_of_nodes, 4449 unsigned int *num_of_nodes,
@@ -4492,7 +4492,7 @@ getDFSRetry:
4492 } 4492 }
4493 4493
4494 if (ses->server) { 4494 if (ses->server) {
4495 if (ses->server->secMode & 4495 if (ses->server->sec_mode &
4496 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 4496 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
4497 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 4497 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
4498 } 4498 }
@@ -4557,7 +4557,7 @@ GetDFSRefExit:
4557 4557
4558/* Query File System Info such as free space to old servers such as Win 9x */ 4558/* Query File System Info such as free space to old servers such as Win 9x */
4559int 4559int
4560SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) 4560SMBOldQFSInfo(const int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
4561{ 4561{
4562/* level 0x01 SMB_QUERY_FILE_SYSTEM_INFO */ 4562/* level 0x01 SMB_QUERY_FILE_SYSTEM_INFO */
4563 TRANSACTION2_QFSI_REQ *pSMB = NULL; 4563 TRANSACTION2_QFSI_REQ *pSMB = NULL;
@@ -4636,7 +4636,7 @@ oldQFSInfoRetry:
4636} 4636}
4637 4637
4638int 4638int
4639CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) 4639CIFSSMBQFSInfo(const int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
4640{ 4640{
4641/* level 0x103 SMB_QUERY_FILE_SYSTEM_INFO */ 4641/* level 0x103 SMB_QUERY_FILE_SYSTEM_INFO */
4642 TRANSACTION2_QFSI_REQ *pSMB = NULL; 4642 TRANSACTION2_QFSI_REQ *pSMB = NULL;
@@ -4715,7 +4715,7 @@ QFSInfoRetry:
4715} 4715}
4716 4716
4717int 4717int
4718CIFSSMBQFSAttributeInfo(const int xid, struct cifsTconInfo *tcon) 4718CIFSSMBQFSAttributeInfo(const int xid, struct cifs_tcon *tcon)
4719{ 4719{
4720/* level 0x105 SMB_QUERY_FILE_SYSTEM_INFO */ 4720/* level 0x105 SMB_QUERY_FILE_SYSTEM_INFO */
4721 TRANSACTION2_QFSI_REQ *pSMB = NULL; 4721 TRANSACTION2_QFSI_REQ *pSMB = NULL;
@@ -4785,7 +4785,7 @@ QFSAttributeRetry:
4785} 4785}
4786 4786
4787int 4787int
4788CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon) 4788CIFSSMBQFSDeviceInfo(const int xid, struct cifs_tcon *tcon)
4789{ 4789{
4790/* level 0x104 SMB_QUERY_FILE_SYSTEM_INFO */ 4790/* level 0x104 SMB_QUERY_FILE_SYSTEM_INFO */
4791 TRANSACTION2_QFSI_REQ *pSMB = NULL; 4791 TRANSACTION2_QFSI_REQ *pSMB = NULL;
@@ -4856,7 +4856,7 @@ QFSDeviceRetry:
4856} 4856}
4857 4857
4858int 4858int
4859CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon) 4859CIFSSMBQFSUnixInfo(const int xid, struct cifs_tcon *tcon)
4860{ 4860{
4861/* level 0x200 SMB_QUERY_CIFS_UNIX_INFO */ 4861/* level 0x200 SMB_QUERY_CIFS_UNIX_INFO */
4862 TRANSACTION2_QFSI_REQ *pSMB = NULL; 4862 TRANSACTION2_QFSI_REQ *pSMB = NULL;
@@ -4926,7 +4926,7 @@ QFSUnixRetry:
4926} 4926}
4927 4927
4928int 4928int
4929CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, __u64 cap) 4929CIFSSMBSetFSUnixInfo(const int xid, struct cifs_tcon *tcon, __u64 cap)
4930{ 4930{
4931/* level 0x200 SMB_SET_CIFS_UNIX_INFO */ 4931/* level 0x200 SMB_SET_CIFS_UNIX_INFO */
4932 TRANSACTION2_SETFSI_REQ *pSMB = NULL; 4932 TRANSACTION2_SETFSI_REQ *pSMB = NULL;
@@ -5000,7 +5000,7 @@ SETFSUnixRetry:
5000 5000
5001 5001
5002int 5002int
5003CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, 5003CIFSSMBQFSPosixInfo(const int xid, struct cifs_tcon *tcon,
5004 struct kstatfs *FSData) 5004 struct kstatfs *FSData)
5005{ 5005{
5006/* level 0x201 SMB_QUERY_CIFS_POSIX_INFO */ 5006/* level 0x201 SMB_QUERY_CIFS_POSIX_INFO */
@@ -5093,7 +5093,7 @@ QFSPosixRetry:
5093 in Samba which this routine can run into */ 5093 in Samba which this routine can run into */
5094 5094
5095int 5095int
5096CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName, 5096CIFSSMBSetEOF(const int xid, struct cifs_tcon *tcon, const char *fileName,
5097 __u64 size, bool SetAllocation, 5097 __u64 size, bool SetAllocation,
5098 const struct nls_table *nls_codepage, int remap) 5098 const struct nls_table *nls_codepage, int remap)
5099{ 5099{
@@ -5182,7 +5182,7 @@ SetEOFRetry:
5182} 5182}
5183 5183
5184int 5184int
5185CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, 5185CIFSSMBSetFileSize(const int xid, struct cifs_tcon *tcon, __u64 size,
5186 __u16 fid, __u32 pid_of_opener, bool SetAllocation) 5186 __u16 fid, __u32 pid_of_opener, bool SetAllocation)
5187{ 5187{
5188 struct smb_com_transaction2_sfi_req *pSMB = NULL; 5188 struct smb_com_transaction2_sfi_req *pSMB = NULL;
@@ -5264,7 +5264,7 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
5264 time and resort to the original setpathinfo level which takes the ancient 5264 time and resort to the original setpathinfo level which takes the ancient
5265 DOS time format with 2 second granularity */ 5265 DOS time format with 2 second granularity */
5266int 5266int
5267CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, 5267CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
5268 const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener) 5268 const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener)
5269{ 5269{
5270 struct smb_com_transaction2_sfi_req *pSMB = NULL; 5270 struct smb_com_transaction2_sfi_req *pSMB = NULL;
@@ -5326,7 +5326,7 @@ CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon,
5326} 5326}
5327 5327
5328int 5328int
5329CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, 5329CIFSSMBSetFileDisposition(const int xid, struct cifs_tcon *tcon,
5330 bool delete_file, __u16 fid, __u32 pid_of_opener) 5330 bool delete_file, __u16 fid, __u32 pid_of_opener)
5331{ 5331{
5332 struct smb_com_transaction2_sfi_req *pSMB = NULL; 5332 struct smb_com_transaction2_sfi_req *pSMB = NULL;
@@ -5382,7 +5382,7 @@ CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon,
5382} 5382}
5383 5383
5384int 5384int
5385CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, 5385CIFSSMBSetPathInfo(const int xid, struct cifs_tcon *tcon,
5386 const char *fileName, const FILE_BASIC_INFO *data, 5386 const char *fileName, const FILE_BASIC_INFO *data,
5387 const struct nls_table *nls_codepage, int remap) 5387 const struct nls_table *nls_codepage, int remap)
5388{ 5388{
@@ -5466,7 +5466,7 @@ SetTimesRetry:
5466 handling it anyway and NT4 was what we thought it would be needed for 5466 handling it anyway and NT4 was what we thought it would be needed for
5467 Do not delete it until we prove whether needed for Win9x though */ 5467 Do not delete it until we prove whether needed for Win9x though */
5468int 5468int
5469CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, char *fileName, 5469CIFSSMBSetAttrLegacy(int xid, struct cifs_tcon *tcon, char *fileName,
5470 __u16 dos_attrs, const struct nls_table *nls_codepage) 5470 __u16 dos_attrs, const struct nls_table *nls_codepage)
5471{ 5471{
5472 SETATTR_REQ *pSMB = NULL; 5472 SETATTR_REQ *pSMB = NULL;
@@ -5554,7 +5554,7 @@ cifs_fill_unix_set_info(FILE_UNIX_BASIC_INFO *data_offset,
5554} 5554}
5555 5555
5556int 5556int
5557CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, 5557CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
5558 const struct cifs_unix_set_info_args *args, 5558 const struct cifs_unix_set_info_args *args,
5559 u16 fid, u32 pid_of_opener) 5559 u16 fid, u32 pid_of_opener)
5560{ 5560{
@@ -5617,7 +5617,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon,
5617} 5617}
5618 5618
5619int 5619int
5620CIFSSMBUnixSetPathInfo(const int xid, struct cifsTconInfo *tcon, char *fileName, 5620CIFSSMBUnixSetPathInfo(const int xid, struct cifs_tcon *tcon, char *fileName,
5621 const struct cifs_unix_set_info_args *args, 5621 const struct cifs_unix_set_info_args *args,
5622 const struct nls_table *nls_codepage, int remap) 5622 const struct nls_table *nls_codepage, int remap)
5623{ 5623{
@@ -5704,7 +5704,7 @@ setPermsRetry:
5704 * the data isn't copied to it, but the length is returned. 5704 * the data isn't copied to it, but the length is returned.
5705 */ 5705 */
5706ssize_t 5706ssize_t
5707CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, 5707CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
5708 const unsigned char *searchName, const unsigned char *ea_name, 5708 const unsigned char *searchName, const unsigned char *ea_name,
5709 char *EAData, size_t buf_size, 5709 char *EAData, size_t buf_size,
5710 const struct nls_table *nls_codepage, int remap) 5710 const struct nls_table *nls_codepage, int remap)
@@ -5885,7 +5885,7 @@ QAllEAsOut:
5885} 5885}
5886 5886
5887int 5887int
5888CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName, 5888CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon, const char *fileName,
5889 const char *ea_name, const void *ea_value, 5889 const char *ea_name, const void *ea_value,
5890 const __u16 ea_value_len, const struct nls_table *nls_codepage, 5890 const __u16 ea_value_len, const struct nls_table *nls_codepage,
5891 int remap) 5891 int remap)
@@ -6012,7 +6012,7 @@ SetEARetry:
6012 * incompatible for network fs clients, we could instead simply 6012 * incompatible for network fs clients, we could instead simply
6013 * expose this config flag by adding a future cifs (and smb2) notify ioctl. 6013 * expose this config flag by adding a future cifs (and smb2) notify ioctl.
6014 */ 6014 */
6015int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, 6015int CIFSSMBNotify(const int xid, struct cifs_tcon *tcon,
6016 const int notify_subdirs, const __u16 netfid, 6016 const int notify_subdirs, const __u16 netfid,
6017 __u32 filter, struct file *pfile, int multishot, 6017 __u32 filter, struct file *pfile, int multishot,
6018 const struct nls_table *nls_codepage) 6018 const struct nls_table *nls_codepage)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 21bc83586beb..6d88b82537c3 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -79,8 +79,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
79{ 79{
80 int rc = 0; 80 int rc = 0;
81 struct list_head *tmp, *tmp2; 81 struct list_head *tmp, *tmp2;
82 struct cifsSesInfo *ses; 82 struct cifs_ses *ses;
83 struct cifsTconInfo *tcon; 83 struct cifs_tcon *tcon;
84 struct mid_q_entry *mid_entry; 84 struct mid_q_entry *mid_entry;
85 struct list_head retry_list; 85 struct list_head retry_list;
86 86
@@ -102,11 +102,11 @@ cifs_reconnect(struct TCP_Server_Info *server)
102 cFYI(1, "%s: marking sessions and tcons for reconnect", __func__); 102 cFYI(1, "%s: marking sessions and tcons for reconnect", __func__);
103 spin_lock(&cifs_tcp_ses_lock); 103 spin_lock(&cifs_tcp_ses_lock);
104 list_for_each(tmp, &server->smb_ses_list) { 104 list_for_each(tmp, &server->smb_ses_list) {
105 ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); 105 ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
106 ses->need_reconnect = true; 106 ses->need_reconnect = true;
107 ses->ipc_tid = 0; 107 ses->ipc_tid = 0;
108 list_for_each(tmp2, &ses->tcon_list) { 108 list_for_each(tmp2, &ses->tcon_list) {
109 tcon = list_entry(tmp2, struct cifsTconInfo, tcon_list); 109 tcon = list_entry(tmp2, struct cifs_tcon, tcon_list);
110 tcon->need_reconnect = true; 110 tcon->need_reconnect = true;
111 } 111 }
112 } 112 }
@@ -1597,10 +1597,10 @@ match_security(struct TCP_Server_Info *server, struct smb_vol *vol)
1597 1597
1598 /* now check if signing mode is acceptable */ 1598 /* now check if signing mode is acceptable */
1599 if ((secFlags & CIFSSEC_MAY_SIGN) == 0 && 1599 if ((secFlags & CIFSSEC_MAY_SIGN) == 0 &&
1600 (server->secMode & SECMODE_SIGN_REQUIRED)) 1600 (server->sec_mode & SECMODE_SIGN_REQUIRED))
1601 return false; 1601 return false;
1602 else if (((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) && 1602 else if (((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) &&
1603 (server->secMode & 1603 (server->sec_mode &
1604 (SECMODE_SIGN_ENABLED|SECMODE_SIGN_REQUIRED)) == 0) 1604 (SECMODE_SIGN_ENABLED|SECMODE_SIGN_REQUIRED)) == 0)
1605 return false; 1605 return false;
1606 1606
@@ -1827,7 +1827,7 @@ out_err:
1827 return ERR_PTR(rc); 1827 return ERR_PTR(rc);
1828} 1828}
1829 1829
1830static int match_session(struct cifsSesInfo *ses, struct smb_vol *vol) 1830static int match_session(struct cifs_ses *ses, struct smb_vol *vol)
1831{ 1831{
1832 switch (ses->server->secType) { 1832 switch (ses->server->secType) {
1833 case Kerberos: 1833 case Kerberos:
@@ -1851,10 +1851,10 @@ static int match_session(struct cifsSesInfo *ses, struct smb_vol *vol)
1851 return 1; 1851 return 1;
1852} 1852}
1853 1853
1854static struct cifsSesInfo * 1854static struct cifs_ses *
1855cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) 1855cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
1856{ 1856{
1857 struct cifsSesInfo *ses; 1857 struct cifs_ses *ses;
1858 1858
1859 spin_lock(&cifs_tcp_ses_lock); 1859 spin_lock(&cifs_tcp_ses_lock);
1860 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { 1860 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
@@ -1869,7 +1869,7 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
1869} 1869}
1870 1870
1871static void 1871static void
1872cifs_put_smb_ses(struct cifsSesInfo *ses) 1872cifs_put_smb_ses(struct cifs_ses *ses)
1873{ 1873{
1874 int xid; 1874 int xid;
1875 struct TCP_Server_Info *server = ses->server; 1875 struct TCP_Server_Info *server = ses->server;
@@ -1895,11 +1895,11 @@ cifs_put_smb_ses(struct cifsSesInfo *ses)
1895 1895
1896static bool warned_on_ntlm; /* globals init to false automatically */ 1896static bool warned_on_ntlm; /* globals init to false automatically */
1897 1897
1898static struct cifsSesInfo * 1898static struct cifs_ses *
1899cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) 1899cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
1900{ 1900{
1901 int rc = -ENOMEM, xid; 1901 int rc = -ENOMEM, xid;
1902 struct cifsSesInfo *ses; 1902 struct cifs_ses *ses;
1903 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; 1903 struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr;
1904 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; 1904 struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr;
1905 1905
@@ -2002,7 +2002,7 @@ get_ses_fail:
2002 return ERR_PTR(rc); 2002 return ERR_PTR(rc);
2003} 2003}
2004 2004
2005static int match_tcon(struct cifsTconInfo *tcon, const char *unc) 2005static int match_tcon(struct cifs_tcon *tcon, const char *unc)
2006{ 2006{
2007 if (tcon->tidStatus == CifsExiting) 2007 if (tcon->tidStatus == CifsExiting)
2008 return 0; 2008 return 0;
@@ -2011,15 +2011,15 @@ static int match_tcon(struct cifsTconInfo *tcon, const char *unc)
2011 return 1; 2011 return 1;
2012} 2012}
2013 2013
2014static struct cifsTconInfo * 2014static struct cifs_tcon *
2015cifs_find_tcon(struct cifsSesInfo *ses, const char *unc) 2015cifs_find_tcon(struct cifs_ses *ses, const char *unc)
2016{ 2016{
2017 struct list_head *tmp; 2017 struct list_head *tmp;
2018 struct cifsTconInfo *tcon; 2018 struct cifs_tcon *tcon;
2019 2019
2020 spin_lock(&cifs_tcp_ses_lock); 2020 spin_lock(&cifs_tcp_ses_lock);
2021 list_for_each(tmp, &ses->tcon_list) { 2021 list_for_each(tmp, &ses->tcon_list) {
2022 tcon = list_entry(tmp, struct cifsTconInfo, tcon_list); 2022 tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
2023 if (!match_tcon(tcon, unc)) 2023 if (!match_tcon(tcon, unc))
2024 continue; 2024 continue;
2025 ++tcon->tc_count; 2025 ++tcon->tc_count;
@@ -2031,10 +2031,10 @@ cifs_find_tcon(struct cifsSesInfo *ses, const char *unc)
2031} 2031}
2032 2032
2033static void 2033static void
2034cifs_put_tcon(struct cifsTconInfo *tcon) 2034cifs_put_tcon(struct cifs_tcon *tcon)
2035{ 2035{
2036 int xid; 2036 int xid;
2037 struct cifsSesInfo *ses = tcon->ses; 2037 struct cifs_ses *ses = tcon->ses;
2038 2038
2039 cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count); 2039 cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count);
2040 spin_lock(&cifs_tcp_ses_lock); 2040 spin_lock(&cifs_tcp_ses_lock);
@@ -2055,11 +2055,11 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
2055 cifs_put_smb_ses(ses); 2055 cifs_put_smb_ses(ses);
2056} 2056}
2057 2057
2058static struct cifsTconInfo * 2058static struct cifs_tcon *
2059cifs_get_tcon(struct cifsSesInfo *ses, struct smb_vol *volume_info) 2059cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
2060{ 2060{
2061 int rc, xid; 2061 int rc, xid;
2062 struct cifsTconInfo *tcon; 2062 struct cifs_tcon *tcon;
2063 2063
2064 tcon = cifs_find_tcon(ses, volume_info->UNC); 2064 tcon = cifs_find_tcon(ses, volume_info->UNC);
2065 if (tcon) { 2065 if (tcon) {
@@ -2197,8 +2197,8 @@ cifs_match_super(struct super_block *sb, void *data)
2197 struct smb_vol *volume_info; 2197 struct smb_vol *volume_info;
2198 struct cifs_sb_info *cifs_sb; 2198 struct cifs_sb_info *cifs_sb;
2199 struct TCP_Server_Info *tcp_srv; 2199 struct TCP_Server_Info *tcp_srv;
2200 struct cifsSesInfo *ses; 2200 struct cifs_ses *ses;
2201 struct cifsTconInfo *tcon; 2201 struct cifs_tcon *tcon;
2202 struct tcon_link *tlink; 2202 struct tcon_link *tlink;
2203 struct sockaddr_storage addr; 2203 struct sockaddr_storage addr;
2204 int rc = 0; 2204 int rc = 0;
@@ -2243,7 +2243,7 @@ out:
2243} 2243}
2244 2244
2245int 2245int
2246get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, 2246get_dfs_path(int xid, struct cifs_ses *pSesInfo, const char *old_path,
2247 const struct nls_table *nls_codepage, unsigned int *pnum_referrals, 2247 const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
2248 struct dfs_info3_param **preferrals, int remap) 2248 struct dfs_info3_param **preferrals, int remap)
2249{ 2249{
@@ -2542,7 +2542,7 @@ ip_connect(struct TCP_Server_Info *server)
2542 return generic_ip_connect(server); 2542 return generic_ip_connect(server);
2543} 2543}
2544 2544
2545void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, 2545void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
2546 struct super_block *sb, struct smb_vol *vol_info) 2546 struct super_block *sb, struct smb_vol *vol_info)
2547{ 2547{
2548 /* if we are reconnecting then should we check to see if 2548 /* if we are reconnecting then should we check to see if
@@ -2771,7 +2771,7 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
2771#define CIFS_DEFAULT_WSIZE (1024 * 1024) 2771#define CIFS_DEFAULT_WSIZE (1024 * 1024)
2772 2772
2773static unsigned int 2773static unsigned int
2774cifs_negotiate_wsize(struct cifsTconInfo *tcon, struct smb_vol *pvolume_info) 2774cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info)
2775{ 2775{
2776 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); 2776 __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability);
2777 struct TCP_Server_Info *server = tcon->ses->server; 2777 struct TCP_Server_Info *server = tcon->ses->server;
@@ -2793,7 +2793,7 @@ cifs_negotiate_wsize(struct cifsTconInfo *tcon, struct smb_vol *pvolume_info)
2793} 2793}
2794 2794
2795static int 2795static int
2796is_path_accessible(int xid, struct cifsTconInfo *tcon, 2796is_path_accessible(int xid, struct cifs_tcon *tcon,
2797 struct cifs_sb_info *cifs_sb, const char *full_path) 2797 struct cifs_sb_info *cifs_sb, const char *full_path)
2798{ 2798{
2799 int rc; 2799 int rc;
@@ -2868,7 +2868,7 @@ build_unc_path_to_root(const struct smb_vol *volume_info,
2868 * determine whether there were referrals. 2868 * determine whether there were referrals.
2869 */ 2869 */
2870static int 2870static int
2871expand_dfs_referral(int xid, struct cifsSesInfo *pSesInfo, 2871expand_dfs_referral(int xid, struct cifs_ses *pSesInfo,
2872 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, 2872 struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb,
2873 int check_prefix) 2873 int check_prefix)
2874{ 2874{
@@ -2973,8 +2973,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2973{ 2973{
2974 int rc = 0; 2974 int rc = 0;
2975 int xid; 2975 int xid;
2976 struct cifsSesInfo *pSesInfo; 2976 struct cifs_ses *pSesInfo;
2977 struct cifsTconInfo *tcon; 2977 struct cifs_tcon *tcon;
2978 struct TCP_Server_Info *srvTcp; 2978 struct TCP_Server_Info *srvTcp;
2979 char *full_path; 2979 char *full_path;
2980 struct tcon_link *tlink; 2980 struct tcon_link *tlink;
@@ -3172,8 +3172,8 @@ out:
3172} 3172}
3173 3173
3174int 3174int
3175CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, 3175CIFSTCon(unsigned int xid, struct cifs_ses *ses,
3176 const char *tree, struct cifsTconInfo *tcon, 3176 const char *tree, struct cifs_tcon *tcon,
3177 const struct nls_table *nls_codepage) 3177 const struct nls_table *nls_codepage)
3178{ 3178{
3179 struct smb_hdr *smb_buffer; 3179 struct smb_hdr *smb_buffer;
@@ -3205,7 +3205,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3205 pSMB->AndXCommand = 0xFF; 3205 pSMB->AndXCommand = 0xFF;
3206 pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO); 3206 pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
3207 bcc_ptr = &pSMB->Password[0]; 3207 bcc_ptr = &pSMB->Password[0];
3208 if ((ses->server->secMode) & SECMODE_USER) { 3208 if ((ses->server->sec_mode) & SECMODE_USER) {
3209 pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ 3209 pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
3210 *bcc_ptr = 0; /* password is null byte */ 3210 *bcc_ptr = 0; /* password is null byte */
3211 bcc_ptr++; /* skip password */ 3211 bcc_ptr++; /* skip password */
@@ -3222,7 +3222,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3222 if ((global_secflags & CIFSSEC_MAY_LANMAN) && 3222 if ((global_secflags & CIFSSEC_MAY_LANMAN) &&
3223 (ses->server->secType == LANMAN)) 3223 (ses->server->secType == LANMAN))
3224 calc_lanman_hash(tcon->password, ses->server->cryptkey, 3224 calc_lanman_hash(tcon->password, ses->server->cryptkey,
3225 ses->server->secMode & 3225 ses->server->sec_mode &
3226 SECMODE_PW_ENCRYPT ? true : false, 3226 SECMODE_PW_ENCRYPT ? true : false,
3227 bcc_ptr); 3227 bcc_ptr);
3228 else 3228 else
@@ -3238,7 +3238,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3238 } 3238 }
3239 } 3239 }
3240 3240
3241 if (ses->server->secMode & 3241 if (ses->server->sec_mode &
3242 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 3242 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
3243 smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 3243 smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
3244 3244
@@ -3353,7 +3353,7 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
3353 return 0; 3353 return 0;
3354} 3354}
3355 3355
3356int cifs_negotiate_protocol(unsigned int xid, struct cifsSesInfo *ses) 3356int cifs_negotiate_protocol(unsigned int xid, struct cifs_ses *ses)
3357{ 3357{
3358 int rc = 0; 3358 int rc = 0;
3359 struct TCP_Server_Info *server = ses->server; 3359 struct TCP_Server_Info *server = ses->server;
@@ -3383,7 +3383,7 @@ int cifs_negotiate_protocol(unsigned int xid, struct cifsSesInfo *ses)
3383} 3383}
3384 3384
3385 3385
3386int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses, 3386int cifs_setup_session(unsigned int xid, struct cifs_ses *ses,
3387 struct nls_table *nls_info) 3387 struct nls_table *nls_info)
3388{ 3388{
3389 int rc = 0; 3389 int rc = 0;
@@ -3395,7 +3395,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses,
3395 ses->capabilities &= (~CAP_UNIX); 3395 ses->capabilities &= (~CAP_UNIX);
3396 3396
3397 cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", 3397 cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d",
3398 server->secMode, server->capabilities, server->timeAdj); 3398 server->sec_mode, server->capabilities, server->timeAdj);
3399 3399
3400 rc = CIFS_SessSetup(xid, ses, nls_info); 3400 rc = CIFS_SessSetup(xid, ses, nls_info);
3401 if (rc) { 3401 if (rc) {
@@ -3427,12 +3427,12 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses,
3427 return rc; 3427 return rc;
3428} 3428}
3429 3429
3430static struct cifsTconInfo * 3430static struct cifs_tcon *
3431cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid) 3431cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
3432{ 3432{
3433 struct cifsTconInfo *master_tcon = cifs_sb_master_tcon(cifs_sb); 3433 struct cifs_tcon *master_tcon = cifs_sb_master_tcon(cifs_sb);
3434 struct cifsSesInfo *ses; 3434 struct cifs_ses *ses;
3435 struct cifsTconInfo *tcon = NULL; 3435 struct cifs_tcon *tcon = NULL;
3436 struct smb_vol *vol_info; 3436 struct smb_vol *vol_info;
3437 char username[28]; /* big enough for "krb50x" + hex of ULONG_MAX 6+16 */ 3437 char username[28]; /* big enough for "krb50x" + hex of ULONG_MAX 6+16 */
3438 /* We used to have this as MAX_USERNAME which is */ 3438 /* We used to have this as MAX_USERNAME which is */
@@ -3465,7 +3465,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
3465 3465
3466 ses = cifs_get_smb_ses(master_tcon->ses->server, vol_info); 3466 ses = cifs_get_smb_ses(master_tcon->ses->server, vol_info);
3467 if (IS_ERR(ses)) { 3467 if (IS_ERR(ses)) {
3468 tcon = (struct cifsTconInfo *)ses; 3468 tcon = (struct cifs_tcon *)ses;
3469 cifs_put_tcp_session(master_tcon->ses->server); 3469 cifs_put_tcp_session(master_tcon->ses->server);
3470 goto out; 3470 goto out;
3471 } 3471 }
@@ -3490,7 +3490,7 @@ cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb)
3490 return cifs_sb->master_tlink; 3490 return cifs_sb->master_tlink;
3491} 3491}
3492 3492
3493struct cifsTconInfo * 3493struct cifs_tcon *
3494cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb) 3494cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb)
3495{ 3495{
3496 return tlink_tcon(cifs_sb_master_tlink(cifs_sb)); 3496 return tlink_tcon(cifs_sb_master_tlink(cifs_sb));
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index aa0669a82922..81914df47ef1 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -54,7 +54,7 @@ build_path_from_dentry(struct dentry *direntry)
54 char *full_path; 54 char *full_path;
55 char dirsep; 55 char dirsep;
56 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); 56 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
57 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 57 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
58 58
59 if (direntry == NULL) 59 if (direntry == NULL)
60 return NULL; /* not much we can do if dentry is freed and 60 return NULL; /* not much we can do if dentry is freed and
@@ -149,7 +149,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
149 __u16 fileHandle; 149 __u16 fileHandle;
150 struct cifs_sb_info *cifs_sb; 150 struct cifs_sb_info *cifs_sb;
151 struct tcon_link *tlink; 151 struct tcon_link *tlink;
152 struct cifsTconInfo *tcon; 152 struct cifs_tcon *tcon;
153 char *full_path = NULL; 153 char *full_path = NULL;
154 FILE_ALL_INFO *buf = NULL; 154 FILE_ALL_INFO *buf = NULL;
155 struct inode *newinode = NULL; 155 struct inode *newinode = NULL;
@@ -353,7 +353,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
353 int xid; 353 int xid;
354 struct cifs_sb_info *cifs_sb; 354 struct cifs_sb_info *cifs_sb;
355 struct tcon_link *tlink; 355 struct tcon_link *tlink;
356 struct cifsTconInfo *pTcon; 356 struct cifs_tcon *pTcon;
357 struct cifs_io_parms io_parms; 357 struct cifs_io_parms io_parms;
358 char *full_path = NULL; 358 char *full_path = NULL;
359 struct inode *newinode = NULL; 359 struct inode *newinode = NULL;
@@ -485,7 +485,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
485 bool posix_open = false; 485 bool posix_open = false;
486 struct cifs_sb_info *cifs_sb; 486 struct cifs_sb_info *cifs_sb;
487 struct tcon_link *tlink; 487 struct tcon_link *tlink;
488 struct cifsTconInfo *pTcon; 488 struct cifs_tcon *pTcon;
489 struct cifsFileInfo *cfile; 489 struct cifsFileInfo *cfile;
490 struct inode *newInode = NULL; 490 struct inode *newInode = NULL;
491 char *full_path = NULL; 491 char *full_path = NULL;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 7db74d17a429..bb71471a4d9d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -114,7 +114,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
114 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 114 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
115 struct cifs_fattr fattr; 115 struct cifs_fattr fattr;
116 struct tcon_link *tlink; 116 struct tcon_link *tlink;
117 struct cifsTconInfo *tcon; 117 struct cifs_tcon *tcon;
118 118
119 cFYI(1, "posix open %s", full_path); 119 cFYI(1, "posix open %s", full_path);
120 120
@@ -168,7 +168,7 @@ posix_open_ret:
168 168
169static int 169static int
170cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb, 170cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
171 struct cifsTconInfo *tcon, unsigned int f_flags, __u32 *poplock, 171 struct cifs_tcon *tcon, unsigned int f_flags, __u32 *poplock,
172 __u16 *pnetfid, int xid) 172 __u16 *pnetfid, int xid)
173{ 173{
174 int rc; 174 int rc;
@@ -285,7 +285,7 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file,
285void cifsFileInfo_put(struct cifsFileInfo *cifs_file) 285void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
286{ 286{
287 struct inode *inode = cifs_file->dentry->d_inode; 287 struct inode *inode = cifs_file->dentry->d_inode;
288 struct cifsTconInfo *tcon = tlink_tcon(cifs_file->tlink); 288 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
289 struct cifsInodeInfo *cifsi = CIFS_I(inode); 289 struct cifsInodeInfo *cifsi = CIFS_I(inode);
290 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 290 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
291 struct cifsLockInfo *li, *tmp; 291 struct cifsLockInfo *li, *tmp;
@@ -343,7 +343,7 @@ int cifs_open(struct inode *inode, struct file *file)
343 int xid; 343 int xid;
344 __u32 oplock; 344 __u32 oplock;
345 struct cifs_sb_info *cifs_sb; 345 struct cifs_sb_info *cifs_sb;
346 struct cifsTconInfo *tcon; 346 struct cifs_tcon *tcon;
347 struct tcon_link *tlink; 347 struct tcon_link *tlink;
348 struct cifsFileInfo *pCifsFile = NULL; 348 struct cifsFileInfo *pCifsFile = NULL;
349 char *full_path = NULL; 349 char *full_path = NULL;
@@ -457,7 +457,7 @@ static int cifs_reopen_file(struct cifsFileInfo *pCifsFile, bool can_flush)
457 int xid; 457 int xid;
458 __u32 oplock; 458 __u32 oplock;
459 struct cifs_sb_info *cifs_sb; 459 struct cifs_sb_info *cifs_sb;
460 struct cifsTconInfo *tcon; 460 struct cifs_tcon *tcon;
461 struct cifsInodeInfo *pCifsInode; 461 struct cifsInodeInfo *pCifsInode;
462 struct inode *inode; 462 struct inode *inode;
463 char *full_path = NULL; 463 char *full_path = NULL;
@@ -596,7 +596,7 @@ int cifs_closedir(struct inode *inode, struct file *file)
596 xid = GetXid(); 596 xid = GetXid();
597 597
598 if (pCFileStruct) { 598 if (pCFileStruct) {
599 struct cifsTconInfo *pTcon = tlink_tcon(pCFileStruct->tlink); 599 struct cifs_tcon *pTcon = tlink_tcon(pCFileStruct->tlink);
600 600
601 cFYI(1, "Freeing private data in close dir"); 601 cFYI(1, "Freeing private data in close dir");
602 spin_lock(&cifs_file_list_lock); 602 spin_lock(&cifs_file_list_lock);
@@ -653,7 +653,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
653 __u64 length; 653 __u64 length;
654 bool wait_flag = false; 654 bool wait_flag = false;
655 struct cifs_sb_info *cifs_sb; 655 struct cifs_sb_info *cifs_sb;
656 struct cifsTconInfo *tcon; 656 struct cifs_tcon *tcon;
657 __u16 netfid; 657 __u16 netfid;
658 __u8 lockType = LOCKING_ANDX_LARGE_FILES; 658 __u8 lockType = LOCKING_ANDX_LARGE_FILES;
659 bool posix_locking = 0; 659 bool posix_locking = 0;
@@ -865,7 +865,7 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, __u32 pid,
865 unsigned int bytes_written = 0; 865 unsigned int bytes_written = 0;
866 unsigned int total_written; 866 unsigned int total_written;
867 struct cifs_sb_info *cifs_sb; 867 struct cifs_sb_info *cifs_sb;
868 struct cifsTconInfo *pTcon; 868 struct cifs_tcon *pTcon;
869 int xid; 869 int xid;
870 struct dentry *dentry = open_file->dentry; 870 struct dentry *dentry = open_file->dentry;
871 struct cifsInodeInfo *cifsi = CIFS_I(dentry->d_inode); 871 struct cifsInodeInfo *cifsi = CIFS_I(dentry->d_inode);
@@ -1405,7 +1405,7 @@ int cifs_strict_fsync(struct file *file, int datasync)
1405{ 1405{
1406 int xid; 1406 int xid;
1407 int rc = 0; 1407 int rc = 0;
1408 struct cifsTconInfo *tcon; 1408 struct cifs_tcon *tcon;
1409 struct cifsFileInfo *smbfile = file->private_data; 1409 struct cifsFileInfo *smbfile = file->private_data;
1410 struct inode *inode = file->f_path.dentry->d_inode; 1410 struct inode *inode = file->f_path.dentry->d_inode;
1411 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1411 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
@@ -1435,7 +1435,7 @@ int cifs_fsync(struct file *file, int datasync)
1435{ 1435{
1436 int xid; 1436 int xid;
1437 int rc = 0; 1437 int rc = 0;
1438 struct cifsTconInfo *tcon; 1438 struct cifs_tcon *tcon;
1439 struct cifsFileInfo *smbfile = file->private_data; 1439 struct cifsFileInfo *smbfile = file->private_data;
1440 struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); 1440 struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
1441 1441
@@ -1526,7 +1526,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
1526 struct iov_iter it; 1526 struct iov_iter it;
1527 struct inode *inode; 1527 struct inode *inode;
1528 struct cifsFileInfo *open_file; 1528 struct cifsFileInfo *open_file;
1529 struct cifsTconInfo *pTcon; 1529 struct cifs_tcon *pTcon;
1530 struct cifs_sb_info *cifs_sb; 1530 struct cifs_sb_info *cifs_sb;
1531 struct cifs_io_parms io_parms; 1531 struct cifs_io_parms io_parms;
1532 int xid, rc; 1532 int xid, rc;
@@ -1693,7 +1693,7 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
1693 size_t len, cur_len; 1693 size_t len, cur_len;
1694 int iov_offset = 0; 1694 int iov_offset = 0;
1695 struct cifs_sb_info *cifs_sb; 1695 struct cifs_sb_info *cifs_sb;
1696 struct cifsTconInfo *pTcon; 1696 struct cifs_tcon *pTcon;
1697 struct cifsFileInfo *open_file; 1697 struct cifsFileInfo *open_file;
1698 struct smb_com_read_rsp *pSMBr; 1698 struct smb_com_read_rsp *pSMBr;
1699 struct cifs_io_parms io_parms; 1699 struct cifs_io_parms io_parms;
@@ -1815,7 +1815,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
1815 unsigned int total_read; 1815 unsigned int total_read;
1816 unsigned int current_read_size; 1816 unsigned int current_read_size;
1817 struct cifs_sb_info *cifs_sb; 1817 struct cifs_sb_info *cifs_sb;
1818 struct cifsTconInfo *pTcon; 1818 struct cifs_tcon *pTcon;
1819 int xid; 1819 int xid;
1820 char *current_offset; 1820 char *current_offset;
1821 struct cifsFileInfo *open_file; 1821 struct cifsFileInfo *open_file;
@@ -1998,7 +1998,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
1998 loff_t offset; 1998 loff_t offset;
1999 struct page *page; 1999 struct page *page;
2000 struct cifs_sb_info *cifs_sb; 2000 struct cifs_sb_info *cifs_sb;
2001 struct cifsTconInfo *pTcon; 2001 struct cifs_tcon *pTcon;
2002 unsigned int bytes_read = 0; 2002 unsigned int bytes_read = 0;
2003 unsigned int read_size, i; 2003 unsigned int read_size, i;
2004 char *smb_read_data = NULL; 2004 char *smb_read_data = NULL;
diff --git a/fs/cifs/fscache.c b/fs/cifs/fscache.c
index 297a43d0ff7f..d368a47ba5eb 100644
--- a/fs/cifs/fscache.c
+++ b/fs/cifs/fscache.c
@@ -40,7 +40,7 @@ void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
40 server->fscache = NULL; 40 server->fscache = NULL;
41} 41}
42 42
43void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) 43void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon)
44{ 44{
45 struct TCP_Server_Info *server = tcon->ses->server; 45 struct TCP_Server_Info *server = tcon->ses->server;
46 46
@@ -51,7 +51,7 @@ void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
51 server->fscache, tcon->fscache); 51 server->fscache, tcon->fscache);
52} 52}
53 53
54void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) 54void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon)
55{ 55{
56 cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache); 56 cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache);
57 fscache_relinquish_cookie(tcon->fscache, 0); 57 fscache_relinquish_cookie(tcon->fscache, 0);
@@ -62,7 +62,7 @@ static void cifs_fscache_enable_inode_cookie(struct inode *inode)
62{ 62{
63 struct cifsInodeInfo *cifsi = CIFS_I(inode); 63 struct cifsInodeInfo *cifsi = CIFS_I(inode);
64 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 64 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
65 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 65 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
66 66
67 if (cifsi->fscache) 67 if (cifsi->fscache)
68 return; 68 return;
diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
index 31b88ec2341e..63539323e0b9 100644
--- a/fs/cifs/fscache.h
+++ b/fs/cifs/fscache.h
@@ -40,8 +40,8 @@ extern void cifs_fscache_unregister(void);
40 */ 40 */
41extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *); 41extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
42extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *); 42extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
43extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *); 43extern void cifs_fscache_get_super_cookie(struct cifs_tcon *);
44extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *); 44extern void cifs_fscache_release_super_cookie(struct cifs_tcon *);
45 45
46extern void cifs_fscache_release_inode_cookie(struct inode *); 46extern void cifs_fscache_release_inode_cookie(struct inode *);
47extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *); 47extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
@@ -99,9 +99,9 @@ static inline void
99cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {} 99cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
100static inline void 100static inline void
101cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) {} 101cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) {}
102static inline void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) {} 102static inline void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) {}
103static inline void 103static inline void
104cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {} 104cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) {}
105 105
106static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {} 106static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
107static inline void cifs_fscache_set_inode_cookie(struct inode *inode, 107static inline void cifs_fscache_set_inode_cookie(struct inode *inode,
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index e2d9dd817ba0..9b018c8334fa 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -295,7 +295,7 @@ int cifs_get_file_info_unix(struct file *filp)
295 struct inode *inode = filp->f_path.dentry->d_inode; 295 struct inode *inode = filp->f_path.dentry->d_inode;
296 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 296 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
297 struct cifsFileInfo *cfile = filp->private_data; 297 struct cifsFileInfo *cfile = filp->private_data;
298 struct cifsTconInfo *tcon = tlink_tcon(cfile->tlink); 298 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
299 299
300 xid = GetXid(); 300 xid = GetXid();
301 rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); 301 rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data);
@@ -318,7 +318,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
318 int rc; 318 int rc;
319 FILE_UNIX_BASIC_INFO find_data; 319 FILE_UNIX_BASIC_INFO find_data;
320 struct cifs_fattr fattr; 320 struct cifs_fattr fattr;
321 struct cifsTconInfo *tcon; 321 struct cifs_tcon *tcon;
322 struct tcon_link *tlink; 322 struct tcon_link *tlink;
323 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 323 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
324 324
@@ -373,7 +373,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const unsigned char *path,
373 int oplock = 0; 373 int oplock = 0;
374 __u16 netfid; 374 __u16 netfid;
375 struct tcon_link *tlink; 375 struct tcon_link *tlink;
376 struct cifsTconInfo *tcon; 376 struct cifs_tcon *tcon;
377 struct cifs_io_parms io_parms; 377 struct cifs_io_parms io_parms;
378 char buf[24]; 378 char buf[24];
379 unsigned int bytes_read; 379 unsigned int bytes_read;
@@ -473,7 +473,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
473 char ea_value[4]; 473 char ea_value[4];
474 __u32 mode; 474 __u32 mode;
475 struct tcon_link *tlink; 475 struct tcon_link *tlink;
476 struct cifsTconInfo *tcon; 476 struct cifs_tcon *tcon;
477 477
478 tlink = cifs_sb_tlink(cifs_sb); 478 tlink = cifs_sb_tlink(cifs_sb);
479 if (IS_ERR(tlink)) 479 if (IS_ERR(tlink))
@@ -507,7 +507,7 @@ static void
507cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info, 507cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
508 struct cifs_sb_info *cifs_sb, bool adjust_tz) 508 struct cifs_sb_info *cifs_sb, bool adjust_tz)
509{ 509{
510 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 510 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
511 511
512 memset(fattr, 0, sizeof(*fattr)); 512 memset(fattr, 0, sizeof(*fattr));
513 fattr->cf_cifsattrs = le32_to_cpu(info->Attributes); 513 fattr->cf_cifsattrs = le32_to_cpu(info->Attributes);
@@ -558,7 +558,7 @@ int cifs_get_file_info(struct file *filp)
558 struct inode *inode = filp->f_path.dentry->d_inode; 558 struct inode *inode = filp->f_path.dentry->d_inode;
559 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 559 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
560 struct cifsFileInfo *cfile = filp->private_data; 560 struct cifsFileInfo *cfile = filp->private_data;
561 struct cifsTconInfo *tcon = tlink_tcon(cfile->tlink); 561 struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
562 562
563 xid = GetXid(); 563 xid = GetXid();
564 rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); 564 rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data);
@@ -595,7 +595,7 @@ int cifs_get_inode_info(struct inode **pinode,
595 struct super_block *sb, int xid, const __u16 *pfid) 595 struct super_block *sb, int xid, const __u16 *pfid)
596{ 596{
597 int rc = 0, tmprc; 597 int rc = 0, tmprc;
598 struct cifsTconInfo *pTcon; 598 struct cifs_tcon *pTcon;
599 struct tcon_link *tlink; 599 struct tcon_link *tlink;
600 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 600 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
601 char *buf = NULL; 601 char *buf = NULL;
@@ -741,7 +741,7 @@ static const struct inode_operations cifs_ipc_inode_ops = {
741}; 741};
742 742
743char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, 743char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
744 struct cifsTconInfo *tcon) 744 struct cifs_tcon *tcon)
745{ 745{
746 int pplen = vol->prepath ? strlen(vol->prepath) : 0; 746 int pplen = vol->prepath ? strlen(vol->prepath) : 0;
747 int dfsplen; 747 int dfsplen;
@@ -889,7 +889,7 @@ struct inode *cifs_root_iget(struct super_block *sb)
889 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 889 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
890 struct inode *inode = NULL; 890 struct inode *inode = NULL;
891 long rc; 891 long rc;
892 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 892 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
893 893
894 xid = GetXid(); 894 xid = GetXid();
895 if (tcon->unix_ext) 895 if (tcon->unix_ext)
@@ -941,7 +941,7 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid,
941 struct cifsInodeInfo *cifsInode = CIFS_I(inode); 941 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
942 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 942 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
943 struct tcon_link *tlink = NULL; 943 struct tcon_link *tlink = NULL;
944 struct cifsTconInfo *pTcon; 944 struct cifs_tcon *pTcon;
945 FILE_BASIC_INFO info_buf; 945 FILE_BASIC_INFO info_buf;
946 946
947 if (attrs == NULL) 947 if (attrs == NULL)
@@ -1059,7 +1059,7 @@ cifs_rename_pending_delete(char *full_path, struct dentry *dentry, int xid)
1059 struct cifsInodeInfo *cifsInode = CIFS_I(inode); 1059 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1060 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1060 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1061 struct tcon_link *tlink; 1061 struct tcon_link *tlink;
1062 struct cifsTconInfo *tcon; 1062 struct cifs_tcon *tcon;
1063 __u32 dosattr, origattr; 1063 __u32 dosattr, origattr;
1064 FILE_BASIC_INFO *info_buf = NULL; 1064 FILE_BASIC_INFO *info_buf = NULL;
1065 1065
@@ -1177,7 +1177,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
1177 struct super_block *sb = dir->i_sb; 1177 struct super_block *sb = dir->i_sb;
1178 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 1178 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
1179 struct tcon_link *tlink; 1179 struct tcon_link *tlink;
1180 struct cifsTconInfo *tcon; 1180 struct cifs_tcon *tcon;
1181 struct iattr *attrs = NULL; 1181 struct iattr *attrs = NULL;
1182 __u32 dosattr = 0, origattr = 0; 1182 __u32 dosattr = 0, origattr = 0;
1183 1183
@@ -1275,7 +1275,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
1275 int xid; 1275 int xid;
1276 struct cifs_sb_info *cifs_sb; 1276 struct cifs_sb_info *cifs_sb;
1277 struct tcon_link *tlink; 1277 struct tcon_link *tlink;
1278 struct cifsTconInfo *pTcon; 1278 struct cifs_tcon *pTcon;
1279 char *full_path = NULL; 1279 char *full_path = NULL;
1280 struct inode *newinode = NULL; 1280 struct inode *newinode = NULL;
1281 struct cifs_fattr fattr; 1281 struct cifs_fattr fattr;
@@ -1453,7 +1453,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
1453 int xid; 1453 int xid;
1454 struct cifs_sb_info *cifs_sb; 1454 struct cifs_sb_info *cifs_sb;
1455 struct tcon_link *tlink; 1455 struct tcon_link *tlink;
1456 struct cifsTconInfo *pTcon; 1456 struct cifs_tcon *pTcon;
1457 char *full_path = NULL; 1457 char *full_path = NULL;
1458 struct cifsInodeInfo *cifsInode; 1458 struct cifsInodeInfo *cifsInode;
1459 1459
@@ -1510,7 +1510,7 @@ cifs_do_rename(int xid, struct dentry *from_dentry, const char *fromPath,
1510{ 1510{
1511 struct cifs_sb_info *cifs_sb = CIFS_SB(from_dentry->d_sb); 1511 struct cifs_sb_info *cifs_sb = CIFS_SB(from_dentry->d_sb);
1512 struct tcon_link *tlink; 1512 struct tcon_link *tlink;
1513 struct cifsTconInfo *pTcon; 1513 struct cifs_tcon *pTcon;
1514 __u16 srcfid; 1514 __u16 srcfid;
1515 int oplock, rc; 1515 int oplock, rc;
1516 1516
@@ -1562,7 +1562,7 @@ int cifs_rename(struct inode *source_dir, struct dentry *source_dentry,
1562 char *toName = NULL; 1562 char *toName = NULL;
1563 struct cifs_sb_info *cifs_sb; 1563 struct cifs_sb_info *cifs_sb;
1564 struct tcon_link *tlink; 1564 struct tcon_link *tlink;
1565 struct cifsTconInfo *tcon; 1565 struct cifs_tcon *tcon;
1566 FILE_UNIX_BASIC_INFO *info_buf_source = NULL; 1566 FILE_UNIX_BASIC_INFO *info_buf_source = NULL;
1567 FILE_UNIX_BASIC_INFO *info_buf_target; 1567 FILE_UNIX_BASIC_INFO *info_buf_target;
1568 int xid, rc, tmprc; 1568 int xid, rc, tmprc;
@@ -1792,7 +1792,7 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
1792 struct kstat *stat) 1792 struct kstat *stat)
1793{ 1793{
1794 struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); 1794 struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb);
1795 struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); 1795 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
1796 struct inode *inode = dentry->d_inode; 1796 struct inode *inode = dentry->d_inode;
1797 int rc; 1797 int rc;
1798 1798
@@ -1870,7 +1870,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs,
1870 struct cifsInodeInfo *cifsInode = CIFS_I(inode); 1870 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1871 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1871 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1872 struct tcon_link *tlink = NULL; 1872 struct tcon_link *tlink = NULL;
1873 struct cifsTconInfo *pTcon = NULL; 1873 struct cifs_tcon *pTcon = NULL;
1874 struct cifs_io_parms io_parms; 1874 struct cifs_io_parms io_parms;
1875 1875
1876 /* 1876 /*
@@ -1971,7 +1971,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
1971 struct cifsInodeInfo *cifsInode = CIFS_I(inode); 1971 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1972 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1972 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1973 struct tcon_link *tlink; 1973 struct tcon_link *tlink;
1974 struct cifsTconInfo *pTcon; 1974 struct cifs_tcon *pTcon;
1975 struct cifs_unix_set_info_args *args = NULL; 1975 struct cifs_unix_set_info_args *args = NULL;
1976 struct cifsFileInfo *open_file; 1976 struct cifsFileInfo *open_file;
1977 1977
@@ -2257,7 +2257,7 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs)
2257{ 2257{
2258 struct inode *inode = direntry->d_inode; 2258 struct inode *inode = direntry->d_inode;
2259 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 2259 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
2260 struct cifsTconInfo *pTcon = cifs_sb_master_tcon(cifs_sb); 2260 struct cifs_tcon *pTcon = cifs_sb_master_tcon(cifs_sb);
2261 2261
2262 if (pTcon->unix_ext) 2262 if (pTcon->unix_ext)
2263 return cifs_setattr_unix(direntry, attrs); 2263 return cifs_setattr_unix(direntry, attrs);
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 0c98672d0122..4221b5e48a42 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -38,7 +38,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
38 struct cifs_sb_info *cifs_sb; 38 struct cifs_sb_info *cifs_sb;
39#ifdef CONFIG_CIFS_POSIX 39#ifdef CONFIG_CIFS_POSIX
40 struct cifsFileInfo *pSMBFile = filep->private_data; 40 struct cifsFileInfo *pSMBFile = filep->private_data;
41 struct cifsTconInfo *tcon; 41 struct cifs_tcon *tcon;
42 __u64 ExtAttrBits = 0; 42 __u64 ExtAttrBits = 0;
43 __u64 ExtAttrMask = 0; 43 __u64 ExtAttrMask = 0;
44 __u64 caps; 44 __u64 caps;
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 4682d44b6f5b..556b1a0b54de 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -175,7 +175,7 @@ CIFSFormatMFSymlink(u8 *buf, unsigned int buf_len, const char *link_str)
175} 175}
176 176
177static int 177static int
178CIFSCreateMFSymLink(const int xid, struct cifsTconInfo *tcon, 178CIFSCreateMFSymLink(const int xid, struct cifs_tcon *tcon,
179 const char *fromName, const char *toName, 179 const char *fromName, const char *toName,
180 const struct nls_table *nls_codepage, int remap) 180 const struct nls_table *nls_codepage, int remap)
181{ 181{
@@ -223,7 +223,7 @@ CIFSCreateMFSymLink(const int xid, struct cifsTconInfo *tcon,
223} 223}
224 224
225static int 225static int
226CIFSQueryMFSymLink(const int xid, struct cifsTconInfo *tcon, 226CIFSQueryMFSymLink(const int xid, struct cifs_tcon *tcon,
227 const unsigned char *searchName, char **symlinkinfo, 227 const unsigned char *searchName, char **symlinkinfo,
228 const struct nls_table *nls_codepage, int remap) 228 const struct nls_table *nls_codepage, int remap)
229{ 229{
@@ -298,7 +298,7 @@ CIFSCheckMFSymlink(struct cifs_fattr *fattr,
298 int oplock = 0; 298 int oplock = 0;
299 __u16 netfid = 0; 299 __u16 netfid = 0;
300 struct tcon_link *tlink; 300 struct tcon_link *tlink;
301 struct cifsTconInfo *pTcon; 301 struct cifs_tcon *pTcon;
302 struct cifs_io_parms io_parms; 302 struct cifs_io_parms io_parms;
303 u8 *buf; 303 u8 *buf;
304 char *pbuf; 304 char *pbuf;
@@ -380,7 +380,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
380 char *toName = NULL; 380 char *toName = NULL;
381 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 381 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
382 struct tcon_link *tlink; 382 struct tcon_link *tlink;
383 struct cifsTconInfo *pTcon; 383 struct cifs_tcon *pTcon;
384 struct cifsInodeInfo *cifsInode; 384 struct cifsInodeInfo *cifsInode;
385 385
386 tlink = cifs_sb_tlink(cifs_sb); 386 tlink = cifs_sb_tlink(cifs_sb);
@@ -455,7 +455,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
455 char *target_path = NULL; 455 char *target_path = NULL;
456 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 456 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
457 struct tcon_link *tlink = NULL; 457 struct tcon_link *tlink = NULL;
458 struct cifsTconInfo *tcon; 458 struct cifs_tcon *tcon;
459 459
460 xid = GetXid(); 460 xid = GetXid();
461 461
@@ -528,7 +528,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
528 int xid; 528 int xid;
529 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 529 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
530 struct tcon_link *tlink; 530 struct tcon_link *tlink;
531 struct cifsTconInfo *pTcon; 531 struct cifs_tcon *pTcon;
532 char *full_path = NULL; 532 char *full_path = NULL;
533 struct inode *newinode = NULL; 533 struct inode *newinode = NULL;
534 534
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
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index f8e4cd2a7912..6751e745bbc6 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -195,7 +195,7 @@ int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb,
195 int len; 195 int len;
196 int oplock = 0; 196 int oplock = 0;
197 int rc; 197 int rc;
198 struct cifsTconInfo *ptcon = cifs_sb_tcon(cifs_sb); 198 struct cifs_tcon *ptcon = cifs_sb_tcon(cifs_sb);
199 char *tmpbuffer; 199 char *tmpbuffer;
200 200
201 rc = CIFSSMBOpen(xid, ptcon, full_path, FILE_OPEN, GENERIC_READ, 201 rc = CIFSSMBOpen(xid, ptcon, full_path, FILE_OPEN, GENERIC_READ,
@@ -223,7 +223,7 @@ static int initiate_cifs_search(const int xid, struct file *file)
223 struct cifsFileInfo *cifsFile; 223 struct cifsFileInfo *cifsFile;
224 struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); 224 struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
225 struct tcon_link *tlink = NULL; 225 struct tcon_link *tlink = NULL;
226 struct cifsTconInfo *pTcon; 226 struct cifs_tcon *pTcon;
227 227
228 if (file->private_data == NULL) { 228 if (file->private_data == NULL) {
229 tlink = cifs_sb_tlink(cifs_sb); 229 tlink = cifs_sb_tlink(cifs_sb);
@@ -496,7 +496,7 @@ static int cifs_save_resume_key(const char *current_entry,
496 assume that they are located in the findfirst return buffer.*/ 496 assume that they are located in the findfirst return buffer.*/
497/* We start counting in the buffer with entry 2 and increment for every 497/* We start counting in the buffer with entry 2 and increment for every
498 entry (do not increment for . or .. entry) */ 498 entry (do not increment for . or .. entry) */
499static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, 499static int find_cifs_entry(const int xid, struct cifs_tcon *pTcon,
500 struct file *file, char **ppCurrentEntry, int *num_to_ret) 500 struct file *file, char **ppCurrentEntry, int *num_to_ret)
501{ 501{
502 int rc = 0; 502 int rc = 0;
@@ -764,7 +764,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
764{ 764{
765 int rc = 0; 765 int rc = 0;
766 int xid, i; 766 int xid, i;
767 struct cifsTconInfo *pTcon; 767 struct cifs_tcon *pTcon;
768 struct cifsFileInfo *cifsFile = NULL; 768 struct cifsFileInfo *cifsFile = NULL;
769 char *current_entry; 769 char *current_entry;
770 int num_to_fill = 0; 770 int num_to_fill = 0;
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 7dd462100378..3892ab817a36 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -37,13 +37,13 @@
37 * the socket has been reestablished (so we know whether to use vc 0). 37 * the socket has been reestablished (so we know whether to use vc 0).
38 * Called while holding the cifs_tcp_ses_lock, so do not block 38 * Called while holding the cifs_tcp_ses_lock, so do not block
39 */ 39 */
40static bool is_first_ses_reconnect(struct cifsSesInfo *ses) 40static bool is_first_ses_reconnect(struct cifs_ses *ses)
41{ 41{
42 struct list_head *tmp; 42 struct list_head *tmp;
43 struct cifsSesInfo *tmp_ses; 43 struct cifs_ses *tmp_ses;
44 44
45 list_for_each(tmp, &ses->server->smb_ses_list) { 45 list_for_each(tmp, &ses->server->smb_ses_list) {
46 tmp_ses = list_entry(tmp, struct cifsSesInfo, 46 tmp_ses = list_entry(tmp, struct cifs_ses,
47 smb_ses_list); 47 smb_ses_list);
48 if (tmp_ses->need_reconnect == false) 48 if (tmp_ses->need_reconnect == false)
49 return false; 49 return false;
@@ -61,11 +61,11 @@ static bool is_first_ses_reconnect(struct cifsSesInfo *ses)
61 * any vc but zero (some servers reset the connection on vcnum zero) 61 * any vc but zero (some servers reset the connection on vcnum zero)
62 * 62 *
63 */ 63 */
64static __le16 get_next_vcnum(struct cifsSesInfo *ses) 64static __le16 get_next_vcnum(struct cifs_ses *ses)
65{ 65{
66 __u16 vcnum = 0; 66 __u16 vcnum = 0;
67 struct list_head *tmp; 67 struct list_head *tmp;
68 struct cifsSesInfo *tmp_ses; 68 struct cifs_ses *tmp_ses;
69 __u16 max_vcs = ses->server->max_vcs; 69 __u16 max_vcs = ses->server->max_vcs;
70 __u16 i; 70 __u16 i;
71 int free_vc_found = 0; 71 int free_vc_found = 0;
@@ -87,7 +87,7 @@ static __le16 get_next_vcnum(struct cifsSesInfo *ses)
87 free_vc_found = 1; 87 free_vc_found = 1;
88 88
89 list_for_each(tmp, &ses->server->smb_ses_list) { 89 list_for_each(tmp, &ses->server->smb_ses_list) {
90 tmp_ses = list_entry(tmp, struct cifsSesInfo, 90 tmp_ses = list_entry(tmp, struct cifs_ses,
91 smb_ses_list); 91 smb_ses_list);
92 if (tmp_ses->vcnum == i) { 92 if (tmp_ses->vcnum == i) {
93 free_vc_found = 0; 93 free_vc_found = 0;
@@ -114,7 +114,7 @@ get_vc_num_exit:
114 return cpu_to_le16(vcnum); 114 return cpu_to_le16(vcnum);
115} 115}
116 116
117static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) 117static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB)
118{ 118{
119 __u32 capabilities = 0; 119 __u32 capabilities = 0;
120 120
@@ -136,7 +136,7 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
136 capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | 136 capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |
137 CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; 137 CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;
138 138
139 if (ses->server->secMode & 139 if (ses->server->sec_mode &
140 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 140 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
141 pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 141 pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
142 142
@@ -181,7 +181,7 @@ unicode_oslm_strings(char **pbcc_area, const struct nls_table *nls_cp)
181 *pbcc_area = bcc_ptr; 181 *pbcc_area = bcc_ptr;
182} 182}
183 183
184static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses, 184static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
185 const struct nls_table *nls_cp) 185 const struct nls_table *nls_cp)
186{ 186{
187 char *bcc_ptr = *pbcc_area; 187 char *bcc_ptr = *pbcc_area;
@@ -204,7 +204,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses,
204} 204}
205 205
206 206
207static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, 207static void unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
208 const struct nls_table *nls_cp) 208 const struct nls_table *nls_cp)
209{ 209{
210 char *bcc_ptr = *pbcc_area; 210 char *bcc_ptr = *pbcc_area;
@@ -236,7 +236,7 @@ static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
236 *pbcc_area = bcc_ptr; 236 *pbcc_area = bcc_ptr;
237} 237}
238 238
239static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, 239static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
240 const struct nls_table *nls_cp) 240 const struct nls_table *nls_cp)
241{ 241{
242 char *bcc_ptr = *pbcc_area; 242 char *bcc_ptr = *pbcc_area;
@@ -276,7 +276,7 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
276} 276}
277 277
278static void 278static void
279decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, 279decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,
280 const struct nls_table *nls_cp) 280 const struct nls_table *nls_cp)
281{ 281{
282 int len; 282 int len;
@@ -310,7 +310,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,
310} 310}
311 311
312static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, 312static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
313 struct cifsSesInfo *ses, 313 struct cifs_ses *ses,
314 const struct nls_table *nls_cp) 314 const struct nls_table *nls_cp)
315{ 315{
316 int rc = 0; 316 int rc = 0;
@@ -364,7 +364,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
364} 364}
365 365
366static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, 366static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
367 struct cifsSesInfo *ses) 367 struct cifs_ses *ses)
368{ 368{
369 unsigned int tioffset; /* challenge message target info area */ 369 unsigned int tioffset; /* challenge message target info area */
370 unsigned int tilen; /* challenge message target info area length */ 370 unsigned int tilen; /* challenge message target info area length */
@@ -411,7 +411,7 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
411/* We do not malloc the blob, it is passed in pbuffer, because 411/* We do not malloc the blob, it is passed in pbuffer, because
412 it is fixed size, and small, making this approach cleaner */ 412 it is fixed size, and small, making this approach cleaner */
413static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, 413static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
414 struct cifsSesInfo *ses) 414 struct cifs_ses *ses)
415{ 415{
416 NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer; 416 NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer;
417 __u32 flags; 417 __u32 flags;
@@ -424,7 +424,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
424 flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | 424 flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET |
425 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | 425 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |
426 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; 426 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;
427 if (ses->server->secMode & 427 if (ses->server->sec_mode &
428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 428 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
429 flags |= NTLMSSP_NEGOTIATE_SIGN; 429 flags |= NTLMSSP_NEGOTIATE_SIGN;
430 if (!ses->server->session_estab) 430 if (!ses->server->session_estab)
@@ -449,7 +449,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
449 This function returns the length of the data in the blob */ 449 This function returns the length of the data in the blob */
450static int build_ntlmssp_auth_blob(unsigned char *pbuffer, 450static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
451 u16 *buflen, 451 u16 *buflen,
452 struct cifsSesInfo *ses, 452 struct cifs_ses *ses,
453 const struct nls_table *nls_cp) 453 const struct nls_table *nls_cp)
454{ 454{
455 int rc; 455 int rc;
@@ -464,10 +464,10 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
464 NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO | 464 NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO |
465 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | 465 NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |
466 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; 466 NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;
467 if (ses->server->secMode & 467 if (ses->server->sec_mode &
468 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 468 (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
469 flags |= NTLMSSP_NEGOTIATE_SIGN; 469 flags |= NTLMSSP_NEGOTIATE_SIGN;
470 if (ses->server->secMode & SECMODE_SIGN_REQUIRED) 470 if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED)
471 flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; 471 flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;
472 472
473 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); 473 tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE);
@@ -551,7 +551,7 @@ setup_ntlmv2_ret:
551} 551}
552 552
553int 553int
554CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, 554CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,
555 const struct nls_table *nls_cp) 555 const struct nls_table *nls_cp)
556{ 556{
557 int rc = 0; 557 int rc = 0;
@@ -657,7 +657,7 @@ ssetup_ntlmssp_authenticate:
657 */ 657 */
658 658
659 rc = calc_lanman_hash(ses->password, ses->server->cryptkey, 659 rc = calc_lanman_hash(ses->password, ses->server->cryptkey,
660 ses->server->secMode & SECMODE_PW_ENCRYPT ? 660 ses->server->sec_mode & SECMODE_PW_ENCRYPT ?
661 true : false, lnm_session_key); 661 true : false, lnm_session_key);
662 662
663 ses->flags |= CIFS_SES_LANMAN; 663 ses->flags |= CIFS_SES_LANMAN;
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index d1998b6086ef..147aa22c3c3a 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -295,7 +295,7 @@ static int wait_for_free_request(struct TCP_Server_Info *server,
295 return 0; 295 return 0;
296} 296}
297 297
298static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, 298static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf,
299 struct mid_q_entry **ppmidQ) 299 struct mid_q_entry **ppmidQ)
300{ 300{
301 if (ses->server->tcpStatus == CifsExiting) { 301 if (ses->server->tcpStatus == CifsExiting) {
@@ -355,7 +355,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
355 return rc; 355 return rc;
356 356
357 /* enable signing if server requires it */ 357 /* enable signing if server requires it */
358 if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) 358 if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
359 hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; 359 hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
360 360
361 mutex_lock(&server->srv_mutex); 361 mutex_lock(&server->srv_mutex);
@@ -409,7 +409,7 @@ out_err:
409 * 409 *
410 */ 410 */
411int 411int
412SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, 412SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
413 struct smb_hdr *in_buf, int flags) 413 struct smb_hdr *in_buf, int flags)
414{ 414{
415 int rc; 415 int rc;
@@ -504,7 +504,7 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
504 min_t(u32, 92, be32_to_cpu(mid->resp_buf->smb_buf_length))); 504 min_t(u32, 92, be32_to_cpu(mid->resp_buf->smb_buf_length)));
505 505
506 /* convert the length into a more usable form */ 506 /* convert the length into a more usable form */
507 if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { 507 if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
508 /* FIXME: add code to kill session */ 508 /* FIXME: add code to kill session */
509 if (cifs_verify_signature(mid->resp_buf, server, 509 if (cifs_verify_signature(mid->resp_buf, server,
510 mid->sequence_number + 1) != 0) 510 mid->sequence_number + 1) != 0)
@@ -516,7 +516,7 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
516} 516}
517 517
518int 518int
519SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, 519SendReceive2(const unsigned int xid, struct cifs_ses *ses,
520 struct kvec *iov, int n_vec, int *pRespBufType /* ret */, 520 struct kvec *iov, int n_vec, int *pRespBufType /* ret */,
521 const int flags) 521 const int flags)
522{ 522{
@@ -645,7 +645,7 @@ out:
645} 645}
646 646
647int 647int
648SendReceive(const unsigned int xid, struct cifsSesInfo *ses, 648SendReceive(const unsigned int xid, struct cifs_ses *ses,
649 struct smb_hdr *in_buf, struct smb_hdr *out_buf, 649 struct smb_hdr *in_buf, struct smb_hdr *out_buf,
650 int *pbytes_returned, const int long_op) 650 int *pbytes_returned, const int long_op)
651{ 651{
@@ -761,12 +761,12 @@ out:
761 blocking lock to return. */ 761 blocking lock to return. */
762 762
763static int 763static int
764send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon, 764send_lock_cancel(const unsigned int xid, struct cifs_tcon *tcon,
765 struct smb_hdr *in_buf, 765 struct smb_hdr *in_buf,
766 struct smb_hdr *out_buf) 766 struct smb_hdr *out_buf)
767{ 767{
768 int bytes_returned; 768 int bytes_returned;
769 struct cifsSesInfo *ses = tcon->ses; 769 struct cifs_ses *ses = tcon->ses;
770 LOCK_REQ *pSMB = (LOCK_REQ *)in_buf; 770 LOCK_REQ *pSMB = (LOCK_REQ *)in_buf;
771 771
772 /* We just modify the current in_buf to change 772 /* We just modify the current in_buf to change
@@ -783,14 +783,14 @@ send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon,
783} 783}
784 784
785int 785int
786SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, 786SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
787 struct smb_hdr *in_buf, struct smb_hdr *out_buf, 787 struct smb_hdr *in_buf, struct smb_hdr *out_buf,
788 int *pbytes_returned) 788 int *pbytes_returned)
789{ 789{
790 int rc = 0; 790 int rc = 0;
791 int rstart = 0; 791 int rstart = 0;
792 struct mid_q_entry *midQ; 792 struct mid_q_entry *midQ;
793 struct cifsSesInfo *ses; 793 struct cifs_ses *ses;
794 794
795 if (tcon == NULL || tcon->ses == NULL) { 795 if (tcon == NULL || tcon->ses == NULL) {
796 cERROR(1, "Null smb session"); 796 cERROR(1, "Null smb session");
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 912995e013ec..2a22fb2989e4 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -49,7 +49,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
49 int xid; 49 int xid;
50 struct cifs_sb_info *cifs_sb; 50 struct cifs_sb_info *cifs_sb;
51 struct tcon_link *tlink; 51 struct tcon_link *tlink;
52 struct cifsTconInfo *pTcon; 52 struct cifs_tcon *pTcon;
53 struct super_block *sb; 53 struct super_block *sb;
54 char *full_path = NULL; 54 char *full_path = NULL;
55 55
@@ -109,7 +109,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
109 int xid; 109 int xid;
110 struct cifs_sb_info *cifs_sb; 110 struct cifs_sb_info *cifs_sb;
111 struct tcon_link *tlink; 111 struct tcon_link *tlink;
112 struct cifsTconInfo *pTcon; 112 struct cifs_tcon *pTcon;
113 struct super_block *sb; 113 struct super_block *sb;
114 char *full_path; 114 char *full_path;
115 struct cifs_ntsd *pacl; 115 struct cifs_ntsd *pacl;
@@ -240,7 +240,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
240 int xid; 240 int xid;
241 struct cifs_sb_info *cifs_sb; 241 struct cifs_sb_info *cifs_sb;
242 struct tcon_link *tlink; 242 struct tcon_link *tlink;
243 struct cifsTconInfo *pTcon; 243 struct cifs_tcon *pTcon;
244 struct super_block *sb; 244 struct super_block *sb;
245 char *full_path; 245 char *full_path;
246 246
@@ -372,7 +372,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
372 int xid; 372 int xid;
373 struct cifs_sb_info *cifs_sb; 373 struct cifs_sb_info *cifs_sb;
374 struct tcon_link *tlink; 374 struct tcon_link *tlink;
375 struct cifsTconInfo *pTcon; 375 struct cifs_tcon *pTcon;
376 struct super_block *sb; 376 struct super_block *sb;
377 char *full_path; 377 char *full_path;
378 378