Lines Matching refs:cfile
678 struct cifsFileInfo *cfile = file->private_data; in find_cifs_entry() local
686 if ((cfile == NULL) || (current_entry == NULL) || (num_to_ret == NULL)) in find_cifs_entry()
690 first_entry_in_buffer = cfile->srch_inf.index_of_last_entry - in find_cifs_entry()
691 cfile->srch_inf.entries_in_buffer; in find_cifs_entry()
702 if (((index_to_find < cfile->srch_inf.index_of_last_entry) && in find_cifs_entry()
706 spin_lock(&cfile->file_info_lock); in find_cifs_entry()
707 if (server->ops->dir_needs_close(cfile)) { in find_cifs_entry()
708 cfile->invalidHandle = true; in find_cifs_entry()
709 spin_unlock(&cfile->file_info_lock); in find_cifs_entry()
711 server->ops->close_dir(xid, tcon, &cfile->fid); in find_cifs_entry()
713 spin_unlock(&cfile->file_info_lock); in find_cifs_entry()
714 if (cfile->srch_inf.ntwrk_buf_start) { in find_cifs_entry()
716 if (cfile->srch_inf.smallBuf) in find_cifs_entry()
717 cifs_small_buf_release(cfile->srch_inf. in find_cifs_entry()
720 cifs_buf_release(cfile->srch_inf. in find_cifs_entry()
722 cfile->srch_inf.ntwrk_buf_start = NULL; in find_cifs_entry()
731 if (cfile->srch_inf.last_entry) in find_cifs_entry()
732 cifs_save_resume_key(cfile->srch_inf.last_entry, cfile); in find_cifs_entry()
739 while ((index_to_find >= cfile->srch_inf.index_of_last_entry) && in find_cifs_entry()
740 (rc == 0) && !cfile->srch_inf.endOfSearch) { in find_cifs_entry()
742 rc = server->ops->query_dir_next(xid, tcon, &cfile->fid, in find_cifs_entry()
744 &cfile->srch_inf); in find_cifs_entry()
746 if (cfile->srch_inf.last_entry) in find_cifs_entry()
747 cifs_save_resume_key(cfile->srch_inf.last_entry, cfile); in find_cifs_entry()
751 if (index_to_find < cfile->srch_inf.index_of_last_entry) { in find_cifs_entry()
758 if (cfile->srch_inf.ntwrk_buf_start == NULL) { in find_cifs_entry()
763 end_of_smb = cfile->srch_inf.ntwrk_buf_start + in find_cifs_entry()
765 cfile->srch_inf.ntwrk_buf_start); in find_cifs_entry()
767 cur_ent = cfile->srch_inf.srch_entries_start; in find_cifs_entry()
768 first_entry_in_buffer = cfile->srch_inf.index_of_last_entry in find_cifs_entry()
769 - cfile->srch_inf.entries_in_buffer; in find_cifs_entry()
776 cfile->srch_inf.info_level); in find_cifs_entry()
790 if (pos_in_buf >= cfile->srch_inf.entries_in_buffer) { in find_cifs_entry()
794 *num_to_ret = cfile->srch_inf.entries_in_buffer - pos_in_buf; in find_cifs_entry()