aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-11-14 13:44:38 -0500
committerSteve French <sfrench@us.ibm.com>2008-11-14 18:42:32 -0500
commite7ddee9037e7dd43de1ad08b51727e552aedd836 (patch)
tree1f4fa723aad80809c5980fcb197aba90a84c26ca /fs/cifs/cifsfs.c
parent3ec332ef7a38c2327e18d087d4120a8e3bd3dc6e (diff)
cifs: disable sharing session and tcon and add new TCP sharing code
The code that allows these structs to be shared is extremely racy. Disable the sharing of SMB and tcon structs for now until we can come up with a way to do this that's race free. We want to continue to share TCP sessions, however since they are required for multiuser mounts. For that, implement a new (hopefully race-free) scheme. Add a new global list of TCP sessions, and take care to get a reference to it whenever we're dealing with one. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index af16a2406b1c..2946dab0718f 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1059,7 +1059,7 @@ init_cifs(void)
1059{ 1059{
1060 int rc = 0; 1060 int rc = 0;
1061 cifs_proc_init(); 1061 cifs_proc_init();
1062 INIT_LIST_HEAD(&global_cifs_sock_list); 1062 INIT_LIST_HEAD(&cifs_tcp_ses_list);
1063 INIT_LIST_HEAD(&GlobalSMBSessionList); /* BB to be removed by jl */ 1063 INIT_LIST_HEAD(&GlobalSMBSessionList); /* BB to be removed by jl */
1064 INIT_LIST_HEAD(&GlobalTreeConnectionList); /* BB to be removed by jl */ 1064 INIT_LIST_HEAD(&GlobalTreeConnectionList); /* BB to be removed by jl */
1065 INIT_LIST_HEAD(&GlobalOplock_Q); 1065 INIT_LIST_HEAD(&GlobalOplock_Q);
@@ -1089,6 +1089,7 @@ init_cifs(void)
1089 GlobalMaxActiveXid = 0; 1089 GlobalMaxActiveXid = 0;
1090 memset(Local_System_Name, 0, 15); 1090 memset(Local_System_Name, 0, 15);
1091 rwlock_init(&GlobalSMBSeslock); 1091 rwlock_init(&GlobalSMBSeslock);
1092 rwlock_init(&cifs_tcp_ses_lock);
1092 spin_lock_init(&GlobalMid_Lock); 1093 spin_lock_init(&GlobalMid_Lock);
1093 1094
1094 if (cifs_max_pending < 2) { 1095 if (cifs_max_pending < 2) {