Lines Matching full:tcon
73 int smb3_encryption_required(const struct cifs_tcon *tcon)
75 if (!tcon || !tcon->ses)
77 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) ||
78 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA))
80 if (tcon->seal &&
81 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION))
84 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION))
91 const struct cifs_tcon *tcon,
129 if (!tcon)
138 shdr->Id.SyncId.TreeId = cpu_to_le32(tcon->tid);
140 if (tcon->ses)
141 shdr->SessionId = cpu_to_le64(tcon->ses->Suid);
153 /* if (tcon->share_flags & SHI1005_FLAGS_DFS)
156 if (server && server->sign && !smb3_encryption_required(tcon))
213 smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon,
222 * SMB2s NegProt, SessSetup, Logoff do not have tcon yet so
226 if (tcon == NULL)
236 spin_lock(&tcon->tc_lock);
237 if (tcon->status == TID_EXITING) {
242 spin_unlock(&tcon->tc_lock);
248 spin_unlock(&tcon->tc_lock);
250 ses = tcon->ses;
289 rc = cifs_wait_for_server_reconnect(server, tcon->retry);
294 if (!cifs_chan_needs_reconnect(ses, server) && !tcon->need_reconnect) {
299 cifs_dbg(FYI, "sess reconnect mask: 0x%lx, tcon reconnect: %d",
300 tcon->ses->chans_need_reconnect,
301 tcon->need_reconnect);
326 if (tcon->retry)
347 if (tcon->need_reconnect)
384 if ((rc == -EACCES) && !tcon->retry) {
398 if (!tcon->need_reconnect) {
402 cifs_mark_open_files_invalid(tcon);
403 if (tcon->use_persistent)
404 tcon->need_reopen_files = true;
406 rc = cifs_tree_connect(0, tcon, nls_codepage);
408 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc);
410 /* If sess reconnected but tcon didn't, something strange ... */
412 cifs_dbg(VFS, "reconnect tcon failed rc = %d\n", rc);
434 rc = server->ops->query_server_interfaces(xid, tcon, false);
457 queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
501 fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon,
516 smb2_hdr_assemble(&spdu->hdr, smb2_command, tcon, server);
527 static int __smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon,
546 fill_small_buf(smb2_command, tcon, server,
550 if (tcon != NULL) {
552 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]);
553 cifs_stats_inc(&tcon->num_smbs_sent);
559 static int smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon,
565 rc = smb2_reconnect(smb2_command, tcon, server, false);
569 return __smb2_plain_req_init(smb2_command, tcon, server, request_buf,
573 static int smb2_ioctl_req_init(u32 opcode, struct cifs_tcon *tcon,
579 return __smb2_plain_req_init(SMB2_IOCTL, tcon, server,
582 return smb2_plain_req_init(SMB2_IOCTL, tcon, server,
1136 * No tcon so can't do
1137 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]);
1279 int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon)
1286 struct TCP_Server_Info *server = tcon->ses->server;
1301 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST)
1304 if (tcon->ses->user_name == NULL) {
1309 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL)
1318 if (tcon->ses->chan_max > 1)
1324 if (tcon->ses->sign)
1362 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID,
1984 /* since no tcon, smb2_init can not do this, so do here */
2005 * No tcon so can't do
2006 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]);
2013 static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code)
2015 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]);
2021 static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon)
2023 tcon->max_chunks = 256;
2024 tcon->max_bytes_chunk = 1048576;
2025 tcon->max_bytes_copy = 16777216;
2030 struct cifs_tcon *tcon, const struct nls_table *cp)
2045 cifs_dbg(FYI, "TCON\n");
2062 tcon->tid = 0;
2063 atomic_set(&tcon->num_remote_opens, 0);
2064 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server,
2071 if (smb3_encryption_required(tcon))
2085 * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1
2090 !smb3_encryption_required(tcon) &&
2112 trace_smb3_tcon(xid, tcon->tid, ses->Suid, tree, rc);
2114 cifs_stats_fail_inc(tcon, SMB2_TREE_CONNECT_HE);
2115 tcon->need_reconnect = true;
2124 tcon->pipe = true;
2128 tcon->print = true;
2137 tcon->share_flags = le32_to_cpu(rsp->ShareFlags);
2138 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */
2139 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess);
2140 tcon->tid = le32_to_cpu(rsp->hdr.Id.SyncId.TreeId);
2141 strscpy(tcon->tree_name, tree, sizeof(tcon->tree_name));
2144 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0))
2147 if (tcon->seal &&
2151 init_copy_chunk_defaults(tcon);
2153 rc = server->ops->validate_negotiate(xid, tcon);
2155 if (tcon->share_flags & SMB2_SHAREFLAG_ISOLATED_TRANSPORT)
2170 SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon)
2175 struct cifs_ses *ses = tcon->ses;
2188 trace_smb3_tdis_enter(xid, tcon->tid, ses->Suid, tcon->tree_name);
2190 if ((tcon->need_reconnect) ||
2191 (CIFS_ALL_CHANS_NEED_RECONNECT(tcon->ses))) {
2197 invalidate_all_cached_dirs(tcon);
2199 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, server,
2205 if (smb3_encryption_required(tcon))
2221 cifs_stats_fail_inc(tcon, SMB2_TREE_DISCONNECT_HE);
2222 trace_smb3_tdis_err(xid, tcon->tid, ses->Suid, rc);
2224 trace_smb3_tdis_done(xid, tcon->tid, ses->Suid);
2443 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout);
2814 umode_t mode, struct cifs_tcon *tcon,
2821 struct cifs_ses *ses = tcon->ses;
2857 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server,
2863 if (smb3_encryption_required(tcon))
2888 if (tcon->share_flags & SHI1005_FLAGS_DFS) {
2894 tcon->tree_name, utf16_path);
2927 if (tcon->posix_extensions) {
2944 trace_smb3_posix_mkdir_enter(xid, tcon->tid, ses->Suid, full_path, CREATE_NOT_FILE,
2954 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE);
2955 trace_smb3_posix_mkdir_err(xid, tcon->tid, ses->Suid,
2973 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid,
2976 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId);
2989 smb2_should_replay(tcon, &retries, &cur_sleep))
2996 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
3010 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server,
3042 if (tcon->share_flags & SHI1005_FLAGS_DFS) {
3048 tcon->tree_name, path);
3071 if ((!server->oplocks) || (tcon->no_lease))
3089 tcon->use_persistent);
3094 if (tcon->posix_extensions) {
3100 if (tcon->snapshot_time) {
3102 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time);
3186 struct cifs_tcon *tcon = oparms->tcon;
3187 struct cifs_ses *ses = tcon->ses;
3206 if (smb3_encryption_required(tcon))
3214 rc = SMB2_open_init(tcon, server,
3219 trace_smb3_open_enter(xid, tcon->tid, tcon->ses->Suid, oparms->path,
3231 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE);
3238 trace_smb3_open_err(xid, tcon->tid, ses->Suid,
3242 tcon->tree_name);
3243 tcon->need_reconnect = true;
3249 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid,
3252 atomic_inc(&tcon->num_remote_opens);
3280 smb2_should_replay(tcon, &retries, &cur_sleep))
3287 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
3299 rc = smb2_ioctl_req_init(opcode, tcon, server,
3307 if (WARN_ON_ONCE(smb3_encryption_required(tcon) &&
3402 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
3418 if (!tcon)
3421 ses = tcon->ses;
3442 if (smb3_encryption_required(tcon))
3450 rc = SMB2_ioctl_init(tcon, server,
3465 trace_smb3_fsctl_err(xid, persistent_fid, tcon->tid,
3469 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE);
3474 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE);
3479 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE);
3530 smb2_should_replay(tcon, &retries, &cur_sleep))
3541 SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
3551 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid,
3563 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
3572 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server,
3597 __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
3603 struct cifs_ses *ses = tcon->ses;
3624 if (smb3_encryption_required(tcon))
3636 trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid);
3637 rc = SMB2_close_init(tcon, server,
3651 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE);
3652 trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid,
3656 trace_smb3_close_done(xid, persistent_fid, tcon->tid,
3662 atomic_dec(&tcon->num_remote_opens);
3673 tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid,
3681 smb2_should_replay(tcon, &retries, &cur_sleep))
3688 SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
3691 return __SMB2_close(xid, tcon, persistent_fid, volatile_fid, NULL);
3750 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
3766 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server,
3799 query_info(const unsigned int xid, struct cifs_tcon *tcon,
3810 struct cifs_ses *ses = tcon->ses;
3830 if (smb3_encryption_required(tcon))
3838 rc = SMB2_query_info_init(tcon, server,
3845 trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid,
3856 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE);
3857 trace_smb3_query_info_err(xid, persistent_fid, tcon->tid,
3862 trace_smb3_query_info_done(xid, persistent_fid, tcon->tid,
3895 smb2_should_replay(tcon, &retries, &cur_sleep))
3901 int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon,
3904 return query_info(xid, tcon, persistent_fid, volatile_fid,
3914 SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
3921 return query_info(xid, tcon, persistent_fid, volatile_fid,
3929 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon,
3937 return query_info(xid, tcon, persistent_fid, volatile_fid,
3943 SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon,
3946 return query_info(xid, tcon, persistent_fid, volatile_fid,
3960 struct cifs_tcon *tcon, struct TCP_Server_Info *server,
3969 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server,
3992 SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon,
3997 struct cifs_ses *ses = tcon->ses;
4017 if (smb3_encryption_required(tcon))
4028 rc = SMB2_notify_init(xid, &rqst, tcon, server,
4034 trace_smb3_notify_enter(xid, persistent_fid, tcon->tid, ses->Suid,
4044 cifs_stats_fail_inc(tcon, SMB2_CHANGE_NOTIFY_HE);
4045 trace_smb3_notify_err(xid, persistent_fid, tcon->tid, ses->Suid,
4048 trace_smb3_notify_done(xid, persistent_fid, tcon->tid,
4076 smb2_should_replay(tcon, &retries, &cur_sleep))
4114 struct cifs_tcon *tcon, *tcon2;
4133 /* Prevent simultaneous reconnects that can corrupt tcon->rlist list */
4158 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
4159 if (tcon->need_reconnect || tcon->need_reopen_files) {
4160 tcon->tc_count++;
4161 trace_smb3_tcon_ref(tcon->debug_id, tcon->tc_count,
4163 list_add_tail(&tcon->rlist, &tmp_list);
4178 * binding session, but tcon is healthy (some other channel
4191 list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) {
4192 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server, true);
4194 cifs_reopen_persistent_handles(tcon);
4197 list_del_init(&tcon->rlist);
4198 if (tcon->ipc)
4199 cifs_put_smb_ses(tcon->ses);
4201 cifs_put_tcon(tcon, netfs_trace_tcon_ref_put_reconnect_server);
4207 /* allocate a dummy tcon struct used for reconnect */
4208 tcon = tcon_info_alloc(false, netfs_trace_tcon_ref_new_reconnect_server);
4209 if (!tcon) {
4218 tcon->status = TID_GOOD;
4219 tcon->retry = false;
4220 tcon->need_reconnect = false;
4224 tcon->ses = ses;
4225 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server, true);
4231 tconInfoFree(tcon, netfs_trace_tcon_ref_free_reconnect_server);
4293 struct cifs_tcon *tcon, struct TCP_Server_Info *server,
4301 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server,
4316 SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
4319 struct cifs_ses *ses = tcon->ses;
4338 if (smb3_encryption_required(tcon))
4346 rc = SMB2_flush_init(xid, &rqst, tcon, server,
4351 trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid);
4360 cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE);
4361 trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid,
4364 trace_smb3_flush_done(xid, persistent_fid, tcon->tid,
4372 smb2_should_replay(tcon, &retries, &cur_sleep))
4382 struct cifs_tcon *tcon = io_parms->tcon;
4385 if (!server || !tcon)
4397 if (smb3_encryption_required(tcon))
4422 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server,
4444 io_parms->tcon->tid, io_parms->tcon->ses->Suid,
4507 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink);
4544 cifs_stats_bytes_read(tcon, rdata->got_bytes);
4554 cifs_stats_bytes_read(tcon, rdata->got_bytes);
4575 cifs_stats_fail_inc(tcon, SMB2_READ_HE);
4578 tcon->tid, tcon->ses->Suid, rdata->offset,
4583 tcon->tid, tcon->ses->Suid,
4602 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink);
4610 rdata->server = cifs_pick_channel(tcon->ses);
4612 io_parms.tcon = tlink_tcon(rdata->cfile->tlink);
4625 if (smb3_encryption_required(io_parms.tcon))
4658 cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE);
4660 io_parms.tcon->tid,
4661 io_parms.tcon->ses->Suid,
4682 struct cifs_ses *ses = io_parms->tcon->ses;
4685 io_parms->server = cifs_pick_channel(io_parms->tcon->ses);
4692 if (smb3_encryption_required(io_parms->tcon))
4708 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE);
4712 io_parms->tcon->tid, ses->Suid,
4716 trace_smb3_read_done(xid, req->PersistentFileId, io_parms->tcon->tid,
4724 io_parms->tcon->tid, ses->Suid,
4759 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
4818 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE);
4821 tcon->tid, tcon->ses->Suid, wdata->offset,
4825 tcon->tree_name);
4829 tcon->tid, tcon->ses->Suid,
4845 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
4855 server = wdata->server = cifs_pick_channel(tcon->ses);
4862 .tcon = tcon,
4872 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server,
4877 if (smb3_encryption_required(tcon))
4895 io_parms->tcon->tid,
4896 io_parms->tcon->ses->Suid,
4981 io_parms->tcon->tid,
4982 io_parms->tcon->ses->Suid,
4987 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE);
5021 io_parms->server = cifs_pick_channel(io_parms->tcon->ses);
5029 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server,
5034 if (smb3_encryption_required(io_parms->tcon))
5051 io_parms->tcon->tid, io_parms->tcon->ses->Suid,
5065 rc = cifs_send_recv(xid, io_parms->tcon->ses, server,
5073 io_parms->tcon->tid,
5074 io_parms->tcon->ses->Suid,
5076 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE);
5082 io_parms->tcon->tid,
5083 io_parms->tcon->ses->Suid,
5091 smb2_should_replay(io_parms->tcon, &retries, &cur_sleep))
5245 struct cifs_tcon *tcon,
5261 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server,
5311 trace_smb3_query_dir_enter(xid, persistent_fid, tcon->tid,
5312 tcon->ses->Suid, index, output_size);
5325 smb2_parse_query_directory(struct cifs_tcon *tcon,
5400 SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
5410 struct cifs_ses *ses = tcon->ses;
5423 if (smb3_encryption_required(tcon))
5431 rc = SMB2_query_directory_init(xid, tcon, server,
5449 tcon->tid, tcon->ses->Suid, index, 0);
5453 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid,
5454 tcon->ses->Suid, index, 0, rc);
5455 cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE);
5460 rc = smb2_parse_query_directory(tcon, &rsp_iov, resp_buftype,
5463 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid,
5464 tcon->ses->Suid, index, 0, rc);
5469 trace_smb3_query_dir_done(xid, persistent_fid, tcon->tid,
5470 tcon->ses->Suid, index, srch_inf->entries_in_buffer);
5477 smb2_should_replay(tcon, &retries, &cur_sleep))
5484 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server,
5495 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server,
5534 send_set_info(const unsigned int xid, struct cifs_tcon *tcon,
5545 struct cifs_ses *ses = tcon->ses;
5561 if (smb3_encryption_required(tcon))
5572 rc = SMB2_set_info_init(tcon, server,
5591 cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE);
5592 trace_smb3_set_info_err(xid, persistent_fid, tcon->tid,
5600 smb2_should_replay(tcon, &retries, &cur_sleep))
5607 SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,
5619 trace_smb3_set_eof(xid, persistent_fid, tcon->tid, tcon->ses->Suid, new_eof);
5621 return send_set_info(xid, tcon, persistent_fid, volatile_fid,
5627 SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon,
5631 return send_set_info(xid, tcon, persistent_fid, volatile_fid,
5637 SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
5641 return send_set_info(xid, tcon, persistent_fid, volatile_fid,
5647 SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon,
5654 struct cifs_ses *ses = tcon->ses;
5669 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server,
5674 if (smb3_encryption_required(tcon))
5698 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE);
5703 smb2_should_replay(tcon, &retries, &cur_sleep))
5741 build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon,
5752 if ((tcon->ses == NULL) || server == NULL)
5755 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server,
5781 SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon,
5790 struct cifs_ses *ses = tcon->ses;
5801 rc = build_qfs_info_req(&iov, tcon, server,
5808 if (smb3_encryption_required(tcon))
5822 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE);
5839 smb2_should_replay(tcon, &retries, &cur_sleep))
5846 SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
5855 struct cifs_ses *ses = tcon->ses;
5866 rc = build_qfs_info_req(&iov, tcon, server,
5873 if (smb3_encryption_required(tcon))
5887 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE);
5904 smb2_should_replay(tcon, &retries, &cur_sleep))
5911 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon,
5920 struct cifs_ses *ses = tcon->ses;
5948 rc = build_qfs_info_req(&iov, tcon, server,
5954 if (smb3_encryption_required(tcon))
5968 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE);
5980 memcpy(&tcon->fsAttrInfo, offset
5984 memcpy(&tcon->fsDevInfo, offset
5989 tcon->ss_flags = le32_to_cpu(ss_info->Flags);
5990 tcon->perf_sector_size =
5995 tcon->vol_serial_number = vol_info->VolumeSerialNumber;
5996 tcon->vol_create_time = vol_info->VolumeCreationTime;
6003 smb2_should_replay(tcon, &retries, &cur_sleep))
6010 smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon,
6029 server = cifs_pick_channel(tcon->ses);
6033 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server,
6038 if (smb3_encryption_required(tcon))
6054 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks);
6063 rc = cifs_send_recv(xid, tcon->ses, server,
6069 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE);
6070 trace_smb3_lock_err(xid, persist_fid, tcon->tid,
6071 tcon->ses->Suid, rc);
6075 smb2_should_replay(tcon, &retries, &cur_sleep))
6082 SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon,
6095 return smb2_lockv(xid, tcon, persist_fid, volatile_fid, pid, 1, &lock);
6099 SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
6105 struct cifs_ses *ses = tcon->ses;
6113 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses);
6116 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server,
6121 if (smb3_encryption_required(tcon))
6147 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE);
6148 trace_smb3_lease_err(le32_to_cpu(lease_state), tcon->tid,
6152 trace_smb3_lease_done(le32_to_cpu(lease_state), tcon->tid,