Lines Matching full:tcon
541 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp) in smb2_tcon_has_lease() argument
551 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_tcon_has_lease()
580 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon, in smb2_tcon_find_pending_open_lease() argument
589 list_for_each_entry(open, &tcon->pending_opens, olist) { in smb2_tcon_find_pending_open_lease()
614 struct cifs_tcon *tcon; in smb2_is_valid_lease_break() local
631 /* look up tcon based on tid & uid */ in smb2_is_valid_lease_break()
636 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_lease_break()
637 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
639 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break()
640 if (smb2_tcon_has_lease(tcon, rsp)) { in smb2_is_valid_lease_break()
641 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
645 open = smb2_tcon_find_pending_open_lease(tcon, in smb2_is_valid_lease_break()
654 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
661 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
663 if (cached_dir_lease_break(tcon, rsp->LeaseKey)) { in smb2_is_valid_lease_break()
688 struct cifs_tcon *tcon; in smb2_is_valid_oplock_break() local
710 /* look up tcon based on tid & uid */ in smb2_is_valid_oplock_break()
715 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_oplock_break()
717 spin_lock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
718 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_is_valid_oplock_break()
727 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_oplock_break()
746 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
750 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
767 struct cifs_tcon *tcon = cancelled->tcon; in smb2_cancelled_close_fid() local
776 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid, in smb2_cancelled_close_fid()
781 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_close_fid); in smb2_cancelled_close_fid()
786 * Caller should already has an extra reference to @tcon
794 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, in __smb2_handle_cancelled_cmd() argument
805 cancelled->tcon = tcon; in __smb2_handle_cancelled_cmd()
815 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, in smb2_handle_cancelled_close() argument
820 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in smb2_handle_cancelled_close()
822 if (tcon->tc_count <= 0) { in smb2_handle_cancelled_close()
825 trace_smb3_tcon_ref(tcon->debug_id, tcon->tc_count, in smb2_handle_cancelled_close()
827 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative"); in smb2_handle_cancelled_close()
830 if (tcon->ses) { in smb2_handle_cancelled_close()
831 server = tcon->ses->server; in smb2_handle_cancelled_close()
833 "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n", in smb2_handle_cancelled_close()
834 tcon->tid, persistent_fid, volatile_fid); in smb2_handle_cancelled_close()
839 tcon->tc_count++; in smb2_handle_cancelled_close()
840 trace_smb3_tcon_ref(tcon->debug_id, tcon->tc_count, in smb2_handle_cancelled_close()
844 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0, in smb2_handle_cancelled_close()
847 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_close); in smb2_handle_cancelled_close()
857 struct cifs_tcon *tcon; in smb2_handle_cancelled_mid() local
864 tcon = smb2_find_smb_tcon(server, le64_to_cpu(hdr->SessionId), in smb2_handle_cancelled_mid()
866 if (!tcon) in smb2_handle_cancelled_mid()
869 rc = __smb2_handle_cancelled_cmd(tcon, in smb2_handle_cancelled_mid()
875 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_mid); in smb2_handle_cancelled_mid()