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
622 /* look up tcon based on tid & uid */ in smb2_is_valid_lease_break()
627 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_lease_break()
628 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
630 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break()
631 if (smb2_tcon_has_lease(tcon, rsp)) { in smb2_is_valid_lease_break()
632 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
636 open = smb2_tcon_find_pending_open_lease(tcon, in smb2_is_valid_lease_break()
645 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
652 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
654 if (cached_dir_lease_break(tcon, rsp->LeaseKey)) { in smb2_is_valid_lease_break()
677 struct cifs_tcon *tcon; in smb2_is_valid_oplock_break() local
699 /* look up tcon based on tid & uid */ in smb2_is_valid_oplock_break()
704 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_oplock_break()
706 spin_lock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
707 list_for_each_entry(cfile, &tcon->openFileList, tlist) { in smb2_is_valid_oplock_break()
716 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_oplock_break()
735 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
739 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
756 struct cifs_tcon *tcon = cancelled->tcon; in smb2_cancelled_close_fid() local
765 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid, in smb2_cancelled_close_fid()
770 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_close_fid); in smb2_cancelled_close_fid()
775 * Caller should already has an extra reference to @tcon
783 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, in __smb2_handle_cancelled_cmd() argument
794 cancelled->tcon = tcon; in __smb2_handle_cancelled_cmd()
804 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, in smb2_handle_cancelled_close() argument
809 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in smb2_handle_cancelled_close()
811 if (tcon->tc_count <= 0) { in smb2_handle_cancelled_close()
814 trace_smb3_tcon_ref(tcon->debug_id, tcon->tc_count, 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()
822 cifs_server_dbg(FYI, "tid=0x%x: tcon is closing, skipping async close retry of fid %llu %llu\n", 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()
828 trace_smb3_tcon_ref(tcon->debug_id, tcon->tc_count, in smb2_handle_cancelled_close()
832 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0, in smb2_handle_cancelled_close()
835 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_close); in smb2_handle_cancelled_close()
845 struct cifs_tcon *tcon; in smb2_handle_cancelled_mid() local
852 tcon = smb2_find_smb_tcon(server, le64_to_cpu(hdr->SessionId), in smb2_handle_cancelled_mid()
854 if (!tcon) in smb2_handle_cancelled_mid()
857 rc = __smb2_handle_cancelled_cmd(tcon, in smb2_handle_cancelled_mid()
863 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_cancelled_mid); in smb2_handle_cancelled_mid()