aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 6f3d13ff947..ef7bb7b50f5 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -528,14 +528,14 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
528 (index_to_find < first_entry_in_buffer)) { 528 (index_to_find < first_entry_in_buffer)) {
529 /* close and restart search */ 529 /* close and restart search */
530 cFYI(1, "search backing up - close and restart search"); 530 cFYI(1, "search backing up - close and restart search");
531 write_lock(&GlobalSMBSeslock); 531 spin_lock(&cifs_file_list_lock);
532 if (!cifsFile->srch_inf.endOfSearch && 532 if (!cifsFile->srch_inf.endOfSearch &&
533 !cifsFile->invalidHandle) { 533 !cifsFile->invalidHandle) {
534 cifsFile->invalidHandle = true; 534 cifsFile->invalidHandle = true;
535 write_unlock(&GlobalSMBSeslock); 535 spin_unlock(&cifs_file_list_lock);
536 CIFSFindClose(xid, pTcon, cifsFile->netfid); 536 CIFSFindClose(xid, pTcon, cifsFile->netfid);
537 } else 537 } else
538 write_unlock(&GlobalSMBSeslock); 538 spin_unlock(&cifs_file_list_lock);
539 if (cifsFile->srch_inf.ntwrk_buf_start) { 539 if (cifsFile->srch_inf.ntwrk_buf_start) {
540 cFYI(1, "freeing SMB ff cache buf on search rewind"); 540 cFYI(1, "freeing SMB ff cache buf on search rewind");
541 if (cifsFile->srch_inf.smallBuf) 541 if (cifsFile->srch_inf.smallBuf)