Lines Matching full:tcon
531 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp) in smb2_tcon_has_lease() argument
542 list_for_each(tmp, &tcon->openFileList) { in smb2_tcon_has_lease()
572 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon, in smb2_tcon_find_pending_open_lease() argument
581 list_for_each_entry(open, &tcon->pending_opens, olist) { in smb2_tcon_find_pending_open_lease()
607 struct cifs_tcon *tcon; in smb2_is_valid_lease_break() local
612 /* look up tcon based on tid & uid */ in smb2_is_valid_lease_break()
621 tcon = list_entry(tmp2, struct cifs_tcon, in smb2_is_valid_lease_break()
623 spin_lock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
625 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_lease_break()
626 if (smb2_tcon_has_lease(tcon, rsp)) { in smb2_is_valid_lease_break()
627 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
631 open = smb2_tcon_find_pending_open_lease(tcon, in smb2_is_valid_lease_break()
640 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
647 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_lease_break()
649 if (tcon->crfid.is_valid && in smb2_is_valid_lease_break()
651 tcon->crfid.fid->lease_key, in smb2_is_valid_lease_break()
653 INIT_WORK(&tcon->crfid.lease_break, in smb2_is_valid_lease_break()
656 &tcon->crfid.lease_break); in smb2_is_valid_lease_break()
674 struct cifs_tcon *tcon; in smb2_is_valid_oplock_break() local
693 /* look up tcon based on tid & uid */ in smb2_is_valid_oplock_break()
699 tcon = list_entry(tmp1, struct cifs_tcon, tcon_list); in smb2_is_valid_oplock_break()
701 spin_lock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
702 list_for_each(tmp2, &tcon->openFileList) { in smb2_is_valid_oplock_break()
713 &tcon->stats.cifs_stats.num_oplock_brks); in smb2_is_valid_oplock_break()
732 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
736 spin_unlock(&tcon->open_file_lock); in smb2_is_valid_oplock_break()
749 struct cifs_tcon *tcon = cancelled->tcon; in smb2_cancelled_close_fid() local
758 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid, in smb2_cancelled_close_fid()
763 cifs_put_tcon(tcon); in smb2_cancelled_close_fid()
768 * Caller should already has an extra reference to @tcon
776 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid, in __smb2_handle_cancelled_cmd() argument
787 cancelled->tcon = tcon; in __smb2_handle_cancelled_cmd()
797 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid, in smb2_handle_cancelled_close() argument
802 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); in smb2_handle_cancelled_close()
804 if (tcon->tc_count <= 0) { in smb2_handle_cancelled_close()
807 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative"); in smb2_handle_cancelled_close()
810 if (tcon->ses) in smb2_handle_cancelled_close()
811 server = tcon->ses->server; in smb2_handle_cancelled_close()
813 cifs_server_dbg(FYI, "tid=%u: tcon is closing, skipping async close retry of fid %llu %llu\n", in smb2_handle_cancelled_close()
814 tcon->tid, persistent_fid, volatile_fid); in smb2_handle_cancelled_close()
818 tcon->tc_count++; in smb2_handle_cancelled_close()
821 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0, in smb2_handle_cancelled_close()
824 cifs_put_tcon(tcon); in smb2_handle_cancelled_close()
834 struct cifs_tcon *tcon; in smb2_handle_cancelled_mid() local
841 tcon = smb2_find_smb_tcon(server, sync_hdr->SessionId, in smb2_handle_cancelled_mid()
843 if (!tcon) in smb2_handle_cancelled_mid()
846 rc = __smb2_handle_cancelled_cmd(tcon, in smb2_handle_cancelled_mid()
852 cifs_put_tcon(tcon); in smb2_handle_cancelled_mid()