• Home
  • Raw
  • Download

Lines Matching refs:tcon

86 int smb3_encryption_required(const struct cifs_tcon *tcon)  in smb3_encryption_required()  argument
88 if (!tcon || !tcon->ses) in smb3_encryption_required()
90 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required()
91 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA)) in smb3_encryption_required()
93 if (tcon->seal && in smb3_encryption_required()
94 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
101 const struct cifs_tcon *tcon, in smb2_hdr_assemble() argument
122 if (!tcon) in smb2_hdr_assemble()
131 shdr->TreeId = tcon->tid; in smb2_hdr_assemble()
133 if (tcon->ses) in smb2_hdr_assemble()
134 shdr->SessionId = tcon->ses->Suid; in smb2_hdr_assemble()
149 if (server && server->sign && !smb3_encryption_required(tcon)) in smb2_hdr_assemble()
156 smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_reconnect() argument
169 if (tcon == NULL) in smb2_reconnect()
175 if (tcon->tidStatus == CifsExiting) { in smb2_reconnect()
189 if ((!tcon->ses) || (tcon->ses->status == CifsExiting) || in smb2_reconnect()
190 (!tcon->ses->server) || !server) in smb2_reconnect()
193 ses = tcon->ses; in smb2_reconnect()
238 if (!tcon->retry) { in smb2_reconnect()
245 if (!tcon->ses->need_reconnect && !tcon->need_reconnect) in smb2_reconnect()
254 mutex_lock(&tcon->ses->session_mutex); in smb2_reconnect()
263 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
275 rc = cifs_negotiate_protocol(0, tcon->ses); in smb2_reconnect()
276 if (!rc && tcon->ses->need_reconnect) { in smb2_reconnect()
277 rc = cifs_setup_session(0, tcon->ses, nls_codepage); in smb2_reconnect()
278 if ((rc == -EACCES) && !tcon->retry) { in smb2_reconnect()
282 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
295 if (rc || !tcon->need_reconnect) { in smb2_reconnect()
296 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
300 cifs_mark_open_files_invalid(tcon); in smb2_reconnect()
301 if (tcon->use_persistent) in smb2_reconnect()
302 tcon->need_reopen_files = true; in smb2_reconnect()
304 rc = cifs_tree_connect(0, tcon, nls_codepage); in smb2_reconnect()
305 mutex_unlock(&tcon->ses->session_mutex); in smb2_reconnect()
345 fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, in fill_small_buf() argument
360 smb2_hdr_assemble(&spdu->sync_hdr, smb2_command, tcon, server); in fill_small_buf()
371 static int __smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in __smb2_plain_req_init() argument
385 fill_small_buf(smb2_command, tcon, server, in __smb2_plain_req_init()
389 if (tcon != NULL) { in __smb2_plain_req_init()
391 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]); in __smb2_plain_req_init()
392 cifs_stats_inc(&tcon->num_smbs_sent); in __smb2_plain_req_init()
398 static int smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_plain_req_init() argument
404 rc = smb2_reconnect(smb2_command, tcon, server); in smb2_plain_req_init()
408 return __smb2_plain_req_init(smb2_command, tcon, server, request_buf, in smb2_plain_req_init()
412 static int smb2_ioctl_req_init(u32 opcode, struct cifs_tcon *tcon, in smb2_ioctl_req_init() argument
418 return __smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
421 return smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
1001 int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) in smb3_validate_negotiate() argument
1008 struct TCP_Server_Info *server = tcon->ses->server; in smb3_validate_negotiate()
1023 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) in smb3_validate_negotiate()
1026 if (tcon->ses->user_name == NULL) { in smb3_validate_negotiate()
1031 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL) in smb3_validate_negotiate()
1040 if (tcon->ses->chan_max > 1) in smb3_validate_negotiate()
1046 if (tcon->ses->sign) in smb3_validate_negotiate()
1083 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in smb3_validate_negotiate()
1689 static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code) in cifs_stats_fail_inc() argument
1691 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]); in cifs_stats_fail_inc()
1697 static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon) in init_copy_chunk_defaults() argument
1699 tcon->max_chunks = 256; in init_copy_chunk_defaults()
1700 tcon->max_bytes_chunk = 1048576; in init_copy_chunk_defaults()
1701 tcon->max_bytes_copy = 16777216; in init_copy_chunk_defaults()
1706 struct cifs_tcon *tcon, const struct nls_table *cp) in SMB2_tcon() argument
1741 tcon->tid = 0; in SMB2_tcon()
1742 atomic_set(&tcon->num_remote_opens, 0); in SMB2_tcon()
1743 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server, in SMB2_tcon()
1750 if (smb3_encryption_required(tcon)) in SMB2_tcon()
1770 !smb3_encryption_required(tcon) && in SMB2_tcon()
1787 trace_smb3_tcon(xid, tcon->tid, ses->Suid, tree, rc); in SMB2_tcon()
1789 if (tcon) { in SMB2_tcon()
1790 cifs_stats_fail_inc(tcon, SMB2_TREE_CONNECT_HE); in SMB2_tcon()
1791 tcon->need_reconnect = true; in SMB2_tcon()
1801 tcon->pipe = true; in SMB2_tcon()
1805 tcon->print = true; in SMB2_tcon()
1814 tcon->share_flags = le32_to_cpu(rsp->ShareFlags); in SMB2_tcon()
1815 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */ in SMB2_tcon()
1816 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess); in SMB2_tcon()
1817 tcon->tidStatus = CifsGood; in SMB2_tcon()
1818 tcon->need_reconnect = false; in SMB2_tcon()
1819 tcon->tid = rsp->sync_hdr.TreeId; in SMB2_tcon()
1820 strlcpy(tcon->treeName, tree, sizeof(tcon->treeName)); in SMB2_tcon()
1823 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0)) in SMB2_tcon()
1826 if (tcon->seal && in SMB2_tcon()
1830 init_copy_chunk_defaults(tcon); in SMB2_tcon()
1832 rc = server->ops->validate_negotiate(xid, tcon); in SMB2_tcon()
1847 SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon) in SMB2_tdis() argument
1852 struct cifs_ses *ses = tcon->ses; in SMB2_tdis()
1864 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in SMB2_tdis()
1867 close_shroot_lease(&tcon->crfid); in SMB2_tdis()
1869 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server, in SMB2_tdis()
1875 if (smb3_encryption_required(tcon)) in SMB2_tdis()
1891 cifs_stats_fail_inc(tcon, SMB2_TREE_DISCONNECT_HE); in SMB2_tdis()
2096 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout); in create_durable_v2_buf()
2487 umode_t mode, struct cifs_tcon *tcon, in smb311_posix_mkdir() argument
2494 struct cifs_ses *ses = tcon->ses; in smb311_posix_mkdir()
2523 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in smb311_posix_mkdir()
2529 if (smb3_encryption_required(tcon)) in smb311_posix_mkdir()
2554 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in smb311_posix_mkdir()
2560 tcon->treeName, utf16_path); in smb311_posix_mkdir()
2593 if (tcon->posix_extensions) { in smb311_posix_mkdir()
2607 trace_smb3_posix_mkdir_enter(xid, tcon->tid, ses->Suid, CREATE_NOT_FILE, in smb311_posix_mkdir()
2613 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in smb311_posix_mkdir()
2614 trace_smb3_posix_mkdir_err(xid, tcon->tid, ses->Suid, in smb311_posix_mkdir()
2621 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, in smb311_posix_mkdir()
2625 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId); in smb311_posix_mkdir()
2640 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_open_init() argument
2654 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in SMB2_open_init()
2686 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in SMB2_open_init()
2692 tcon->treeName, path); in SMB2_open_init()
2717 if ((!server->oplocks) || (tcon->no_lease)) in SMB2_open_init()
2743 tcon->use_persistent); in SMB2_open_init()
2748 if (tcon->posix_extensions) { in SMB2_open_init()
2761 if (tcon->snapshot_time) { in SMB2_open_init()
2770 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time); in SMB2_open_init()
2841 struct cifs_tcon *tcon = oparms->tcon; in SMB2_open() local
2842 struct cifs_ses *ses = tcon->ses; in SMB2_open()
2854 if (smb3_encryption_required(tcon)) in SMB2_open()
2862 rc = SMB2_open_init(tcon, server, in SMB2_open()
2867 trace_smb3_open_enter(xid, tcon->tid, tcon->ses->Suid, in SMB2_open()
2876 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in SMB2_open()
2883 trace_smb3_open_err(xid, tcon->tid, ses->Suid, in SMB2_open()
2887 tcon->treeName); in SMB2_open()
2888 tcon->need_reconnect = true; in SMB2_open()
2892 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, in SMB2_open()
2896 atomic_inc(&tcon->num_remote_opens); in SMB2_open()
2923 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_ioctl_init() argument
2935 rc = smb2_ioctl_req_init(opcode, tcon, server, in SMB2_ioctl_init()
3028 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_ioctl() argument
3052 if (!tcon) in SMB2_ioctl()
3055 ses = tcon->ses; in SMB2_ioctl()
3063 if (smb3_encryption_required(tcon)) in SMB2_ioctl()
3071 rc = SMB2_ioctl_init(tcon, server, in SMB2_ioctl()
3083 trace_smb3_fsctl_err(xid, persistent_fid, tcon->tid, in SMB2_ioctl()
3087 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3092 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3097 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3144 SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_compression() argument
3154 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_compression()
3166 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_close_init() argument
3175 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server, in SMB2_close_init()
3200 __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in __SMB2_close() argument
3206 struct cifs_ses *ses = tcon->ses; in __SMB2_close()
3220 if (smb3_encryption_required(tcon)) in __SMB2_close()
3232 trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid); in __SMB2_close()
3233 rc = SMB2_close_init(tcon, server, in __SMB2_close()
3244 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE); in __SMB2_close()
3245 trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid, in __SMB2_close()
3249 trace_smb3_close_done(xid, persistent_fid, tcon->tid, in __SMB2_close()
3259 atomic_dec(&tcon->num_remote_opens); in __SMB2_close()
3268 tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid, in __SMB2_close()
3278 SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_close() argument
3281 return __SMB2_close(xid, tcon, persistent_fid, volatile_fid, NULL); in SMB2_close()
3340 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_query_info_init() argument
3351 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in SMB2_query_info_init()
3384 query_info(const unsigned int xid, struct cifs_tcon *tcon, in query_info() argument
3395 struct cifs_ses *ses = tcon->ses; in query_info()
3408 if (smb3_encryption_required(tcon)) in query_info()
3416 rc = SMB2_query_info_init(tcon, server, in query_info()
3423 trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid, in query_info()
3431 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in query_info()
3432 trace_smb3_query_info_err(xid, persistent_fid, tcon->tid, in query_info()
3437 trace_smb3_query_info_done(xid, persistent_fid, tcon->tid, in query_info()
3471 int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_info() argument
3474 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_info()
3482 SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_query_info() argument
3489 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB311_posix_query_info()
3495 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_acl() argument
3502 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_acl()
3508 SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_get_srv_num() argument
3511 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_get_srv_num()
3525 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_notify_init() argument
3534 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server, in SMB2_notify_init()
3557 SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_change_notify() argument
3561 struct cifs_ses *ses = tcon->ses; in SMB2_change_notify()
3574 if (smb3_encryption_required(tcon)) in SMB2_change_notify()
3582 rc = SMB2_notify_init(xid, &rqst, tcon, server, in SMB2_change_notify()
3588 trace_smb3_notify_enter(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3594 cifs_stats_fail_inc(tcon, SMB2_CHANGE_NOTIFY_HE); in SMB2_change_notify()
3595 trace_smb3_notify_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3598 trace_smb3_notify_done(xid, persistent_fid, tcon->tid, in SMB2_change_notify()
3639 struct cifs_tcon *tcon, *tcon2; in smb2_reconnect_server() local
3654 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_reconnect_server()
3655 if (tcon->need_reconnect || tcon->need_reopen_files) { in smb2_reconnect_server()
3656 tcon->tc_count++; in smb2_reconnect_server()
3657 list_add_tail(&tcon->rlist, &tmp_list); in smb2_reconnect_server()
3680 list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) { in smb2_reconnect_server()
3681 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3683 cifs_reopen_persistent_handles(tcon); in smb2_reconnect_server()
3686 list_del_init(&tcon->rlist); in smb2_reconnect_server()
3687 if (tcon->ipc) in smb2_reconnect_server()
3688 cifs_put_smb_ses(tcon->ses); in smb2_reconnect_server()
3690 cifs_put_tcon(tcon); in smb2_reconnect_server()
3749 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_flush_init() argument
3757 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server, in SMB2_flush_init()
3772 SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_flush() argument
3775 struct cifs_ses *ses = tcon->ses; in SMB2_flush()
3788 if (smb3_encryption_required(tcon)) in SMB2_flush()
3796 rc = SMB2_flush_init(xid, &rqst, tcon, server, in SMB2_flush()
3801 trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid); in SMB2_flush()
3806 cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE); in SMB2_flush()
3807 trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_flush()
3810 trace_smb3_flush_done(xid, persistent_fid, tcon->tid, in SMB2_flush()
3833 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server, in smb2_new_read_req()
3855 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in smb2_new_read_req()
3922 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_readv_callback() local
3961 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
3971 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
3992 cifs_stats_fail_inc(tcon, SMB2_READ_HE); in smb2_readv_callback()
3995 tcon->tid, tcon->ses->Suid, rdata->offset, in smb2_readv_callback()
4000 tcon->tid, tcon->ses->Suid, in smb2_readv_callback()
4019 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv() local
4026 rdata->server = cifs_pick_channel(tcon->ses); in smb2_async_readv()
4028 io_parms.tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv()
4041 if (smb3_encryption_required(io_parms.tcon)) in smb2_async_readv()
4068 cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); in smb2_async_readv()
4070 io_parms.tcon->tid, in smb2_async_readv()
4071 io_parms.tcon->ses->Suid, in smb2_async_readv()
4092 struct cifs_ses *ses = io_parms->tcon->ses; in SMB2_read()
4095 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_read()
4102 if (smb3_encryption_required(io_parms->tcon)) in SMB2_read()
4118 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE); in SMB2_read()
4121 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4126 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4133 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4168 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_writev_callback() local
4227 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_writev_callback()
4230 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_writev_callback()
4234 tcon->treeName); in smb2_writev_callback()
4238 tcon->tid, tcon->ses->Suid, in smb2_writev_callback()
4254 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_async_writev() local
4261 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4263 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server, in smb2_async_writev()
4268 if (smb3_encryption_required(tcon)) in smb2_async_writev()
4285 tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes); in smb2_async_writev()
4373 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_async_writev()
4376 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_async_writev()
4410 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_write()
4415 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server, in SMB2_write()
4420 if (smb3_encryption_required(io_parms->tcon)) in SMB2_write()
4437 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in SMB2_write()
4448 rc = cifs_send_recv(xid, io_parms->tcon->ses, server, in SMB2_write()
4455 io_parms->tcon->tid, in SMB2_write()
4456 io_parms->tcon->ses->Suid, in SMB2_write()
4458 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE); in SMB2_write()
4463 io_parms->tcon->tid, in SMB2_write()
4464 io_parms->tcon->ses->Suid, in SMB2_write()
4623 struct cifs_tcon *tcon, in SMB2_query_directory_init() argument
4639 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server, in SMB2_query_directory_init()
4686 trace_smb3_query_dir_enter(xid, persistent_fid, tcon->tid, in SMB2_query_directory_init()
4687 tcon->ses->Suid, index, output_size); in SMB2_query_directory_init()
4700 smb2_parse_query_directory(struct cifs_tcon *tcon, in smb2_parse_query_directory() argument
4772 SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_directory() argument
4782 struct cifs_ses *ses = tcon->ses; in SMB2_query_directory()
4789 if (smb3_encryption_required(tcon)) in SMB2_query_directory()
4797 rc = SMB2_query_directory_init(xid, tcon, server, in SMB2_query_directory()
4812 tcon->tid, tcon->ses->Suid, index, 0); in SMB2_query_directory()
4816 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4817 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4818 cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); in SMB2_query_directory()
4823 rc = smb2_parse_query_directory(tcon, &rsp_iov, resp_buftype, in SMB2_query_directory()
4826 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4827 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4832 trace_smb3_query_dir_done(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4833 tcon->ses->Suid, index, srch_inf->entries_in_buffer); in SMB2_query_directory()
4842 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_set_info_init() argument
4853 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server, in SMB2_set_info_init()
4893 send_set_info(const unsigned int xid, struct cifs_tcon *tcon, in send_set_info() argument
4904 struct cifs_ses *ses = tcon->ses; in send_set_info()
4914 if (smb3_encryption_required(tcon)) in send_set_info()
4925 rc = SMB2_set_info_init(tcon, server, in send_set_info()
4942 cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE); in send_set_info()
4943 trace_smb3_set_info_err(xid, persistent_fid, tcon->tid, in send_set_info()
4953 SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_set_eof() argument
4965 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_eof()
4971 SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_acl() argument
4975 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_acl()
4981 SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_ea() argument
4985 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_ea()
4991 SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_oplock_break() argument
4998 struct cifs_ses *ses = tcon->ses; in SMB2_oplock_break()
5007 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_oplock_break()
5012 if (smb3_encryption_required(tcon)) in SMB2_oplock_break()
5034 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_oplock_break()
5073 build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, in build_qfs_info_req() argument
5084 if ((tcon->ses == NULL) || server == NULL) in build_qfs_info_req()
5087 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in build_qfs_info_req()
5108 SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_qfs_info() argument
5117 struct cifs_ses *ses = tcon->ses; in SMB311_posix_qfs_info()
5122 rc = build_qfs_info_req(&iov, tcon, server, in SMB311_posix_qfs_info()
5129 if (smb3_encryption_required(tcon)) in SMB311_posix_qfs_info()
5140 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB311_posix_qfs_info()
5159 SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_info() argument
5168 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_info()
5173 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_info()
5180 if (smb3_encryption_required(tcon)) in SMB2_QFS_info()
5191 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_info()
5210 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_attr() argument
5219 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_attr()
5241 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_attr()
5247 if (smb3_encryption_required(tcon)) in SMB2_QFS_attr()
5258 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_attr()
5270 memcpy(&tcon->fsAttrInfo, offset in SMB2_QFS_attr()
5274 memcpy(&tcon->fsDevInfo, offset in SMB2_QFS_attr()
5279 tcon->ss_flags = le32_to_cpu(ss_info->Flags); in SMB2_QFS_attr()
5280 tcon->perf_sector_size = in SMB2_QFS_attr()
5285 tcon->vol_serial_number = vol_info->VolumeSerialNumber; in SMB2_QFS_attr()
5286 tcon->vol_create_time = vol_info->VolumeCreationTime; in SMB2_QFS_attr()
5295 smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, in smb2_lockv() argument
5308 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_lockv()
5312 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server, in smb2_lockv()
5317 if (smb3_encryption_required(tcon)) in smb2_lockv()
5333 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in smb2_lockv()
5339 rc = cifs_send_recv(xid, tcon->ses, server, in smb2_lockv()
5345 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE); in smb2_lockv()
5346 trace_smb3_lock_err(xid, persist_fid, tcon->tid, in smb2_lockv()
5347 tcon->ses->Suid, rc); in smb2_lockv()
5354 SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lock() argument
5367 return smb2_lockv(xid, tcon, persist_fid, volatile_fid, pid, 1, &lock); in SMB2_lock()
5371 SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lease_break() argument
5377 struct cifs_ses *ses = tcon->ses; in SMB2_lease_break()
5385 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in SMB2_lease_break()
5388 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_lease_break()
5393 if (smb3_encryption_required(tcon)) in SMB2_lease_break()
5419 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_lease_break()
5420 trace_smb3_lease_err(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()
5424 trace_smb3_lease_done(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()