Lines Matching refs:tcon
541 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp)
551 list_for_each_entry(cfile, &tcon->openFileList, tlist) {
580 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon,
589 list_for_each_entry(open, &tcon->pending_opens, olist) {
614 struct cifs_tcon *tcon;
622 /* look up tcon based on tid & uid */
625 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
626 spin_lock(&tcon->open_file_lock);
628 &tcon->stats.cifs_stats.num_oplock_brks);
629 if (smb2_tcon_has_lease(tcon, rsp)) {
630 spin_unlock(&tcon->open_file_lock);
634 open = smb2_tcon_find_pending_open_lease(tcon,
643 spin_unlock(&tcon->open_file_lock);
650 spin_unlock(&tcon->open_file_lock);
652 if (cached_dir_lease_break(tcon, rsp->LeaseKey)) {
675 struct cifs_tcon *tcon;
697 /* look up tcon based on tid & uid */
700 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
702 spin_lock(&tcon->open_file_lock);
703 list_for_each_entry(cfile, &tcon->openFileList, tlist) {
712 &tcon->stats.cifs_stats.num_oplock_brks);
731 spin_unlock(&tcon->open_file_lock);
735 spin_unlock(&tcon->open_file_lock);
752 struct cifs_tcon *tcon = cancelled->tcon;
761 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid,
766 cifs_put_tcon(tcon);
771 * Caller should already has an extra reference to @tcon
779 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid,
790 cancelled->tcon = tcon;
800 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid,
805 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count);
807 if (tcon->tc_count <= 0) {
810 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative");
813 if (tcon->ses)
814 server = tcon->ses->server;
816 cifs_server_dbg(FYI, "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n",
817 tcon->tid, persistent_fid, volatile_fid);
821 tcon->tc_count++;
824 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0,
827 cifs_put_tcon(tcon);
837 struct cifs_tcon *tcon;
844 tcon = smb2_find_smb_tcon(server, le64_to_cpu(hdr->SessionId),
846 if (!tcon)
849 rc = __smb2_handle_cancelled_cmd(tcon,
855 cifs_put_tcon(tcon);