• Home
  • Raw
  • Download

Lines Matching full: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()
146 /* if (tcon->share_flags & SHI1005_FLAGS_DFS) 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
165 * SMB2s NegProt, SessSetup, Logoff do not have tcon yet so in smb2_reconnect()
169 if (tcon == NULL) in smb2_reconnect()
175 if (tcon->tidStatus == CifsExiting) { in smb2_reconnect()
178 * (and ulogoff which does not have tcon) 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()
307 cifs_dbg(FYI, "reconnect tcon rc = %d\n", rc); in smb2_reconnect()
309 /* If sess reconnected but tcon didn't, something strange ... */ in smb2_reconnect()
310 pr_warn_once("reconnect tcon failed rc = %d\n", rc); 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
390 fill_small_buf(smb2_command, tcon, server, in __smb2_plain_req_init()
394 if (tcon != NULL) { in __smb2_plain_req_init()
396 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]); in __smb2_plain_req_init()
397 cifs_stats_inc(&tcon->num_smbs_sent); in __smb2_plain_req_init()
403 static int smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_plain_req_init() argument
409 rc = smb2_reconnect(smb2_command, tcon, server); in smb2_plain_req_init()
413 return __smb2_plain_req_init(smb2_command, tcon, server, request_buf, in smb2_plain_req_init()
417 static int smb2_ioctl_req_init(u32 opcode, struct cifs_tcon *tcon, in smb2_ioctl_req_init() argument
423 return __smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
426 return smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
877 * No tcon so can't do in SMB2_negotiate()
878 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); in SMB2_negotiate()
1006 int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) in smb3_validate_negotiate() argument
1013 struct TCP_Server_Info *server = tcon->ses->server; in smb3_validate_negotiate()
1028 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) in smb3_validate_negotiate()
1031 if (tcon->ses->user_name == NULL) { in smb3_validate_negotiate()
1036 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL) in smb3_validate_negotiate()
1045 if (tcon->ses->chan_max > 1) in smb3_validate_negotiate()
1051 if (tcon->ses->sign) in smb3_validate_negotiate()
1088 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in smb3_validate_negotiate()
1665 /* since no tcon, smb2_init can not do this, so do here */ in SMB2_logoff()
1686 * No tcon so can't do in SMB2_logoff()
1687 * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); in SMB2_logoff()
1694 static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code) in cifs_stats_fail_inc() argument
1696 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]); in cifs_stats_fail_inc()
1702 static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon) in init_copy_chunk_defaults() argument
1704 tcon->max_chunks = 256; in init_copy_chunk_defaults()
1705 tcon->max_bytes_chunk = 1048576; in init_copy_chunk_defaults()
1706 tcon->max_bytes_copy = 16777216; in init_copy_chunk_defaults()
1711 struct cifs_tcon *tcon, const struct nls_table *cp) in SMB2_tcon() argument
1729 cifs_dbg(FYI, "TCON\n"); in SMB2_tcon()
1746 tcon->tid = 0; in SMB2_tcon()
1747 atomic_set(&tcon->num_remote_opens, 0); in SMB2_tcon()
1748 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server, in SMB2_tcon()
1755 if (smb3_encryption_required(tcon)) in SMB2_tcon()
1769 * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1 in SMB2_tcon()
1774 !smb3_encryption_required(tcon) && in SMB2_tcon()
1791 trace_smb3_tcon(xid, tcon->tid, ses->Suid, tree, rc); in SMB2_tcon()
1793 if (tcon) { in SMB2_tcon()
1794 cifs_stats_fail_inc(tcon, SMB2_TREE_CONNECT_HE); in SMB2_tcon()
1795 tcon->need_reconnect = true; in SMB2_tcon()
1805 tcon->pipe = true; in SMB2_tcon()
1809 tcon->print = true; in SMB2_tcon()
1818 tcon->share_flags = le32_to_cpu(rsp->ShareFlags); in SMB2_tcon()
1819 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */ in SMB2_tcon()
1820 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess); in SMB2_tcon()
1821 tcon->tidStatus = CifsGood; in SMB2_tcon()
1822 tcon->need_reconnect = false; in SMB2_tcon()
1823 tcon->tid = rsp->sync_hdr.TreeId; in SMB2_tcon()
1824 strlcpy(tcon->treeName, tree, sizeof(tcon->treeName)); in SMB2_tcon()
1827 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0)) in SMB2_tcon()
1830 if (tcon->seal && in SMB2_tcon()
1834 init_copy_chunk_defaults(tcon); in SMB2_tcon()
1836 rc = server->ops->validate_negotiate(xid, tcon); in SMB2_tcon()
1851 SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon) in SMB2_tdis() argument
1856 struct cifs_ses *ses = tcon->ses; in SMB2_tdis()
1868 if ((tcon->need_reconnect) || (tcon->ses->need_reconnect)) in SMB2_tdis()
1871 close_shroot_lease(&tcon->crfid); in SMB2_tdis()
1873 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server, in SMB2_tdis()
1879 if (smb3_encryption_required(tcon)) in SMB2_tdis()
1895 cifs_stats_fail_inc(tcon, SMB2_TREE_DISCONNECT_HE); in SMB2_tdis()
2100 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout); in create_durable_v2_buf()
2491 umode_t mode, struct cifs_tcon *tcon, in smb311_posix_mkdir() argument
2498 struct cifs_ses *ses = tcon->ses; in smb311_posix_mkdir()
2527 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in smb311_posix_mkdir()
2533 if (smb3_encryption_required(tcon)) in smb311_posix_mkdir()
2558 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in smb311_posix_mkdir()
2564 tcon->treeName, utf16_path); in smb311_posix_mkdir()
2597 if (tcon->posix_extensions) { in smb311_posix_mkdir()
2611 trace_smb3_posix_mkdir_enter(xid, tcon->tid, ses->Suid, CREATE_NOT_FILE, in smb311_posix_mkdir()
2617 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in smb311_posix_mkdir()
2618 trace_smb3_posix_mkdir_err(xid, tcon->tid, ses->Suid, in smb311_posix_mkdir()
2625 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, in smb311_posix_mkdir()
2629 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId); in smb311_posix_mkdir()
2644 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_open_init() argument
2658 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in SMB2_open_init()
2690 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in SMB2_open_init()
2696 tcon->treeName, path); in SMB2_open_init()
2721 if ((!server->oplocks) || (tcon->no_lease)) in SMB2_open_init()
2747 tcon->use_persistent); in SMB2_open_init()
2752 if (tcon->posix_extensions) { in SMB2_open_init()
2765 if (tcon->snapshot_time) { in SMB2_open_init()
2774 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time); in SMB2_open_init()
2845 struct cifs_tcon *tcon = oparms->tcon; in SMB2_open() local
2846 struct cifs_ses *ses = tcon->ses; in SMB2_open()
2858 if (smb3_encryption_required(tcon)) in SMB2_open()
2866 rc = SMB2_open_init(tcon, server, in SMB2_open()
2871 trace_smb3_open_enter(xid, tcon->tid, tcon->ses->Suid, in SMB2_open()
2880 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in SMB2_open()
2887 trace_smb3_open_err(xid, tcon->tid, ses->Suid, in SMB2_open()
2891 tcon->treeName); in SMB2_open()
2892 tcon->need_reconnect = true; in SMB2_open()
2896 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, in SMB2_open()
2900 atomic_inc(&tcon->num_remote_opens); in SMB2_open()
2927 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_ioctl_init() argument
2939 rc = smb2_ioctl_req_init(opcode, tcon, server, in SMB2_ioctl_init()
3032 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_ioctl() argument
3056 if (!tcon) in SMB2_ioctl()
3059 ses = tcon->ses; in SMB2_ioctl()
3067 if (smb3_encryption_required(tcon)) in SMB2_ioctl()
3075 rc = SMB2_ioctl_init(tcon, server, in SMB2_ioctl()
3087 trace_smb3_fsctl_err(xid, persistent_fid, tcon->tid, in SMB2_ioctl()
3091 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3096 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3101 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3148 SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_compression() argument
3158 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_compression()
3170 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_close_init() argument
3179 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server, in SMB2_close_init()
3204 __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in __SMB2_close() argument
3210 struct cifs_ses *ses = tcon->ses; in __SMB2_close()
3224 if (smb3_encryption_required(tcon)) in __SMB2_close()
3236 trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid); in __SMB2_close()
3237 rc = SMB2_close_init(tcon, server, in __SMB2_close()
3248 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE); in __SMB2_close()
3249 trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid, in __SMB2_close()
3253 trace_smb3_close_done(xid, persistent_fid, tcon->tid, in __SMB2_close()
3263 atomic_dec(&tcon->num_remote_opens); in __SMB2_close()
3272 tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid, in __SMB2_close()
3282 SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_close() argument
3285 return __SMB2_close(xid, tcon, persistent_fid, volatile_fid, NULL); in SMB2_close()
3344 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_query_info_init() argument
3360 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in SMB2_query_info_init()
3393 query_info(const unsigned int xid, struct cifs_tcon *tcon, in query_info() argument
3404 struct cifs_ses *ses = tcon->ses; in query_info()
3417 if (smb3_encryption_required(tcon)) in query_info()
3425 rc = SMB2_query_info_init(tcon, server, in query_info()
3432 trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid, in query_info()
3440 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in query_info()
3441 trace_smb3_query_info_err(xid, persistent_fid, tcon->tid, in query_info()
3446 trace_smb3_query_info_done(xid, persistent_fid, tcon->tid, in query_info()
3480 int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_info() argument
3483 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_info()
3491 SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_query_info() argument
3498 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB311_posix_query_info()
3504 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_acl() argument
3511 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_acl()
3517 SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_get_srv_num() argument
3520 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_get_srv_num()
3534 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_notify_init() argument
3543 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server, in SMB2_notify_init()
3566 SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_change_notify() argument
3570 struct cifs_ses *ses = tcon->ses; in SMB2_change_notify()
3583 if (smb3_encryption_required(tcon)) in SMB2_change_notify()
3591 rc = SMB2_notify_init(xid, &rqst, tcon, server, in SMB2_change_notify()
3597 trace_smb3_notify_enter(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3603 cifs_stats_fail_inc(tcon, SMB2_CHANGE_NOTIFY_HE); in SMB2_change_notify()
3604 trace_smb3_notify_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3607 trace_smb3_notify_done(xid, persistent_fid, tcon->tid, in SMB2_change_notify()
3648 struct cifs_tcon *tcon, *tcon2; in smb2_reconnect_server() local
3655 /* Prevent simultaneous reconnects that can corrupt tcon->rlist list */ in smb2_reconnect_server()
3663 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_reconnect_server()
3664 if (tcon->need_reconnect || tcon->need_reopen_files) { in smb2_reconnect_server()
3665 tcon->tc_count++; in smb2_reconnect_server()
3666 list_add_tail(&tcon->rlist, &tmp_list); in smb2_reconnect_server()
3689 list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) { in smb2_reconnect_server()
3690 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3692 cifs_reopen_persistent_handles(tcon); in smb2_reconnect_server()
3695 list_del_init(&tcon->rlist); in smb2_reconnect_server()
3696 if (tcon->ipc) in smb2_reconnect_server()
3697 cifs_put_smb_ses(tcon->ses); in smb2_reconnect_server()
3699 cifs_put_tcon(tcon); in smb2_reconnect_server()
3758 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_flush_init() argument
3766 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server, in SMB2_flush_init()
3781 SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_flush() argument
3784 struct cifs_ses *ses = tcon->ses; in SMB2_flush()
3797 if (smb3_encryption_required(tcon)) in SMB2_flush()
3805 rc = SMB2_flush_init(xid, &rqst, tcon, server, in SMB2_flush()
3810 trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid); in SMB2_flush()
3815 cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE); in SMB2_flush()
3816 trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_flush()
3819 trace_smb3_flush_done(xid, persistent_fid, tcon->tid, in SMB2_flush()
3842 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server, in smb2_new_read_req()
3864 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in smb2_new_read_req()
3931 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_readv_callback() local
3970 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
3980 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
4001 cifs_stats_fail_inc(tcon, SMB2_READ_HE); in smb2_readv_callback()
4004 tcon->tid, tcon->ses->Suid, rdata->offset, in smb2_readv_callback()
4009 tcon->tid, tcon->ses->Suid, in smb2_readv_callback()
4028 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv() local
4035 rdata->server = cifs_pick_channel(tcon->ses); in smb2_async_readv()
4037 io_parms.tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv()
4050 if (smb3_encryption_required(io_parms.tcon)) in smb2_async_readv()
4077 cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); in smb2_async_readv()
4079 io_parms.tcon->tid, in smb2_async_readv()
4080 io_parms.tcon->ses->Suid, in smb2_async_readv()
4101 struct cifs_ses *ses = io_parms->tcon->ses; in SMB2_read()
4104 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_read()
4111 if (smb3_encryption_required(io_parms->tcon)) in SMB2_read()
4127 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE); in SMB2_read()
4130 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4135 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4142 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4177 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_writev_callback() local
4236 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_writev_callback()
4239 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_writev_callback()
4243 tcon->treeName); in smb2_writev_callback()
4247 tcon->tid, tcon->ses->Suid, in smb2_writev_callback()
4263 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_async_writev() local
4270 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4272 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server, in smb2_async_writev()
4277 if (smb3_encryption_required(tcon)) in smb2_async_writev()
4294 tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes); in smb2_async_writev()
4382 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_async_writev()
4385 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_async_writev()
4419 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_write()
4424 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server, in SMB2_write()
4429 if (smb3_encryption_required(io_parms->tcon)) in SMB2_write()
4446 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in SMB2_write()
4457 rc = cifs_send_recv(xid, io_parms->tcon->ses, server, in SMB2_write()
4464 io_parms->tcon->tid, in SMB2_write()
4465 io_parms->tcon->ses->Suid, in SMB2_write()
4467 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE); in SMB2_write()
4472 io_parms->tcon->tid, in SMB2_write()
4473 io_parms->tcon->ses->Suid, in SMB2_write()
4632 struct cifs_tcon *tcon, in SMB2_query_directory_init() argument
4648 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server, in SMB2_query_directory_init()
4695 trace_smb3_query_dir_enter(xid, persistent_fid, tcon->tid, in SMB2_query_directory_init()
4696 tcon->ses->Suid, index, output_size); in SMB2_query_directory_init()
4709 smb2_parse_query_directory(struct cifs_tcon *tcon, in smb2_parse_query_directory() argument
4781 SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_directory() argument
4791 struct cifs_ses *ses = tcon->ses; in SMB2_query_directory()
4798 if (smb3_encryption_required(tcon)) in SMB2_query_directory()
4806 rc = SMB2_query_directory_init(xid, tcon, server, in SMB2_query_directory()
4821 tcon->tid, tcon->ses->Suid, index, 0); in SMB2_query_directory()
4825 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4826 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4827 cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); in SMB2_query_directory()
4832 rc = smb2_parse_query_directory(tcon, &rsp_iov, resp_buftype, in SMB2_query_directory()
4835 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4836 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
4841 trace_smb3_query_dir_done(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
4842 tcon->ses->Suid, index, srch_inf->entries_in_buffer); in SMB2_query_directory()
4851 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_set_info_init() argument
4862 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server, in SMB2_set_info_init()
4902 send_set_info(const unsigned int xid, struct cifs_tcon *tcon, in send_set_info() argument
4913 struct cifs_ses *ses = tcon->ses; in send_set_info()
4923 if (smb3_encryption_required(tcon)) in send_set_info()
4934 rc = SMB2_set_info_init(tcon, server, in send_set_info()
4951 cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE); in send_set_info()
4952 trace_smb3_set_info_err(xid, persistent_fid, tcon->tid, in send_set_info()
4962 SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_set_eof() argument
4974 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_eof()
4980 SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_acl() argument
4984 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_acl()
4990 SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_ea() argument
4994 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_ea()
5000 SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_oplock_break() argument
5007 struct cifs_ses *ses = tcon->ses; in SMB2_oplock_break()
5016 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_oplock_break()
5021 if (smb3_encryption_required(tcon)) in SMB2_oplock_break()
5043 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_oplock_break()
5082 build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, in build_qfs_info_req() argument
5093 if ((tcon->ses == NULL) || server == NULL) in build_qfs_info_req()
5096 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in build_qfs_info_req()
5122 SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_qfs_info() argument
5131 struct cifs_ses *ses = tcon->ses; in SMB311_posix_qfs_info()
5136 rc = build_qfs_info_req(&iov, tcon, server, in SMB311_posix_qfs_info()
5143 if (smb3_encryption_required(tcon)) in SMB311_posix_qfs_info()
5154 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB311_posix_qfs_info()
5173 SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_info() argument
5182 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_info()
5187 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_info()
5194 if (smb3_encryption_required(tcon)) in SMB2_QFS_info()
5205 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_info()
5224 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_attr() argument
5233 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_attr()
5255 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_attr()
5261 if (smb3_encryption_required(tcon)) in SMB2_QFS_attr()
5272 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_attr()
5284 memcpy(&tcon->fsAttrInfo, offset in SMB2_QFS_attr()
5288 memcpy(&tcon->fsDevInfo, offset in SMB2_QFS_attr()
5293 tcon->ss_flags = le32_to_cpu(ss_info->Flags); in SMB2_QFS_attr()
5294 tcon->perf_sector_size = in SMB2_QFS_attr()
5299 tcon->vol_serial_number = vol_info->VolumeSerialNumber; in SMB2_QFS_attr()
5300 tcon->vol_create_time = vol_info->VolumeCreationTime; in SMB2_QFS_attr()
5309 smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, in smb2_lockv() argument
5322 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_lockv()
5326 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server, in smb2_lockv()
5331 if (smb3_encryption_required(tcon)) in smb2_lockv()
5347 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in smb2_lockv()
5353 rc = cifs_send_recv(xid, tcon->ses, server, in smb2_lockv()
5359 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE); in smb2_lockv()
5360 trace_smb3_lock_err(xid, persist_fid, tcon->tid, in smb2_lockv()
5361 tcon->ses->Suid, rc); in smb2_lockv()
5368 SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lock() argument
5381 return smb2_lockv(xid, tcon, persist_fid, volatile_fid, pid, 1, &lock); in SMB2_lock()
5385 SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lease_break() argument
5391 struct cifs_ses *ses = tcon->ses; in SMB2_lease_break()
5399 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in SMB2_lease_break()
5402 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_lease_break()
5407 if (smb3_encryption_required(tcon)) in SMB2_lease_break()
5433 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_lease_break()
5434 trace_smb3_lease_err(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()
5438 trace_smb3_lease_done(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()