Home
last modified time | relevance | path

Searched refs:ses (Results 1 – 25 of 56) sorted by relevance

123

/linux/fs/smb/client/
H A Dsess.c27 cifs_ses_add_channel(struct cifs_ses *ses,
30 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) in is_ses_using_iface() argument
34 spin_lock(&ses->chan_lock); in is_ses_using_iface()
35 for (i = 0; i < ses->chan_count; i++) { in is_ses_using_iface()
36 if (ses->chans[i].iface == iface) { in is_ses_using_iface()
37 spin_unlock(&ses->chan_lock); in is_ses_using_iface()
41 spin_unlock(&ses->chan_lock); in is_ses_using_iface()
48 cifs_ses_get_chan_index(struct cifs_ses *ses, in cifs_ses_get_chan_index() argument
57 for (i = 0; i < ses->chan_count; i++) { in cifs_ses_get_chan_index()
58 if (ses->chans[i].server == server) in cifs_ses_get_chan_index()
[all …]
H A Dsmb2transport.c81 struct cifs_ses *ses = NULL; in smb3_get_sign_key() local
91 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in smb3_get_sign_key()
92 if (ses->Suid == ses_id) in smb3_get_sign_key()
102 spin_lock(&ses->ses_lock); in smb3_get_sign_key()
103 spin_lock(&ses->chan_lock); in smb3_get_sign_key()
105 is_binding = (cifs_chan_needs_reconnect(ses, server) && in smb3_get_sign_key()
106 ses->ses_status == SES_GOOD); in smb3_get_sign_key()
113 memcpy(key, ses->smb3signingkey, SMB3_SIGN_KEY_SIZE); in smb3_get_sign_key()
114 spin_unlock(&ses->chan_lock); in smb3_get_sign_key()
115 spin_unlock(&ses->ses_lock); in smb3_get_sign_key()
[all …]
H A Dcifsencrypt.c273 build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp) in build_avpair_blob() argument
281 if (!ses->domainName) { in build_avpair_blob()
282 ses->domainName = kstrdup(defdmname, GFP_KERNEL); in build_avpair_blob()
283 if (!ses->domainName) in build_avpair_blob()
287 dlen = strlen(ses->domainName); in build_avpair_blob()
295 kfree_sensitive(ses->auth_key.response); in build_avpair_blob()
296 ses->auth_key.len = size + 2 * dlen; in build_avpair_blob()
297 ses->auth_key.response = kzalloc(ses->auth_key.len, GFP_KERNEL); in build_avpair_blob()
298 if (!ses->auth_key.response) { in build_avpair_blob()
299 ses->auth_key.len = 0; in build_avpair_blob()
[all …]
H A Dconnect.c107 struct TCP_Server_Info *server = tcon->ses->server; in smb2_query_server_interfaces()
149 struct cifs_ses *ses; in cifs_signal_cifsd_for_reconnect() local
163 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in cifs_signal_cifsd_for_reconnect()
164 spin_lock(&ses->ses_lock); in cifs_signal_cifsd_for_reconnect()
165 if (ses->ses_status == SES_EXITING) { in cifs_signal_cifsd_for_reconnect()
166 spin_unlock(&ses->ses_lock); in cifs_signal_cifsd_for_reconnect()
169 spin_lock(&ses->chan_lock); in cifs_signal_cifsd_for_reconnect()
170 for (i = 1; i < ses->chan_count; i++) { in cifs_signal_cifsd_for_reconnect()
171 nserver = ses->chans[i].server; in cifs_signal_cifsd_for_reconnect()
177 spin_unlock(&ses->chan_lock); in cifs_signal_cifsd_for_reconnect()
[all …]
H A Dcifs_debug.c113 (tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in cifs_debug_tcon()
120 if (tcon->ses->server->ops->dump_share_caps) in cifs_debug_tcon()
121 tcon->ses->server->ops->dump_share_caps(m, tcon); in cifs_debug_tcon()
239 struct cifs_ses *ses; in cifs_debug_files_proc_show() local
253 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in cifs_debug_files_proc_show()
254 if (cifs_ses_exiting(ses)) in cifs_debug_files_proc_show()
256 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in cifs_debug_files_proc_show()
262 ses->Suid, in cifs_debug_files_proc_show()
288 struct cifs_ses *ses; in cifs_debug_dirs_proc_show() local
303 ses = list_entry(tmp, struct cifs_ses, smb_ses_list); in cifs_debug_dirs_proc_show()
[all …]
H A Dsmb2pdu.c80 if (!tcon || !tcon->ses) in smb3_encryption_required()
82 if ((tcon->ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA) || in smb3_encryption_required()
86 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
89 (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION)) in smb3_encryption_required()
145 if (tcon->ses) in smb2_hdr_assemble()
146 shdr->SessionId = cpu_to_le64(tcon->ses->Suid); in smb2_hdr_assemble()
169 cifs_chan_skip_or_disable(struct cifs_ses *ses, in cifs_chan_skip_or_disable() argument
179 ses->server->hostname); in cifs_chan_skip_or_disable()
181 spin_lock(&ses->chan_lock); in cifs_chan_skip_or_disable()
182 chan_index = cifs_ses_get_chan_index(ses, server); in cifs_chan_skip_or_disable()
[all …]
H A Dcifstransport.c89 static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, in allocate_mid() argument
92 spin_lock(&ses->ses_lock); in allocate_mid()
93 if (ses->ses_status == SES_NEW) { in allocate_mid()
96 spin_unlock(&ses->ses_lock); in allocate_mid()
102 if (ses->ses_status == SES_EXITING) { in allocate_mid()
105 spin_unlock(&ses->ses_lock); in allocate_mid()
110 spin_unlock(&ses->ses_lock); in allocate_mid()
112 *ppmidQ = alloc_mid(in_buf, ses->server); in allocate_mid()
115 spin_lock(&ses->server->mid_queue_lock); in allocate_mid()
116 list_add_tail(&(*ppmidQ)->qhead, &ses->server->pending_mid_q); in allocate_mid()
[all …]
H A Dioctl.c57 if (tcon->ses->server->ops->ioctl_query_info) in cifs_ioctl_query_info()
58 rc = tcon->ses->server->ops->ioctl_query_info( in cifs_ioctl_query_info()
123 tcon_inf.session_id = tcon->ses->Suid; in smb_mnt_get_tcon_info()
142 fsinf->protocol_id = tcon->ses->server->vals->protocol_id; in smb_mnt_get_fsinfo()
240 struct cifs_ses *ses; in cifs_dump_full_key() local
258 ses = tcon->ses; in cifs_dump_full_key()
270 ses = ses_it; in cifs_dump_full_key()
276 cifs_smb_ses_inc_refcount(ses); in cifs_dump_full_key()
292 switch (ses->server->cipher_type) { in cifs_dump_full_key()
315 out.session_id = ses->Suid; in cifs_dump_full_key()
[all …]
H A Ddfs.h23 struct cifs_ses *ses; member
43 #define ref_walk_ses(w) (ref_walk_cur(w)->ses)
68 if (ref->ses) in __ref_walk_free()
69 cifs_put_smb_ses(ref->ses); in __ref_walk_free()
138 if (WARN_ON_ONCE(!ref->ses)) in ref_walk_set_tcon()
140 list_add(&ref->ses->dlist, &tcon->dfs_ses_list); in ref_walk_set_tcon()
141 ref->ses = NULL; in ref_walk_set_tcon()
169 struct cifs_ses *rses = ctx->dfs_root_ses ?: mnt_ctx->ses; in dfs_get_referral()
183 struct cifs_ses *ses, *n; in dfs_put_root_smb_sessions() local
185 list_for_each_entry_safe(ses, n, head, dlist) { in dfs_put_root_smb_sessions()
[all …]
H A Dcifs_swn.c50 if (tcon->ses->user_name != NULL) { in cifs_swn_auth_info_ntlm()
51 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_USER_NAME, tcon->ses->user_name); in cifs_swn_auth_info_ntlm()
56 if (tcon->ses->password != NULL) { in cifs_swn_auth_info_ntlm()
57 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_PASSWORD, tcon->ses->password); in cifs_swn_auth_info_ntlm()
62 if (tcon->ses->domainName != NULL) { in cifs_swn_auth_info_ntlm()
63 ret = nla_put_string(skb, CIFS_GENL_ATTR_SWN_DOMAIN_NAME, tcon->ses->domainName); in cifs_swn_auth_info_ntlm()
114 if (swnreg->tcon->ses->server->use_swn_dstaddr) in cifs_swn_send_register_message()
115 addr = &swnreg->tcon->ses->server->swn_dstaddr; in cifs_swn_send_register_message()
117 addr = &swnreg->tcon->ses->server->dstaddr; in cifs_swn_send_register_message()
141 authtype = cifs_select_sectype(swnreg->tcon->ses->server, swnreg->tcon->ses->sectype); in cifs_swn_send_register_message()
[all …]
H A Ddfs_cache.c644 static int get_dfs_referral(const unsigned int xid, struct cifs_ses *ses, const char *path, in get_dfs_referral() argument
653 if (!ses || !ses->server || !ses->server->ops->get_dfs_refer) in get_dfs_referral()
658 cifs_dbg(FYI, "%s: ipc=%s referral=%s\n", __func__, ses->tcon_ipc->tree_name, path); in get_dfs_referral()
659 rc = ses->server->ops->get_dfs_refer(xid, ses, path, refs, numrefs, cache_cp, in get_dfs_referral()
682 struct cifs_ses *ses, in cache_refresh_path() argument
717 rc = get_dfs_referral(xid, ses, path, &refs, &numrefs); in cache_refresh_path()
854 int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, const struct nls_table *cp, in dfs_cache_find() argument
866 ce = cache_refresh_path(xid, ses, npath, false); in dfs_cache_find()
1098 struct TCP_Server_Info *server = tcon->ses->server; in target_share_equal()
1123 static bool is_ses_good(struct cifs_ses *ses) in is_ses_good() argument
[all …]
H A Dcifsproto.h103 extern struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses);
104 extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses,
108 extern int compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
117 extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
194 struct cifs_ses *ses,
198 extern int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
340 struct cifs_ses *ses,
342 extern int cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
347 struct cifs_ses *ses,
350 extern int CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
[all …]
H A Dcifsfs.c204 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) in cifs_read_super()
216 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) && in cifs_read_super()
217 ((tcon->ses->capabilities & in cifs_read_super()
218 tcon->ses->server->vals->cap_nt_find) == 0) && in cifs_read_super()
247 tcon->ses->server->ops->negotiate_rsize(tcon, cifs_sb->ctx); in cifs_read_super()
313 struct TCP_Server_Info *server = tcon->ses->server; in cifs_statfs()
354 struct TCP_Server_Info *server = tcon->ses->server; in cifs_fallocate()
478 cifs_show_security(struct seq_file *s, struct cifs_ses *ses) in cifs_show_security() argument
480 if (ses->sectype == Unspecified) { in cifs_show_security()
481 if (ses->user_name == NULL) in cifs_show_security()
[all …]
H A Ddfs.c78 struct cifs_ses *ses = mnt_ctx->ses; in set_root_smb_session() local
80 if (ses) { in set_root_smb_session()
82 cifs_smb_ses_inc_refcount(ses); in set_root_smb_session()
85 ctx->dfs_root_ses = ses; in set_root_smb_session()
222 else if (WARN_ON(!mnt_ctx->ses)) in __dfs_mount_share()
342 const struct smb_version_operations *ops = tcon->ses->server->ops; in tree_connect_dfs_target()
343 struct TCP_Server_Info *server = tcon->ses->server; in tree_connect_dfs_target()
373 rc = ops->tree_connect(xid, tcon->ses, tree, in tree_connect_dfs_target()
374 tcon, tcon->ses->local_nls); in tree_connect_dfs_target()
389 struct TCP_Server_Info *server = tcon->ses->server; in cifs_tree_connect()
[all …]
H A Dcifssmb.c74 struct cifs_ses *ses; in cifs_reconnect_tcon() local
85 ses = tcon->ses; in cifs_reconnect_tcon()
86 server = ses->server; in cifs_reconnect_tcon()
108 spin_lock(&ses->chan_lock); in cifs_reconnect_tcon()
109 if (!cifs_chan_needs_reconnect(ses, server) && !tcon->need_reconnect) { in cifs_reconnect_tcon()
110 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
113 spin_unlock(&ses->chan_lock); in cifs_reconnect_tcon()
115 mutex_lock(&ses->session_mutex); in cifs_reconnect_tcon()
124 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
128 mutex_unlock(&ses->session_mutex); in cifs_reconnect_tcon()
[all …]
H A Dtransport.c808 struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses) in cifs_pick_channel() argument
815 if (!ses) in cifs_pick_channel()
818 spin_lock(&ses->chan_lock); in cifs_pick_channel()
819 start = atomic_inc_return(&ses->chan_seq); in cifs_pick_channel()
820 for (i = 0; i < ses->chan_count; i++) { in cifs_pick_channel()
821 cur = (start + i) % ses->chan_count; in cifs_pick_channel()
822 server = ses->chans[cur].server; in cifs_pick_channel()
826 if (CIFS_CHAN_NEEDS_RECONNECT(ses, i)) in cifs_pick_channel()
847 index = (uint)start % ses->chan_count; in cifs_pick_channel()
849 server = ses->chans[index].server; in cifs_pick_channel()
[all …]
H A Dsmb2inode.c184 struct cifs_ses *ses = tcon->ses; in smb2_compound_op() local
207 server = cifs_pick_channel(ses); in smb2_compound_op()
311 ses->Suid, full_path); in smb2_compound_op()
347 ses->Suid, full_path); in smb2_compound_op()
350 trace_smb3_delete_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
357 trace_smb3_mkdir_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
375 trace_smb3_rmdir_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
410 trace_smb3_set_eof_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
442 ses->Suid, full_path); in smb2_compound_op()
481 trace_smb3_rename_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
[all …]
H A Dxattr.c61 if (pTcon->ses->server->ops->set_file_info) in cifs_attrib_set()
62 rc = pTcon->ses->server->ops->set_file_info(inode, full_path, in cifs_attrib_set()
85 if (pTcon->ses->server->ops->set_file_info) in cifs_creation_time_set()
86 rc = pTcon->ses->server->ops->set_file_info(inode, full_path, in cifs_creation_time_set()
156 if (pTcon->ses->server->ops->set_EA) { in cifs_xattr_set()
157 rc = pTcon->ses->server->ops->set_EA(xid, pTcon, in cifs_xattr_set()
179 if (pTcon->ses->server->ops->set_acl) { in cifs_xattr_set()
207 rc = pTcon->ses->server->ops->set_acl(pacl, in cifs_xattr_set()
317 if (pTcon->ses->server->ops->query_all_EAs) in cifs_xattr_get()
318 rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, in cifs_xattr_get()
[all …]
H A Dcifsglob.h112 #define CIFS_DFS_ROOT_SES(ses) ((ses)->dfs_root_ses ?: (ses)) argument
369 struct cifs_ses *ses,
537 int (*generate_signingkey)(struct cifs_ses *ses,
1159 #define CIFS_ALL_CHANNELS_SET(ses) \ argument
1160 ((1UL << (ses)->chan_count) - 1)
1161 #define CIFS_ALL_CHANS_GOOD(ses) \ argument
1162 (!(ses)->chans_need_reconnect)
1163 #define CIFS_ALL_CHANS_NEED_RECONNECT(ses) \ argument
1164 ((ses)->chans_need_reconnect == CIFS_ALL_CHANNELS_SET(ses))
1165 #define CIFS_SET_ALL_CHANS_NEED_RECONNECT(ses) \ argument
[all …]
H A Dmisc.c292 if (treeCon->ses) { in header_assemble()
293 if (treeCon->ses->capabilities & CAP_UNICODE) in header_assemble()
295 if (treeCon->ses->capabilities & CAP_STATUS32) in header_assemble()
299 buffer->Uid = treeCon->ses->Suid; in header_assemble()
300 if (treeCon->ses->server) in header_assemble()
301 buffer->Mid = get_next_mid(treeCon->ses->server); in header_assemble()
307 if ((treeCon->ses) && (treeCon->ses->server)) in header_assemble()
308 if (treeCon->ses->server->sign) in header_assemble()
442 struct cifs_ses *ses; in is_valid_oplock_break() local
511 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in is_valid_oplock_break()
[all …]
H A Dsmb1ops.c428 struct cifs_ses *ses, in cifs_negotiate() argument
432 rc = CIFSSMBNegotiate(xid, ses, server); in cifs_negotiate()
440 struct TCP_Server_Info *server = tcon->ses->server; in smb1_negotiate_wsize()
475 struct TCP_Server_Info *server = tcon->ses->server; in smb1_negotiate_rsize()
567 if (tcon->ses->capabilities & CAP_NT_SMBS) in cifs_query_path_info()
575 if (rc && !(tcon->ses->capabilities & CAP_UNICODE) && strpbrk(full_path, "*?\"><")) in cifs_query_path_info()
584 if (!(tcon->ses->capabilities & tcon->ses->server->vals->cap_nt_find)) in cifs_query_path_info()
592 if (!(tcon->ses->capabilities & tcon->ses->server->vals->cap_nt_find)) { in cifs_query_path_info()
594 int offset = tcon->ses->server->timeAdj; in cifs_query_path_info()
711 if (tcon && !(tcon->ses->capabilities & CAP_INFOLEVEL_PASSTHRU)) in cifs_get_srv_inum()
[all …]
H A Dnamespace.c203 struct cifs_ses *ses; in cifs_do_automount() local
209 ses = cifs_sb_master_tcon(mntpt_sb)->ses; in cifs_do_automount()
218 mutex_lock(&ses->session_mutex); in cifs_do_automount()
219 rc = smb3_sync_session_ctx_passwords(mntpt_sb, ses); in cifs_do_automount()
220 mutex_unlock(&ses->session_mutex); in cifs_do_automount()
H A Dntlmssp.h145 int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, struct cifs_ses *ses);
147 struct cifs_ses *ses,
151 struct cifs_ses *ses,
155 struct cifs_ses *ses,
/linux/fs/nfsd/
H A Dnfs4callback.c407 static u32 highest_slotid(struct nfsd4_session *ses) in highest_slotid() argument
411 spin_lock(&ses->se_lock); in highest_slotid()
412 idx = fls(~ses->se_cb_slot_avail); in highest_slotid()
415 idx = max(idx, ses->se_cb_highest_slot); in highest_slotid()
416 spin_unlock(&ses->se_lock); in highest_slotid()
483 static void update_cb_slot_table(struct nfsd4_session *ses, u32 target) in update_cb_slot_table() argument
486 if (likely(target == READ_ONCE(ses->se_cb_highest_slot))) in update_cb_slot_table()
489 spin_lock(&ses->se_lock); in update_cb_slot_table()
490 if (target > ses->se_cb_highest_slot) { in update_cb_slot_table()
501 for (i = ses->se_cb_highest_slot + 1; i <= target; ++i) in update_cb_slot_table()
[all …]
/linux/drivers/scsi/
H A Dscsi_error.c1059 void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, in scsi_eh_prep_cmnd() argument
1071 ses->cmd_len = scmd->cmd_len; in scsi_eh_prep_cmnd()
1072 ses->data_direction = scmd->sc_data_direction; in scsi_eh_prep_cmnd()
1073 ses->sdb = scmd->sdb; in scsi_eh_prep_cmnd()
1074 ses->result = scmd->result; in scsi_eh_prep_cmnd()
1075 ses->resid_len = scmd->resid_len; in scsi_eh_prep_cmnd()
1076 ses->underflow = scmd->underflow; in scsi_eh_prep_cmnd()
1077 ses->prot_op = scmd->prot_op; in scsi_eh_prep_cmnd()
1078 ses->eh_eflags = scmd->eh_eflags; in scsi_eh_prep_cmnd()
1082 memcpy(ses->cmnd, scmd->cmnd, sizeof(ses->cmnd)); in scsi_eh_prep_cmnd()
[all …]

123