diff options
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 813fe13c2ae1..c6729156f9a0 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -120,6 +120,7 @@ tconInfoAlloc(void) | |||
120 | ++ret_buf->tc_count; | 120 | ++ret_buf->tc_count; |
121 | INIT_LIST_HEAD(&ret_buf->openFileList); | 121 | INIT_LIST_HEAD(&ret_buf->openFileList); |
122 | INIT_LIST_HEAD(&ret_buf->tcon_list); | 122 | INIT_LIST_HEAD(&ret_buf->tcon_list); |
123 | spin_lock_init(&ret_buf->open_file_lock); | ||
123 | #ifdef CONFIG_CIFS_STATS | 124 | #ifdef CONFIG_CIFS_STATS |
124 | spin_lock_init(&ret_buf->stat_lock); | 125 | spin_lock_init(&ret_buf->stat_lock); |
125 | #endif | 126 | #endif |
@@ -465,7 +466,7 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv) | |||
465 | continue; | 466 | continue; |
466 | 467 | ||
467 | cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks); | 468 | cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks); |
468 | spin_lock(&cifs_file_list_lock); | 469 | spin_lock(&tcon->open_file_lock); |
469 | list_for_each(tmp2, &tcon->openFileList) { | 470 | list_for_each(tmp2, &tcon->openFileList) { |
470 | netfile = list_entry(tmp2, struct cifsFileInfo, | 471 | netfile = list_entry(tmp2, struct cifsFileInfo, |
471 | tlist); | 472 | tlist); |
@@ -495,11 +496,11 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv) | |||
495 | &netfile->oplock_break); | 496 | &netfile->oplock_break); |
496 | netfile->oplock_break_cancelled = false; | 497 | netfile->oplock_break_cancelled = false; |
497 | 498 | ||
498 | spin_unlock(&cifs_file_list_lock); | 499 | spin_unlock(&tcon->open_file_lock); |
499 | spin_unlock(&cifs_tcp_ses_lock); | 500 | spin_unlock(&cifs_tcp_ses_lock); |
500 | return true; | 501 | return true; |
501 | } | 502 | } |
502 | spin_unlock(&cifs_file_list_lock); | 503 | spin_unlock(&tcon->open_file_lock); |
503 | spin_unlock(&cifs_tcp_ses_lock); | 504 | spin_unlock(&cifs_tcp_ses_lock); |
504 | cifs_dbg(FYI, "No matching file for oplock break\n"); | 505 | cifs_dbg(FYI, "No matching file for oplock break\n"); |
505 | return true; | 506 | return true; |
@@ -613,9 +614,9 @@ backup_cred(struct cifs_sb_info *cifs_sb) | |||
613 | void | 614 | void |
614 | cifs_del_pending_open(struct cifs_pending_open *open) | 615 | cifs_del_pending_open(struct cifs_pending_open *open) |
615 | { | 616 | { |
616 | spin_lock(&cifs_file_list_lock); | 617 | spin_lock(&tlink_tcon(open->tlink)->open_file_lock); |
617 | list_del(&open->olist); | 618 | list_del(&open->olist); |
618 | spin_unlock(&cifs_file_list_lock); | 619 | spin_unlock(&tlink_tcon(open->tlink)->open_file_lock); |
619 | } | 620 | } |
620 | 621 | ||
621 | void | 622 | void |
@@ -635,7 +636,7 @@ void | |||
635 | cifs_add_pending_open(struct cifs_fid *fid, struct tcon_link *tlink, | 636 | cifs_add_pending_open(struct cifs_fid *fid, struct tcon_link *tlink, |
636 | struct cifs_pending_open *open) | 637 | struct cifs_pending_open *open) |
637 | { | 638 | { |
638 | spin_lock(&cifs_file_list_lock); | 639 | spin_lock(&tlink_tcon(tlink)->open_file_lock); |
639 | cifs_add_pending_open_locked(fid, tlink, open); | 640 | cifs_add_pending_open_locked(fid, tlink, open); |
640 | spin_unlock(&cifs_file_list_lock); | 641 | spin_unlock(&tlink_tcon(open->tlink)->open_file_lock); |
641 | } | 642 | } |