Lines Matching refs:tcon
531 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp) in smb2_tcon_has_lease() argument
541 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_tcon_has_lease()
570 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon, in smb2_tcon_find_pending_open_lease() argument
579 list_for_each_entry(open, &tcon->pending_opens, olist) { in smb2_tcon_find_pending_open_lease()
604 struct cifs_tcon *tcon; in smb2_is_valid_lease_break() local
613 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_lease_break()
614 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
616 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break()
617 if (smb2_tcon_has_lease(tcon, rsp)) { in smb2_is_valid_lease_break()
618 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
622 open = smb2_tcon_find_pending_open_lease(tcon, in smb2_is_valid_lease_break()
631 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
638 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
640 if (tcon->crfid.is_valid && in smb2_is_valid_lease_break()
642 tcon->crfid.fid->lease_key, in smb2_is_valid_lease_break()
644 tcon->crfid.time = 0; in smb2_is_valid_lease_break()
645 INIT_WORK(&tcon->crfid.lease_break, in smb2_is_valid_lease_break()
648 &tcon->crfid.lease_break); in smb2_is_valid_lease_break()
665 struct cifs_tcon *tcon; in smb2_is_valid_oplock_break() local
687 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_oplock_break()
689 spin_lock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
690 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_is_valid_oplock_break()
699 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_oplock_break()
718 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
722 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
735 struct cifs_tcon *tcon = cancelled->tcon; in smb2_cancelled_close_fid() local
744 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid, in smb2_cancelled_close_fid()
749 cifs_put_tcon(tcon); in smb2_cancelled_close_fid()
762 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, in __smb2_handle_cancelled_cmd() argument
773 cancelled->tcon = tcon; in __smb2_handle_cancelled_cmd()
783 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, in smb2_handle_cancelled_close() argument
788 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in smb2_handle_cancelled_close()
790 if (tcon->tc_count <= 0) { in smb2_handle_cancelled_close()
793 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative"); in smb2_handle_cancelled_close()
796 if (tcon->ses) in smb2_handle_cancelled_close()
797 server = tcon->ses->server; in smb2_handle_cancelled_close()
800 tcon->tid, persistent_fid, volatile_fid); in smb2_handle_cancelled_close()
804 tcon->tc_count++; in smb2_handle_cancelled_close()
807 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0, in smb2_handle_cancelled_close()
810 cifs_put_tcon(tcon); in smb2_handle_cancelled_close()
820 struct cifs_tcon *tcon; in smb2_handle_cancelled_mid() local
827 tcon = smb2_find_smb_tcon(server, le64_to_cpu(hdr->SessionId), in smb2_handle_cancelled_mid()
829 if (!tcon) in smb2_handle_cancelled_mid()
832 rc = __smb2_handle_cancelled_cmd(tcon, in smb2_handle_cancelled_mid()
838 cifs_put_tcon(tcon); in smb2_handle_cancelled_mid()