diff options
| -rw-r--r-- | fs/cifs/cifs_debug.c | 12 | ||||
| -rw-r--r-- | fs/cifs/cifsfs.c | 8 | ||||
| -rw-r--r-- | fs/cifs/cifsglob.h | 2 | ||||
| -rw-r--r-- | fs/cifs/cifssmb.c | 6 | ||||
| -rw-r--r-- | fs/cifs/connect.c | 70 | ||||
| -rw-r--r-- | fs/cifs/misc.c | 14 | ||||
| -rw-r--r-- | fs/cifs/sess.c | 4 |
7 files changed, 58 insertions, 58 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index eb1ba493489f..103ab8b605b0 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
| @@ -148,7 +148,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) | |||
| 148 | seq_printf(m, "Servers:"); | 148 | seq_printf(m, "Servers:"); |
| 149 | 149 | ||
| 150 | i = 0; | 150 | i = 0; |
| 151 | read_lock(&cifs_tcp_ses_lock); | 151 | spin_lock(&cifs_tcp_ses_lock); |
| 152 | list_for_each(tmp1, &cifs_tcp_ses_list) { | 152 | list_for_each(tmp1, &cifs_tcp_ses_list) { |
| 153 | server = list_entry(tmp1, struct TCP_Server_Info, | 153 | server = list_entry(tmp1, struct TCP_Server_Info, |
| 154 | tcp_ses_list); | 154 | tcp_ses_list); |
| @@ -230,7 +230,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v) | |||
| 230 | spin_unlock(&GlobalMid_Lock); | 230 | spin_unlock(&GlobalMid_Lock); |
| 231 | } | 231 | } |
| 232 | } | 232 | } |
| 233 | read_unlock(&cifs_tcp_ses_lock); | 233 | spin_unlock(&cifs_tcp_ses_lock); |
| 234 | seq_putc(m, '\n'); | 234 | seq_putc(m, '\n'); |
| 235 | 235 | ||
| 236 | /* BB add code to dump additional info such as TCP session info now */ | 236 | /* BB add code to dump additional info such as TCP session info now */ |
| @@ -270,7 +270,7 @@ static ssize_t cifs_stats_proc_write(struct file *file, | |||
| 270 | atomic_set(&totBufAllocCount, 0); | 270 | atomic_set(&totBufAllocCount, 0); |
| 271 | atomic_set(&totSmBufAllocCount, 0); | 271 | atomic_set(&totSmBufAllocCount, 0); |
| 272 | #endif /* CONFIG_CIFS_STATS2 */ | 272 | #endif /* CONFIG_CIFS_STATS2 */ |
| 273 | read_lock(&cifs_tcp_ses_lock); | 273 | spin_lock(&cifs_tcp_ses_lock); |
| 274 | list_for_each(tmp1, &cifs_tcp_ses_list) { | 274 | list_for_each(tmp1, &cifs_tcp_ses_list) { |
| 275 | server = list_entry(tmp1, struct TCP_Server_Info, | 275 | server = list_entry(tmp1, struct TCP_Server_Info, |
| 276 | tcp_ses_list); | 276 | tcp_ses_list); |
| @@ -303,7 +303,7 @@ static ssize_t cifs_stats_proc_write(struct file *file, | |||
| 303 | } | 303 | } |
| 304 | } | 304 | } |
| 305 | } | 305 | } |
| 306 | read_unlock(&cifs_tcp_ses_lock); | 306 | spin_unlock(&cifs_tcp_ses_lock); |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | return count; | 309 | return count; |
| @@ -343,7 +343,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v) | |||
| 343 | GlobalCurrentXid, GlobalMaxActiveXid); | 343 | GlobalCurrentXid, GlobalMaxActiveXid); |
| 344 | 344 | ||
| 345 | i = 0; | 345 | i = 0; |
| 346 | read_lock(&cifs_tcp_ses_lock); | 346 | spin_lock(&cifs_tcp_ses_lock); |
| 347 | list_for_each(tmp1, &cifs_tcp_ses_list) { | 347 | list_for_each(tmp1, &cifs_tcp_ses_list) { |
| 348 | server = list_entry(tmp1, struct TCP_Server_Info, | 348 | server = list_entry(tmp1, struct TCP_Server_Info, |
| 349 | tcp_ses_list); | 349 | tcp_ses_list); |
| @@ -397,7 +397,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v) | |||
| 397 | } | 397 | } |
| 398 | } | 398 | } |
| 399 | } | 399 | } |
| 400 | read_unlock(&cifs_tcp_ses_lock); | 400 | spin_unlock(&cifs_tcp_ses_lock); |
| 401 | 401 | ||
| 402 | seq_putc(m, '\n'); | 402 | seq_putc(m, '\n'); |
| 403 | return 0; | 403 | return 0; |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f1d9c71e807f..cb77915a445b 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -482,16 +482,16 @@ static void cifs_umount_begin(struct super_block *sb) | |||
| 482 | 482 | ||
| 483 | tcon = cifs_sb_master_tcon(cifs_sb); | 483 | tcon = cifs_sb_master_tcon(cifs_sb); |
| 484 | 484 | ||
| 485 | read_lock(&cifs_tcp_ses_lock); | 485 | spin_lock(&cifs_tcp_ses_lock); |
| 486 | if ((tcon->tc_count > 1) || (tcon->tidStatus == CifsExiting)) { | 486 | if ((tcon->tc_count > 1) || (tcon->tidStatus == CifsExiting)) { |
| 487 | /* we have other mounts to same share or we have | 487 | /* we have other mounts to same share or we have |
| 488 | already tried to force umount this and woken up | 488 | already tried to force umount this and woken up |
| 489 | all waiting network requests, nothing to do */ | 489 | all waiting network requests, nothing to do */ |
| 490 | read_unlock(&cifs_tcp_ses_lock); | 490 | spin_unlock(&cifs_tcp_ses_lock); |
| 491 | return; | 491 | return; |
| 492 | } else if (tcon->tc_count == 1) | 492 | } else if (tcon->tc_count == 1) |
| 493 | tcon->tidStatus = CifsExiting; | 493 | tcon->tidStatus = CifsExiting; |
| 494 | read_unlock(&cifs_tcp_ses_lock); | 494 | spin_unlock(&cifs_tcp_ses_lock); |
| 495 | 495 | ||
| 496 | /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */ | 496 | /* cancel_brl_requests(tcon); */ /* BB mark all brl mids as exiting */ |
| 497 | /* cancel_notify_requests(tcon); */ | 497 | /* cancel_notify_requests(tcon); */ |
| @@ -940,7 +940,7 @@ init_cifs(void) | |||
| 940 | GlobalTotalActiveXid = 0; | 940 | GlobalTotalActiveXid = 0; |
| 941 | GlobalMaxActiveXid = 0; | 941 | GlobalMaxActiveXid = 0; |
| 942 | memset(Local_System_Name, 0, 15); | 942 | memset(Local_System_Name, 0, 15); |
| 943 | rwlock_init(&cifs_tcp_ses_lock); | 943 | spin_lock_init(&cifs_tcp_ses_lock); |
| 944 | spin_lock_init(&cifs_file_list_lock); | 944 | spin_lock_init(&cifs_file_list_lock); |
| 945 | spin_lock_init(&GlobalMid_Lock); | 945 | spin_lock_init(&GlobalMid_Lock); |
| 946 | 946 | ||
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 18ee0adda306..28337cba0295 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
| @@ -703,7 +703,7 @@ GLOBAL_EXTERN struct list_head cifs_tcp_ses_list; | |||
| 703 | * the reference counters for the server, smb session, and tcon. Finally, | 703 | * the reference counters for the server, smb session, and tcon. Finally, |
| 704 | * changes to the tcon->tidStatus should be done while holding this lock. | 704 | * changes to the tcon->tidStatus should be done while holding this lock. |
| 705 | */ | 705 | */ |
| 706 | GLOBAL_EXTERN rwlock_t cifs_tcp_ses_lock; | 706 | GLOBAL_EXTERN spinlock_t cifs_tcp_ses_lock; |
| 707 | 707 | ||
| 708 | /* | 708 | /* |
| 709 | * This lock protects the cifs_file->llist and cifs_file->flist | 709 | * This lock protects the cifs_file->llist and cifs_file->flist |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index bfb59a68e4fd..e98f1f317b15 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
| @@ -593,9 +593,9 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
| 593 | rc = -EIO; | 593 | rc = -EIO; |
| 594 | goto neg_err_exit; | 594 | goto neg_err_exit; |
| 595 | } | 595 | } |
| 596 | read_lock(&cifs_tcp_ses_lock); | 596 | spin_lock(&cifs_tcp_ses_lock); |
| 597 | if (server->srv_count > 1) { | 597 | if (server->srv_count > 1) { |
| 598 | read_unlock(&cifs_tcp_ses_lock); | 598 | spin_unlock(&cifs_tcp_ses_lock); |
| 599 | if (memcmp(server->server_GUID, | 599 | if (memcmp(server->server_GUID, |
| 600 | pSMBr->u.extended_response. | 600 | pSMBr->u.extended_response. |
| 601 | GUID, 16) != 0) { | 601 | GUID, 16) != 0) { |
| @@ -605,7 +605,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
| 605 | 16); | 605 | 16); |
| 606 | } | 606 | } |
| 607 | } else { | 607 | } else { |
| 608 | read_unlock(&cifs_tcp_ses_lock); | 608 | spin_unlock(&cifs_tcp_ses_lock); |
| 609 | memcpy(server->server_GUID, | 609 | memcpy(server->server_GUID, |
| 610 | pSMBr->u.extended_response.GUID, 16); | 610 | pSMBr->u.extended_response.GUID, 16); |
| 611 | } | 611 | } |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 019f00380d12..7e73176acb58 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -150,7 +150,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
| 150 | 150 | ||
| 151 | /* before reconnecting the tcp session, mark the smb session (uid) | 151 | /* before reconnecting the tcp session, mark the smb session (uid) |
| 152 | and the tid bad so they are not used until reconnected */ | 152 | and the tid bad so they are not used until reconnected */ |
| 153 | read_lock(&cifs_tcp_ses_lock); | 153 | spin_lock(&cifs_tcp_ses_lock); |
| 154 | list_for_each(tmp, &server->smb_ses_list) { | 154 | list_for_each(tmp, &server->smb_ses_list) { |
| 155 | ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); | 155 | ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); |
| 156 | ses->need_reconnect = true; | 156 | ses->need_reconnect = true; |
| @@ -160,7 +160,7 @@ cifs_reconnect(struct TCP_Server_Info *server) | |||
| 160 | tcon->need_reconnect = true; | 160 | tcon->need_reconnect = true; |
| 161 | } | 161 | } |
| 162 | } | 162 | } |
| 163 | read_unlock(&cifs_tcp_ses_lock); | 163 | spin_unlock(&cifs_tcp_ses_lock); |
| 164 | /* do not want to be sending data on a socket we are freeing */ | 164 | /* do not want to be sending data on a socket we are freeing */ |
| 165 | mutex_lock(&server->srv_mutex); | 165 | mutex_lock(&server->srv_mutex); |
| 166 | if (server->ssocket) { | 166 | if (server->ssocket) { |
| @@ -637,9 +637,9 @@ multi_t2_fnd: | |||
| 637 | } /* end while !EXITING */ | 637 | } /* end while !EXITING */ |
| 638 | 638 | ||
| 639 | /* take it off the list, if it's not already */ | 639 | /* take it off the list, if it's not already */ |
| 640 | write_lock(&cifs_tcp_ses_lock); | 640 | spin_lock(&cifs_tcp_ses_lock); |
| 641 | list_del_init(&server->tcp_ses_list); | 641 | list_del_init(&server->tcp_ses_list); |
| 642 | write_unlock(&cifs_tcp_ses_lock); | 642 | spin_unlock(&cifs_tcp_ses_lock); |
| 643 | 643 | ||
| 644 | spin_lock(&GlobalMid_Lock); | 644 | spin_lock(&GlobalMid_Lock); |
| 645 | server->tcpStatus = CifsExiting; | 645 | server->tcpStatus = CifsExiting; |
| @@ -677,7 +677,7 @@ multi_t2_fnd: | |||
| 677 | * BB: we shouldn't have to do any of this. It shouldn't be | ||
