diff options
-rw-r--r-- | fs/cifs/misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index f2d508df7ec5..191e6220bc76 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -562,14 +562,14 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
562 | continue; | 562 | continue; |
563 | 563 | ||
564 | cifs_stats_inc(&tcon->num_oplock_brks); | 564 | cifs_stats_inc(&tcon->num_oplock_brks); |
565 | write_lock(&GlobalSMBSeslock); | 565 | read_lock(&GlobalSMBSeslock); |
566 | list_for_each(tmp2, &tcon->openFileList) { | 566 | list_for_each(tmp2, &tcon->openFileList) { |
567 | netfile = list_entry(tmp2, struct cifsFileInfo, | 567 | netfile = list_entry(tmp2, struct cifsFileInfo, |
568 | tlist); | 568 | tlist); |
569 | if (pSMB->Fid != netfile->netfid) | 569 | if (pSMB->Fid != netfile->netfid) |
570 | continue; | 570 | continue; |
571 | 571 | ||
572 | write_unlock(&GlobalSMBSeslock); | 572 | read_unlock(&GlobalSMBSeslock); |
573 | read_unlock(&cifs_tcp_ses_lock); | 573 | read_unlock(&cifs_tcp_ses_lock); |
574 | cFYI(1, ("file id match, oplock break")); | 574 | cFYI(1, ("file id match, oplock break")); |
575 | pCifsInode = CIFS_I(netfile->pInode); | 575 | pCifsInode = CIFS_I(netfile->pInode); |
@@ -584,7 +584,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | |||
584 | 584 | ||
585 | return true; | 585 | return true; |
586 | } | 586 | } |
587 | write_unlock(&GlobalSMBSeslock); | 587 | read_unlock(&GlobalSMBSeslock); |
588 | read_unlock(&cifs_tcp_ses_lock); | 588 | read_unlock(&cifs_tcp_ses_lock); |
589 | cFYI(1, ("No matching file for oplock break")); | 589 | cFYI(1, ("No matching file for oplock break")); |
590 | return true; | 590 | return true; |