Lines Matching refs:tcon
533 smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp)
544 list_for_each(tmp, &tcon->openFileList) {
574 smb2_tcon_find_pending_open_lease(struct cifs_tcon *tcon,
583 list_for_each_entry(open, &tcon->pending_opens, olist) {
609 struct cifs_tcon *tcon;
614 /* look up tcon based on tid & uid */
623 tcon = list_entry(tmp2, struct cifs_tcon,
625 spin_lock(&tcon->open_file_lock);
627 &tcon->stats.cifs_stats.num_oplock_brks);
628 if (smb2_tcon_has_lease(tcon, rsp)) {
629 spin_unlock(&tcon->open_file_lock);
633 open = smb2_tcon_find_pending_open_lease(tcon,
642 spin_unlock(&tcon->open_file_lock);
649 spin_unlock(&tcon->open_file_lock);
651 if (tcon->crfid.is_valid &&
653 tcon->crfid.fid->lease_key,
655 INIT_WORK(&tcon->crfid.lease_break,
658 &tcon->crfid.lease_break);
676 struct cifs_tcon *tcon;
695 /* look up tcon based on tid & uid */
701 tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
703 spin_lock(&tcon->open_file_lock);
704 list_for_each(tmp2, &tcon->openFileList) {
715 &tcon->stats.cifs_stats.num_oplock_brks);
734 spin_unlock(&tcon->open_file_lock);
738 spin_unlock(&tcon->open_file_lock);
751 struct cifs_tcon *tcon = cancelled->tcon;
760 rc = SMB2_close(0, tcon, cancelled->fid.persistent_fid,
765 cifs_put_tcon(tcon);
770 * Caller should already has an extra reference to @tcon
778 __smb2_handle_cancelled_cmd(struct cifs_tcon *tcon, __u16 cmd, __u64 mid,
789 cancelled->tcon = tcon;
799 smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_fid,
804 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count);
806 if (tcon->tc_count <= 0) {
809 WARN_ONCE(tcon->tc_count < 0, "tcon refcount is negative");
812 if (tcon->ses)
813 server = tcon->ses->server;
815 cifs_server_dbg(FYI, "tid=%u: tcon is closing, skipping async close retry of fid %llu %llu\n",
816 tcon->tid, persistent_fid, volatile_fid);
820 tcon->tc_count++;
823 rc = __smb2_handle_cancelled_cmd(tcon, SMB2_CLOSE_HE, 0,
826 cifs_put_tcon(tcon);
836 struct cifs_tcon *tcon;
843 tcon = smb2_find_smb_tcon(server, sync_hdr->SessionId,
845 if (!tcon)
848 rc = __smb2_handle_cancelled_cmd(tcon,
854 cifs_put_tcon(tcon);