Lines Matching refs:tcon
547 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp) in smb2_tcon_has_lease() argument
557 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_tcon_has_lease()
586 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon, in smb2_tcon_find_pending_open_lease() argument
595 list_for_each_entry(open, &tcon->pending_opens, olist) { in smb2_tcon_find_pending_open_lease()
620 struct cifs_tcon *tcon; in smb2_is_valid_lease_break() local
631 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_lease_break()
632 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
634 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break()
635 if (smb2_tcon_has_lease(tcon, rsp)) { in smb2_is_valid_lease_break()
636 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
640 open = smb2_tcon_find_pending_open_lease(tcon, in smb2_is_valid_lease_break()
649 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
656 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
658 if (cached_dir_lease_break(tcon, rsp->LeaseKey)) { in smb2_is_valid_lease_break()
681 struct cifs_tcon *tcon; in smb2_is_valid_oplock_break() local
706 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_oplock_break()
708 spin_lock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
709 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_is_valid_oplock_break()
718 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_oplock_break()
737 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
741 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
758 struct cifs_tcon *tcon = cancelled->tcon; in smb2_cancelled_close_fid() local
767 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid, in smb2_cancelled_close_fid()
772 cifs_put_tcon(tcon); in smb2_cancelled_close_fid()
785 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, in __smb2_handle_cancelled_cmd() argument
796 cancelled->tcon = tcon; in __smb2_handle_cancelled_cmd()
806 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, in smb2_handle_cancelled_close() argument
811 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in smb2_handle_cancelled_close()
813 if (tcon->tc_count <= 0) { in smb2_handle_cancelled_close()
816 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative"); in smb2_handle_cancelled_close()
819 if (tcon->ses) in smb2_handle_cancelled_close()
820 server = tcon->ses->server; in smb2_handle_cancelled_close()
823 tcon->tid, persistent_fid, volatile_fid); in smb2_handle_cancelled_close()
827 tcon->tc_count++; in smb2_handle_cancelled_close()
830 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0, in smb2_handle_cancelled_close()
833 cifs_put_tcon(tcon); in smb2_handle_cancelled_close()
843 struct cifs_tcon *tcon; in smb2_handle_cancelled_mid() local
850 tcon = smb2_find_smb_tcon(server, le64_to_cpu(hdr->SessionId), in smb2_handle_cancelled_mid()
852 if (!tcon) in smb2_handle_cancelled_mid()
855 rc = __smb2_handle_cancelled_cmd(tcon, in smb2_handle_cancelled_mid()
861 cifs_put_tcon(tcon); in smb2_handle_cancelled_mid()