Lines Matching refs:tcon
73 int smb3_encryption_required(const struct cifs_tcon *tcon) in smb3_encryption_required() argument
75 if (!tcon || !tcon->ses) in smb3_encryption_required()
77 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required()
78 (tcon->share_flags & SHI1005_FLAGS_ENCRYPT_DATA)) in smb3_encryption_required()
80 if (tcon->seal && in smb3_encryption_required()
81 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
88 const struct cifs_tcon *tcon, in smb2_hdr_assemble() argument
109 if (!tcon) in smb2_hdr_assemble()
118 shdr->Id.SyncId.TreeId = cpu_to_le32(tcon->tid); in smb2_hdr_assemble()
120 if (tcon->ses) in smb2_hdr_assemble()
121 shdr->SessionId = cpu_to_le64(tcon->ses->Suid); in smb2_hdr_assemble()
136 if (server && server->sign && !smb3_encryption_required(tcon)) in smb2_hdr_assemble()
143 smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_reconnect() argument
156 if (tcon == NULL) in smb2_reconnect()
166 spin_lock(&tcon->tc_lock); in smb2_reconnect()
167 if (tcon->status == TID_EXITING) { in smb2_reconnect()
176 spin_unlock(&tcon->tc_lock); in smb2_reconnect()
182 spin_unlock(&tcon->tc_lock); in smb2_reconnect()
183 if ((!tcon->ses) || (tcon->ses->ses_status == SES_EXITING) || in smb2_reconnect()
184 (!tcon->ses->server) || !server) in smb2_reconnect()
187 ses = tcon->ses; in smb2_reconnect()
236 if (!tcon->retry) { in smb2_reconnect()
244 if (!cifs_chan_needs_reconnect(ses, server) && !tcon->need_reconnect) { in smb2_reconnect()
250 tcon->ses->chans_need_reconnect, in smb2_reconnect()
251 tcon->need_reconnect); in smb2_reconnect()
277 if (tcon->need_reconnect) in smb2_reconnect()
288 if ((rc == -EACCES) && !tcon->retry) { in smb2_reconnect()
304 if (!tcon->need_reconnect) { in smb2_reconnect()
308 cifs_mark_open_files_invalid(tcon); in smb2_reconnect()
309 if (tcon->use_persistent) in smb2_reconnect()
310 tcon->need_reopen_files = true; in smb2_reconnect()
312 rc = cifs_tree_connect(0, tcon, nls_codepage); in smb2_reconnect()
353 fill_small_buf(__le16 smb2_command, struct cifs_tcon *tcon, in fill_small_buf() argument
368 smb2_hdr_assemble(&spdu->hdr, smb2_command, tcon, server); in fill_small_buf()
379 static int __smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in __smb2_plain_req_init() argument
393 fill_small_buf(smb2_command, tcon, server, in __smb2_plain_req_init()
397 if (tcon != NULL) { in __smb2_plain_req_init()
399 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_sent[com_code]); in __smb2_plain_req_init()
400 cifs_stats_inc(&tcon->num_smbs_sent); in __smb2_plain_req_init()
406 static int smb2_plain_req_init(__le16 smb2_command, struct cifs_tcon *tcon, in smb2_plain_req_init() argument
412 rc = smb2_reconnect(smb2_command, tcon, server); in smb2_plain_req_init()
416 return __smb2_plain_req_init(smb2_command, tcon, server, request_buf, in smb2_plain_req_init()
420 static int smb2_ioctl_req_init(u32 opcode, struct cifs_tcon *tcon, in smb2_ioctl_req_init() argument
426 return __smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
429 return smb2_plain_req_init(SMB2_IOCTL, tcon, server, in smb2_ioctl_req_init()
1093 int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) in smb3_validate_negotiate() argument
1100 struct TCP_Server_Info *server = tcon->ses->server; in smb3_validate_negotiate()
1115 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_GUEST) in smb3_validate_negotiate()
1118 if (tcon->ses->user_name == NULL) { in smb3_validate_negotiate()
1123 if (tcon->ses->session_flags & SMB2_SESSION_FLAG_IS_NULL) in smb3_validate_negotiate()
1132 if (tcon->ses->chan_max > 1) in smb3_validate_negotiate()
1138 if (tcon->ses->sign) in smb3_validate_negotiate()
1176 rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, in smb3_validate_negotiate()
1817 static inline void cifs_stats_fail_inc(struct cifs_tcon *tcon, uint16_t code) in cifs_stats_fail_inc() argument
1819 cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_failed[code]); in cifs_stats_fail_inc()
1825 static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon) in init_copy_chunk_defaults() argument
1827 tcon->max_chunks = 256; in init_copy_chunk_defaults()
1828 tcon->max_bytes_chunk = 1048576; in init_copy_chunk_defaults()
1829 tcon->max_bytes_copy = 16777216; in init_copy_chunk_defaults()
1834 struct cifs_tcon *tcon, const struct nls_table *cp) in SMB2_tcon() argument
1869 tcon->tid = 0; in SMB2_tcon()
1870 atomic_set(&tcon->num_remote_opens, 0); in SMB2_tcon()
1871 rc = smb2_plain_req_init(SMB2_TREE_CONNECT, tcon, server, in SMB2_tcon()
1878 if (smb3_encryption_required(tcon)) in SMB2_tcon()
1898 !smb3_encryption_required(tcon) && in SMB2_tcon()
1915 trace_smb3_tcon(xid, tcon->tid, ses->Suid, tree, rc); in SMB2_tcon()
1917 cifs_stats_fail_inc(tcon, SMB2_TREE_CONNECT_HE); in SMB2_tcon()
1918 tcon->need_reconnect = true; in SMB2_tcon()
1927 tcon->pipe = true; in SMB2_tcon()
1931 tcon->print = true; in SMB2_tcon()
1940 tcon->share_flags = le32_to_cpu(rsp->ShareFlags); in SMB2_tcon()
1941 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */ in SMB2_tcon()
1942 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess); in SMB2_tcon()
1943 tcon->tid = le32_to_cpu(rsp->hdr.Id.SyncId.TreeId); in SMB2_tcon()
1944 strscpy(tcon->tree_name, tree, sizeof(tcon->tree_name)); in SMB2_tcon()
1947 ((tcon->share_flags & SHI1005_FLAGS_DFS) == 0)) in SMB2_tcon()
1950 if (tcon->seal && in SMB2_tcon()
1954 init_copy_chunk_defaults(tcon); in SMB2_tcon()
1956 rc = server->ops->validate_negotiate(xid, tcon); in SMB2_tcon()
1970 SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon) in SMB2_tdis() argument
1975 struct cifs_ses *ses = tcon->ses; in SMB2_tdis()
1987 trace_smb3_tdis_enter(xid, tcon->tid, ses->Suid, tcon->tree_name); in SMB2_tdis()
1989 if ((tcon->need_reconnect) || in SMB2_tdis()
1990 (CIFS_ALL_CHANS_NEED_RECONNECT(tcon->ses))) { in SMB2_tdis()
1996 invalidate_all_cached_dirs(tcon); in SMB2_tdis()
1998 rc = smb2_plain_req_init(SMB2_TREE_DISCONNECT, tcon, ses->server, in SMB2_tdis()
2004 if (smb3_encryption_required(tcon)) in SMB2_tdis()
2020 cifs_stats_fail_inc(tcon, SMB2_TREE_DISCONNECT_HE); in SMB2_tdis()
2021 trace_smb3_tdis_err(xid, tcon->tid, ses->Suid, rc); in SMB2_tdis()
2023 trace_smb3_tdis_done(xid, tcon->tid, ses->Suid); in SMB2_tdis()
2228 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout); in create_durable_v2_buf()
2620 umode_t mode, struct cifs_tcon *tcon, in smb311_posix_mkdir() argument
2627 struct cifs_ses *ses = tcon->ses; in smb311_posix_mkdir()
2656 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in smb311_posix_mkdir()
2662 if (smb3_encryption_required(tcon)) in smb311_posix_mkdir()
2687 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in smb311_posix_mkdir()
2693 tcon->tree_name, utf16_path); in smb311_posix_mkdir()
2726 if (tcon->posix_extensions) { in smb311_posix_mkdir()
2740 trace_smb3_posix_mkdir_enter(xid, tcon->tid, ses->Suid, CREATE_NOT_FILE, in smb311_posix_mkdir()
2746 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in smb311_posix_mkdir()
2747 trace_smb3_posix_mkdir_err(xid, tcon->tid, ses->Suid, in smb311_posix_mkdir()
2765 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid, in smb311_posix_mkdir()
2768 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId); in smb311_posix_mkdir()
2783 SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_open_init() argument
2797 rc = smb2_plain_req_init(SMB2_CREATE, tcon, server, in SMB2_open_init()
2829 if (tcon->share_flags & SHI1005_FLAGS_DFS) { in SMB2_open_init()
2835 tcon->tree_name, path); in SMB2_open_init()
2858 if ((!server->oplocks) || (tcon->no_lease)) in SMB2_open_init()
2884 tcon->use_persistent); in SMB2_open_init()
2889 if (tcon->posix_extensions) { in SMB2_open_init()
2902 if (tcon->snapshot_time) { in SMB2_open_init()
2911 rc = add_twarp_context(iov, &n_iov, tcon->snapshot_time); in SMB2_open_init()
2982 struct cifs_tcon *tcon = oparms->tcon; in SMB2_open() local
2983 struct cifs_ses *ses = tcon->ses; in SMB2_open()
2995 if (smb3_encryption_required(tcon)) in SMB2_open()
3003 rc = SMB2_open_init(tcon, server, in SMB2_open()
3008 trace_smb3_open_enter(xid, tcon->tid, tcon->ses->Suid, in SMB2_open()
3017 cifs_stats_fail_inc(tcon, SMB2_CREATE_HE); in SMB2_open()
3024 trace_smb3_open_err(xid, tcon->tid, ses->Suid, in SMB2_open()
3028 tcon->tree_name); in SMB2_open()
3029 tcon->need_reconnect = true; in SMB2_open()
3035 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid, in SMB2_open()
3038 atomic_inc(&tcon->num_remote_opens); in SMB2_open()
3068 SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_ioctl_init() argument
3080 rc = smb2_ioctl_req_init(opcode, tcon, server, in SMB2_ioctl_init()
3173 SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_ioctl() argument
3197 if (!tcon) in SMB2_ioctl()
3200 ses = tcon->ses; in SMB2_ioctl()
3208 if (smb3_encryption_required(tcon)) in SMB2_ioctl()
3216 rc = SMB2_ioctl_init(tcon, server, in SMB2_ioctl()
3228 trace_smb3_fsctl_err(xid, persistent_fid, tcon->tid, in SMB2_ioctl()
3232 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3237 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3242 cifs_stats_fail_inc(tcon, SMB2_IOCTL_HE); in SMB2_ioctl()
3299 SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_compression() argument
3309 rc = SMB2_ioctl(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_compression()
3321 SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_close_init() argument
3330 rc = smb2_plain_req_init(SMB2_CLOSE, tcon, server, in SMB2_close_init()
3355 __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in __SMB2_close() argument
3361 struct cifs_ses *ses = tcon->ses; in __SMB2_close()
3375 if (smb3_encryption_required(tcon)) in __SMB2_close()
3387 trace_smb3_close_enter(xid, persistent_fid, tcon->tid, ses->Suid); in __SMB2_close()
3388 rc = SMB2_close_init(tcon, server, in __SMB2_close()
3399 cifs_stats_fail_inc(tcon, SMB2_CLOSE_HE); in __SMB2_close()
3400 trace_smb3_close_err(xid, persistent_fid, tcon->tid, ses->Suid, in __SMB2_close()
3404 trace_smb3_close_done(xid, persistent_fid, tcon->tid, in __SMB2_close()
3414 atomic_dec(&tcon->num_remote_opens); in __SMB2_close()
3423 tmp_rc = smb2_handle_cancelled_close(tcon, persistent_fid, in __SMB2_close()
3433 SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_close() argument
3436 return __SMB2_close(xid, tcon, persistent_fid, volatile_fid, NULL); in SMB2_close()
3495 SMB2_query_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_query_info_init() argument
3506 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in SMB2_query_info_init()
3539 query_info(const unsigned int xid, struct cifs_tcon *tcon, in query_info() argument
3550 struct cifs_ses *ses = tcon->ses; in query_info()
3563 if (smb3_encryption_required(tcon)) in query_info()
3571 rc = SMB2_query_info_init(tcon, server, in query_info()
3578 trace_smb3_query_info_enter(xid, persistent_fid, tcon->tid, in query_info()
3586 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in query_info()
3587 trace_smb3_query_info_err(xid, persistent_fid, tcon->tid, in query_info()
3592 trace_smb3_query_info_done(xid, persistent_fid, tcon->tid, in query_info()
3626 int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_info() argument
3629 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_info()
3639 SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
3646 return query_info(xid, tcon, persistent_fid, volatile_fid,
3654 SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_acl() argument
3662 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_query_acl()
3668 SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_get_srv_num() argument
3671 return query_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_get_srv_num()
3685 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_notify_init() argument
3694 rc = smb2_plain_req_init(SMB2_CHANGE_NOTIFY, tcon, server, in SMB2_notify_init()
3717 SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_change_notify() argument
3722 struct cifs_ses *ses = tcon->ses; in SMB2_change_notify()
3736 if (smb3_encryption_required(tcon)) in SMB2_change_notify()
3747 rc = SMB2_notify_init(xid, &rqst, tcon, server, in SMB2_change_notify()
3753 trace_smb3_notify_enter(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3759 cifs_stats_fail_inc(tcon, SMB2_CHANGE_NOTIFY_HE); in SMB2_change_notify()
3760 trace_smb3_notify_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_change_notify()
3763 trace_smb3_notify_done(xid, persistent_fid, tcon->tid, in SMB2_change_notify()
3824 struct cifs_tcon *tcon, *tcon2; in smb2_reconnect_server() local
3846 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_reconnect_server()
3847 if (tcon->need_reconnect || tcon->need_reopen_files) { in smb2_reconnect_server()
3848 tcon->tc_count++; in smb2_reconnect_server()
3849 list_add_tail(&tcon->rlist, &tmp_list); in smb2_reconnect_server()
3884 list_for_each_entry_safe(tcon, tcon2, &tmp_list, rlist) { in smb2_reconnect_server()
3885 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3887 cifs_reopen_persistent_handles(tcon); in smb2_reconnect_server()
3890 list_del_init(&tcon->rlist); in smb2_reconnect_server()
3891 if (tcon->ipc) in smb2_reconnect_server()
3892 cifs_put_smb_ses(tcon->ses); in smb2_reconnect_server()
3894 cifs_put_tcon(tcon); in smb2_reconnect_server()
3901 tcon = kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL); in smb2_reconnect_server()
3902 if (!tcon) { in smb2_reconnect_server()
3911 tcon->status = TID_GOOD; in smb2_reconnect_server()
3912 tcon->retry = false; in smb2_reconnect_server()
3913 tcon->need_reconnect = false; in smb2_reconnect_server()
3917 tcon->ses = ses; in smb2_reconnect_server()
3918 rc = smb2_reconnect(SMB2_INTERNAL_CMD, tcon, server); in smb2_reconnect_server()
3924 kfree(tcon); in smb2_reconnect_server()
3987 struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_flush_init() argument
3995 rc = smb2_plain_req_init(SMB2_FLUSH, tcon, server, in SMB2_flush_init()
4010 SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_flush() argument
4013 struct cifs_ses *ses = tcon->ses; in SMB2_flush()
4026 if (smb3_encryption_required(tcon)) in SMB2_flush()
4034 rc = SMB2_flush_init(xid, &rqst, tcon, server, in SMB2_flush()
4039 trace_smb3_flush_enter(xid, persistent_fid, tcon->tid, ses->Suid); in SMB2_flush()
4044 cifs_stats_fail_inc(tcon, SMB2_FLUSH_HE); in SMB2_flush()
4045 trace_smb3_flush_err(xid, persistent_fid, tcon->tid, ses->Suid, in SMB2_flush()
4048 trace_smb3_flush_done(xid, persistent_fid, tcon->tid, in SMB2_flush()
4071 rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, server, in smb2_new_read_req()
4093 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in smb2_new_read_req()
4160 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_readv_callback() local
4199 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
4209 cifs_stats_bytes_read(tcon, rdata->got_bytes); in smb2_readv_callback()
4230 cifs_stats_fail_inc(tcon, SMB2_READ_HE); in smb2_readv_callback()
4233 tcon->tid, tcon->ses->Suid, rdata->offset, in smb2_readv_callback()
4238 tcon->tid, tcon->ses->Suid, in smb2_readv_callback()
4257 struct cifs_tcon *tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv() local
4264 rdata->server = cifs_pick_channel(tcon->ses); in smb2_async_readv()
4266 io_parms.tcon = tlink_tcon(rdata->cfile->tlink); in smb2_async_readv()
4279 if (smb3_encryption_required(io_parms.tcon)) in smb2_async_readv()
4306 cifs_stats_fail_inc(io_parms.tcon, SMB2_READ_HE); in smb2_async_readv()
4308 io_parms.tcon->tid, in smb2_async_readv()
4309 io_parms.tcon->ses->Suid, in smb2_async_readv()
4330 struct cifs_ses *ses = io_parms->tcon->ses; in SMB2_read()
4333 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_read()
4340 if (smb3_encryption_required(io_parms->tcon)) in SMB2_read()
4356 cifs_stats_fail_inc(io_parms->tcon, SMB2_READ_HE); in SMB2_read()
4360 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4364 trace_smb3_read_done(xid, req->PersistentFileId, io_parms->tcon->tid, in SMB2_read()
4372 io_parms->tcon->tid, ses->Suid, in SMB2_read()
4407 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_writev_callback() local
4466 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_writev_callback()
4469 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_writev_callback()
4473 tcon->tree_name); in smb2_writev_callback()
4477 tcon->tid, tcon->ses->Suid, in smb2_writev_callback()
4493 struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink); in smb2_async_writev() local
4500 server = wdata->server = cifs_pick_channel(tcon->ses); in smb2_async_writev()
4502 rc = smb2_plain_req_init(SMB2_WRITE, tcon, server, in smb2_async_writev()
4507 if (smb3_encryption_required(tcon)) in smb2_async_writev()
4524 tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes); in smb2_async_writev()
4613 tcon->tid, tcon->ses->Suid, wdata->offset, in smb2_async_writev()
4616 cifs_stats_fail_inc(tcon, SMB2_WRITE_HE); in smb2_async_writev()
4650 io_parms->server = cifs_pick_channel(io_parms->tcon->ses); in SMB2_write()
4655 rc = smb2_plain_req_init(SMB2_WRITE, io_parms->tcon, server, in SMB2_write()
4660 if (smb3_encryption_required(io_parms->tcon)) in SMB2_write()
4677 io_parms->tcon->tid, io_parms->tcon->ses->Suid, in SMB2_write()
4688 rc = cifs_send_recv(xid, io_parms->tcon->ses, server, in SMB2_write()
4696 io_parms->tcon->tid, in SMB2_write()
4697 io_parms->tcon->ses->Suid, in SMB2_write()
4699 cifs_stats_fail_inc(io_parms->tcon, SMB2_WRITE_HE); in SMB2_write()
4705 io_parms->tcon->tid, in SMB2_write()
4706 io_parms->tcon->ses->Suid, in SMB2_write()
4863 struct cifs_tcon *tcon, in SMB2_query_directory_init() argument
4879 rc = smb2_plain_req_init(SMB2_QUERY_DIRECTORY, tcon, server, in SMB2_query_directory_init()
4926 trace_smb3_query_dir_enter(xid, persistent_fid, tcon->tid, in SMB2_query_directory_init()
4927 tcon->ses->Suid, index, output_size); in SMB2_query_directory_init()
4940 smb2_parse_query_directory(struct cifs_tcon *tcon, in smb2_parse_query_directory() argument
5012 SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_query_directory() argument
5022 struct cifs_ses *ses = tcon->ses; in SMB2_query_directory()
5029 if (smb3_encryption_required(tcon)) in SMB2_query_directory()
5037 rc = SMB2_query_directory_init(xid, tcon, server, in SMB2_query_directory()
5052 tcon->tid, tcon->ses->Suid, index, 0); in SMB2_query_directory()
5056 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
5057 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
5058 cifs_stats_fail_inc(tcon, SMB2_QUERY_DIRECTORY_HE); in SMB2_query_directory()
5063 rc = smb2_parse_query_directory(tcon, &rsp_iov, resp_buftype, in SMB2_query_directory()
5066 trace_smb3_query_dir_err(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
5067 tcon->ses->Suid, index, 0, rc); in SMB2_query_directory()
5072 trace_smb3_query_dir_done(xid, persistent_fid, tcon->tid, in SMB2_query_directory()
5073 tcon->ses->Suid, index, srch_inf->entries_in_buffer); in SMB2_query_directory()
5082 SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, in SMB2_set_info_init() argument
5093 rc = smb2_plain_req_init(SMB2_SET_INFO, tcon, server, in SMB2_set_info_init()
5133 send_set_info(const unsigned int xid, struct cifs_tcon *tcon, in send_set_info() argument
5144 struct cifs_ses *ses = tcon->ses; in send_set_info()
5154 if (smb3_encryption_required(tcon)) in send_set_info()
5165 rc = SMB2_set_info_init(tcon, server, in send_set_info()
5182 cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE); in send_set_info()
5183 trace_smb3_set_info_err(xid, persistent_fid, tcon->tid, in send_set_info()
5193 SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, in SMB2_set_eof() argument
5205 trace_smb3_set_eof(xid, persistent_fid, tcon->tid, tcon->ses->Suid, le64_to_cpu(*eof)); in SMB2_set_eof()
5207 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_eof()
5213 SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_acl() argument
5217 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_acl()
5223 SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_set_ea() argument
5227 return send_set_info(xid, tcon, persistent_fid, volatile_fid, in SMB2_set_ea()
5233 SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_oplock_break() argument
5240 struct cifs_ses *ses = tcon->ses; in SMB2_oplock_break()
5249 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_oplock_break()
5254 if (smb3_encryption_required(tcon)) in SMB2_oplock_break()
5276 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_oplock_break()
5315 build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, in build_qfs_info_req() argument
5326 if ((tcon->ses == NULL) || server == NULL) in build_qfs_info_req()
5329 rc = smb2_plain_req_init(SMB2_QUERY_INFO, tcon, server, in build_qfs_info_req()
5350 SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB311_posix_qfs_info() argument
5359 struct cifs_ses *ses = tcon->ses; in SMB311_posix_qfs_info()
5364 rc = build_qfs_info_req(&iov, tcon, server, in SMB311_posix_qfs_info()
5371 if (smb3_encryption_required(tcon)) in SMB311_posix_qfs_info()
5382 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB311_posix_qfs_info()
5401 SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_info() argument
5410 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_info()
5415 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_info()
5422 if (smb3_encryption_required(tcon)) in SMB2_QFS_info()
5433 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_info()
5452 SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_QFS_attr() argument
5461 struct cifs_ses *ses = tcon->ses; in SMB2_QFS_attr()
5483 rc = build_qfs_info_req(&iov, tcon, server, in SMB2_QFS_attr()
5489 if (smb3_encryption_required(tcon)) in SMB2_QFS_attr()
5500 cifs_stats_fail_inc(tcon, SMB2_QUERY_INFO_HE); in SMB2_QFS_attr()
5512 memcpy(&tcon->fsAttrInfo, offset in SMB2_QFS_attr()
5516 memcpy(&tcon->fsDevInfo, offset in SMB2_QFS_attr()
5521 tcon->ss_flags = le32_to_cpu(ss_info->Flags); in SMB2_QFS_attr()
5522 tcon->perf_sector_size = in SMB2_QFS_attr()
5527 tcon->vol_serial_number = vol_info->VolumeSerialNumber; in SMB2_QFS_attr()
5528 tcon->vol_create_time = vol_info->VolumeCreationTime; in SMB2_QFS_attr()
5537 smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, in smb2_lockv() argument
5550 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in smb2_lockv()
5554 rc = smb2_plain_req_init(SMB2_LOCK, tcon, server, in smb2_lockv()
5559 if (smb3_encryption_required(tcon)) in smb2_lockv()
5575 cifs_stats_inc(&tcon->stats.cifs_stats.num_locks); in smb2_lockv()
5581 rc = cifs_send_recv(xid, tcon->ses, server, in smb2_lockv()
5587 cifs_stats_fail_inc(tcon, SMB2_LOCK_HE); in smb2_lockv()
5588 trace_smb3_lock_err(xid, persist_fid, tcon->tid, in smb2_lockv()
5589 tcon->ses->Suid, rc); in smb2_lockv()
5596 SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lock() argument
5609 return smb2_lockv(xid, tcon, persist_fid, volatile_fid, pid, 1, &lock); in SMB2_lock()
5613 SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, in SMB2_lease_break() argument
5619 struct cifs_ses *ses = tcon->ses; in SMB2_lease_break()
5627 struct TCP_Server_Info *server = cifs_pick_channel(tcon->ses); in SMB2_lease_break()
5630 rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, server, in SMB2_lease_break()
5635 if (smb3_encryption_required(tcon)) in SMB2_lease_break()
5661 cifs_stats_fail_inc(tcon, SMB2_OPLOCK_BREAK_HE); in SMB2_lease_break()
5662 trace_smb3_lease_err(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()
5666 trace_smb3_lease_done(le32_to_cpu(lease_state), tcon->tid, in SMB2_lease_break()