aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-11-13 14:45:32 -0500
committerSteve French <sfrench@us.ibm.com>2008-11-13 14:45:32 -0500
commit3b7952109361c684caf0c50474da8662ecc81019 (patch)
tree402062ed63236ef245d8d65010d8f06520df8453 /fs/cifs/cifsglob.h
parentc527c8a7ffa18400c2c1488f7ab5aff5e83f3c8e (diff)
[CIFS] Fix cifs reconnection flags
In preparation for Jeff's big umount/mount fixes to remove the possibility of various races in cifs mount and linked list handling of sessions, sockets and tree connections, this patch cleans up some repetitive code in cifs_mount, and addresses a problem with ses->status and tcon->tidStatus in which we were overloading the "need_reconnect" state with other status in that field. So the "need_reconnect" flag has been broken out from those two state fields (need reconnect was not mutually exclusive from some of the other possible tid and ses states). In addition, a few exit cases in cifs_mount were cleaned up, and a problem with a tcon flag (for lease support) was not being set consistently for the 2nd mount of the same share CC: Jeff Layton <jlayton@redhat.com> CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 1cb1189f24e0..dc0aa140f1bf 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -122,6 +122,8 @@ struct cifs_cred {
122 */ 122 */
123 123
124struct TCP_Server_Info { 124struct TCP_Server_Info {
125 struct list_head tcp_ses_list;
126 struct list_head smb_ses_list;
125 /* 15 character server name + 0x20 16th byte indicating type = srv */ 127 /* 15 character server name + 0x20 16th byte indicating type = srv */
126 char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL]; 128 char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL];
127 char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; 129 char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2];
@@ -195,6 +197,7 @@ struct cifsUidInfo {
195 */ 197 */
196struct cifsSesInfo { 198struct cifsSesInfo {
197 struct list_head cifsSessionList; 199 struct list_head cifsSessionList;
200 struct list_head tcon_list;
198 struct semaphore sesSem; 201 struct semaphore sesSem;
199#if 0 202#if 0
200 struct cifsUidInfo *uidInfo; /* pointer to user info */ 203 struct cifsUidInfo *uidInfo; /* pointer to user info */
@@ -216,6 +219,7 @@ struct cifsSesInfo {
216 char userName[MAX_USERNAME_SIZE + 1]; 219 char userName[MAX_USERNAME_SIZE + 1];
217 char *domainName; 220 char *domainName;
218 char *password; 221 char *password;
222 bool need_reconnect:1; /* connection reset, uid now invalid */
219}; 223};
220/* no more than one of the following three session flags may be set */ 224/* no more than one of the following three session flags may be set */
221#define CIFS_SES_NT4 1 225#define CIFS_SES_NT4 1
@@ -288,6 +292,7 @@ struct cifsTconInfo {
288 bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol 292 bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol
289 for this mount even if server would support */ 293 for this mount even if server would support */
290 bool local_lease:1; /* check leases (only) on local system not remote */ 294 bool local_lease:1; /* check leases (only) on local system not remote */
295 bool need_reconnect:1; /* connection reset, tid now invalid */
291 /* BB add field for back pointer to sb struct(s)? */ 296 /* BB add field for back pointer to sb struct(s)? */
292}; 297};
293 298