Home
last modified time | relevance | path

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

12

/linux/fs/smb/client/
H A Dsess.c26 cifs_ses_add_channel(struct cifs_ses *ses,
29 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) in is_ses_using_iface() argument
33 spin_lock(&ses->chan_lock); in is_ses_using_iface()
34 for (i = 0; i < ses->chan_count; i++) { in is_ses_using_iface()
35 if (ses->chans[i].iface == iface) { in is_ses_using_iface()
36 spin_unlock(&ses->chan_lock); in is_ses_using_iface()
40 spin_unlock(&ses->chan_lock); in is_ses_using_iface()
47 cifs_ses_get_chan_index(struct cifs_ses *ses, in cifs_ses_get_chan_index() argument
56 for (i = 0; i < ses->chan_count; i++) { in cifs_ses_get_chan_index()
57 if (ses->chans[i].server == server) in cifs_ses_get_chan_index()
[all …]
H A Dcifsencrypt.c124 build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp) in build_avpair_blob() argument
132 if (!ses->domainName) { in build_avpair_blob()
133 ses->domainName = kstrdup(defdmname, GFP_KERNEL); in build_avpair_blob()
134 if (!ses->domainName) in build_avpair_blob()
138 dlen = strlen(ses->domainName); in build_avpair_blob()
146 kfree_sensitive(ses->auth_key.response); in build_avpair_blob()
147 ses->auth_key.len = size + 2 * dlen; in build_avpair_blob()
148 ses->auth_key.response = kzalloc(ses->auth_key.len, GFP_KERNEL); in build_avpair_blob()
149 if (!ses->auth_key.response) { in build_avpair_blob()
150 ses->auth_key.len = 0; in build_avpair_blob()
[all …]
H A Dsmb1session.c21 struct cifs_ses *ses; member
39 static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, in cifs_ssetup_hdr() argument
68 if (ses->capabilities & CAP_UNICODE) { in cifs_ssetup_hdr()
72 if (ses->capabilities & CAP_STATUS32) { in cifs_ssetup_hdr()
76 if (ses->capabilities & CAP_DFS) { in cifs_ssetup_hdr()
80 if (ses->capabilities & CAP_UNIX) in cifs_ssetup_hdr()
125 static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, in unicode_domain_string() argument
132 if (ses->domainName == NULL) { in unicode_domain_string()
141 bytes_ret = cifs_strtoUTF16((__le16 *) bcc_ptr, ses->domainName, in unicode_domain_string()
149 static void ascii_domain_string(char **pbcc_area, struct cifs_ses *ses, in ascii_domain_string() argument
[all …]
H A Dsmb2transport.c43 struct cifs_ses *ses = NULL; in smb3_get_sign_key() local
53 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in smb3_get_sign_key()
54 if (ses->Suid == ses_id) in smb3_get_sign_key()
64 spin_lock(&ses->ses_lock); in smb3_get_sign_key()
65 spin_lock(&ses->chan_lock); in smb3_get_sign_key()
67 is_binding = (cifs_chan_needs_reconnect(ses, server) && in smb3_get_sign_key()
68 ses->ses_status == SES_GOOD); in smb3_get_sign_key()
75 memcpy(key, ses->smb3signingkey, SMB3_SIGN_KEY_SIZE); in smb3_get_sign_key()
76 spin_unlock(&ses->chan_lock); in smb3_get_sign_key()
77 spin_unlock(&ses->ses_lock); in smb3_get_sign_key()
[all …]
H A Dconnect.c66 static struct mchan_mount *mchan_mount_alloc(struct cifs_ses *ses);
110 struct TCP_Server_Info *server = tcon->ses->server; in smb2_query_server_interfaces()
152 struct cifs_ses *ses; in cifs_signal_cifsd_for_reconnect() local
166 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in cifs_signal_cifsd_for_reconnect()
167 spin_lock(&ses->ses_lock); in cifs_signal_cifsd_for_reconnect()
168 if (ses->ses_status == SES_EXITING) { in cifs_signal_cifsd_for_reconnect()
169 spin_unlock(&ses->ses_lock); in cifs_signal_cifsd_for_reconnect()
172 spin_lock(&ses->chan_lock); in cifs_signal_cifsd_for_reconnect()
173 for (i = 1; i < ses->chan_count; i++) { in cifs_signal_cifsd_for_reconnect()
174 nserver = ses->chans[i].server; in cifs_signal_cifsd_for_reconnect()
[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 Dioctl.c56 if (tcon->ses->server->ops->ioctl_query_info) in cifs_ioctl_query_info()
57 rc = tcon->ses->server->ops->ioctl_query_info( in cifs_ioctl_query_info()
122 tcon_inf.session_id = tcon->ses->Suid; in smb_mnt_get_tcon_info()
141 fsinf->protocol_id = tcon->ses->server->vals->protocol_id; in smb_mnt_get_fsinfo()
239 struct cifs_ses *ses; in cifs_dump_full_key() local
257 ses = tcon->ses; in cifs_dump_full_key()
269 ses = ses_it; in cifs_dump_full_key()
275 cifs_smb_ses_inc_refcount(ses); in cifs_dump_full_key()
291 switch (ses->server->cipher_type) { in cifs_dump_full_key()
314 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()
170 struct cifs_ses *rses = ctx->dfs_root_ses ?: mnt_ctx->ses; in dfs_get_referral()
184 struct cifs_ses *ses, *n; in dfs_put_root_smb_sessions() local
186 list_for_each_entry_safe(ses, n, head, dlist) { in dfs_put_root_smb_sessions()
[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_tcon *tcon, struct cifs_ses *ses) in is_ses_good() argument
[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()
112 if (swnreg->tcon->ses->server->use_swn_dstaddr) in cifs_swn_send_register_message()
113 addr = &swnreg->tcon->ses->server->swn_dstaddr; in cifs_swn_send_register_message()
115 addr = &swnreg->tcon->ses->server->dstaddr; in cifs_swn_send_register_message()
139 authtype = cifs_select_sectype(swnreg->tcon->ses->server, swnreg->tcon->ses->sectype); in cifs_swn_send_register_message()
[all …]
H A Dcifsfs.c134 struct cifs_ses *ses; in cifs_drop_all_dir_caches() local
139 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in cifs_drop_all_dir_caches()
140 if (cifs_ses_exiting(ses)) in cifs_drop_all_dir_caches()
142 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) in cifs_drop_all_dir_caches()
244 if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) in cifs_read_super()
256 if ((tcon->ses->server->vals->protocol_id == SMB10_PROT_ID) && in cifs_read_super()
257 ((tcon->ses->capabilities & in cifs_read_super()
258 tcon->ses->server->vals->cap_nt_find) == 0) && in cifs_read_super()
287 tcon->ses->server->ops->negotiate_rsize(tcon, cifs_sb->ctx); in cifs_read_super()
353 struct TCP_Server_Info *server = tcon->ses->server; in cifs_statfs()
[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 Dsmb1ops.c139 send_nt_cancel(struct cifs_ses *ses, struct TCP_Server_Info *server, in send_nt_cancel() argument
186 send_lock_cancel(struct cifs_ses *ses, struct TCP_Server_Info *server, in send_lock_cancel() argument
202 pSMB->hdr.Mid = get_next_mid(ses->server); in send_lock_cancel()
204 rc = SendReceive(xid, ses, in_buf, in_len, NULL, NULL, 0); in send_lock_cancel()
212 static int cifs_send_cancel(struct cifs_ses *ses, struct TCP_Server_Info *server, in cifs_send_cancel() argument
217 return send_lock_cancel(ses, server, rqst, mid, xid); in cifs_send_cancel()
218 return send_nt_cancel(ses, server, rqst, mid, xid); in cifs_send_cancel()
410 struct cifs_ses *ses, in cifs_negotiate() argument
414 rc = CIFSSMBNegotiate(xid, ses, server); in cifs_negotiate()
422 struct TCP_Server_Info *server = tcon->ses->server; in smb1_negotiate_wsize()
[all …]
H A Dsmb2inode.c187 struct cifs_ses *ses = tcon->ses; in smb2_compound_op() local
210 server = cifs_pick_channel(ses); in smb2_compound_op()
314 ses->Suid, full_path); in smb2_compound_op()
350 ses->Suid, full_path); in smb2_compound_op()
357 trace_smb3_mkdir_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
392 trace_smb3_unlink_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
427 trace_smb3_set_eof_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
459 ses->Suid, full_path); in smb2_compound_op()
498 trace_smb3_rename_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
525 trace_smb3_hardlink_enter(xid, tcon->tid, ses->Suid, full_path); in smb2_compound_op()
[all …]
H A Dsmb2misc.c159 struct cifs_ses *ses = NULL; in smb2_check_message() local
166 ses = iter; in smb2_check_message()
171 if (!ses) { in smb2_check_message()
615 struct cifs_ses *ses; in smb2_is_valid_lease_break() local
635 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in smb2_is_valid_lease_break()
636 if (cifs_ses_exiting(ses)) in smb2_is_valid_lease_break()
638 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_is_valid_lease_break()
689 struct cifs_ses *ses; in smb2_is_valid_oplock_break() local
714 list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) { in smb2_is_valid_oplock_break()
715 if (cifs_ses_exiting(ses)) in smb2_is_valid_oplock_break()
[all …]
H A Dfs_context.c760 static void smb3_sync_ses_chan_max(struct cifs_ses *ses, unsigned int max_channels);
1032 int smb3_sync_session_ctx_passwords(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses) in smb3_sync_session_ctx_passwords() argument
1034 if (ses->password && in smb3_sync_session_ctx_passwords()
1036 strcmp(ses->password, cifs_sb->ctx->password)) { in smb3_sync_session_ctx_passwords()
1038 cifs_sb->ctx->password = kstrdup(ses->password, GFP_KERNEL); in smb3_sync_session_ctx_passwords()
1042 if (ses->password2 && in smb3_sync_session_ctx_passwords()
1044 strcmp(ses->password2, cifs_sb->ctx->password2)) { in smb3_sync_session_ctx_passwords()
1046 cifs_sb->ctx->password2 = kstrdup(ses->password2, GFP_KERNEL); in smb3_sync_session_ctx_passwords()
1065 static void smb3_sync_ses_chan_max(struct cifs_ses *ses, unsigned int max_channels) in smb3_sync_ses_chan_max() argument
1067 spin_lock(&ses->chan_lock); in smb3_sync_ses_chan_max()
[all …]
H A Dsmb2ops.c458 struct cifs_ses *ses, in smb2_negotiate() argument
466 rc = SMB2_negotiate(xid, ses, server); in smb2_negotiate()
484 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_wsize()
499 struct TCP_Server_Info *server = tcon->ses->server; in smb3_negotiate_wsize()
534 struct TCP_Server_Info *server = tcon->ses->server; in smb2_negotiate_rsize()
550 struct TCP_Server_Info *server = tcon->ses->server; in smb3_negotiate_rsize()
622 size_t buf_len, struct cifs_ses *ses, bool in_mount) in parse_server_interfaces() argument
639 spin_lock(&ses->iface_lock); in parse_server_interfaces()
644 list_for_each_entry_safe(iface, niface, &ses->iface_list, in parse_server_interfaces()
648 spin_unlock(&ses->iface_lock); in parse_server_interfaces()
[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 Dmisc.c858 if ((t1->ses == t2->ses || in tcon_super_cb()
859 t1->ses->dfs_root_ses == t2->ses->dfs_root_ses) && in tcon_super_cb()
860 t1->ses->server == t2->ses->server && in tcon_super_cb()
974 struct TCP_Server_Info *server = tcon->ses->server; in cifs_inval_name_dfs_link_error()
975 struct cifs_ses *ses = tcon->ses; in cifs_inval_name_dfs_link_error() local
1025 ses = CIFS_DFS_ROOT_SES(ses); in cifs_inval_name_dfs_link_error()
1026 if (ses->server->ops->get_dfs_refer && in cifs_inval_name_dfs_link_error()
1027 !ses->server->ops->get_dfs_refer(xid, ses, ref_path, &refs, in cifs_inval_name_dfs_link_error()
H A Dfile.c64 server = cifs_pick_channel(tlink_tcon(open_file->tlink)->ses); in cifs_prepare_write()
169 server = cifs_pick_channel(tlink_tcon(req->cfile->tlink)->ses); in cifs_prepare_read()
549 struct TCP_Server_Info *server = tcon->ses->server; in cifs_nt_open()
674 struct TCP_Server_Info *server = tcon->ses->server; in cifs_new_fileinfo()
808 struct TCP_Server_Info *server = tcon->ses->server; in serverclose_work()
868 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
921 struct TCP_Server_Info *server = tcon->ses->server; in _cifsFileInfo_put()
967 return tcon->ses->server->ops->flush(xid, tcon, in cifs_file_flush()
973 rc = tcon->ses->server->ops->flush(xid, tcon, &cfile->fid); in cifs_file_flush()
1000 server = tcon->ses->server; in cifs_do_truncate()
[all …]
H A Dinode.c67 if (cifs_sb_master_tcon(cifs_sb)->ses->server->max_read < in cifs_set_ops()
450 server = tcon->ses->server; in cifs_get_unix_fattr()
569 if (tcon->ses->server->oplocks) in cifs_sfu_type()
573 rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL); in cifs_sfu_type()
587 rc = tcon->ses->server->ops->sync_read(xid, &fid, &io_parms, in cifs_sfu_type()
650 rc = tcon->ses->server->ops->sync_read(xid, &fid, &io_parms, in cifs_sfu_type()
696 tcon->ses->server->ops->close(xid, tcon, &fid); in cifs_sfu_type()
723 if (tcon->ses->server->ops->query_all_EAs == NULL) { in cifs_sfu_mode()
728 rc = tcon->ses->server->ops->query_all_EAs(xid, tcon, path, in cifs_sfu_mode()
855 fattr->cf_ctime.tv_sec += tcon->ses->server->timeAdj; in smb311_posix_info_to_fattr()
[all …]
/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.c1071 void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses, in scsi_eh_prep_cmnd() argument
1086 ses->cmd_len = scmd->cmd_len; in scsi_eh_prep_cmnd()
1087 ses->data_direction = scmd->sc_data_direction; in scsi_eh_prep_cmnd()
1088 ses->sdb = scmd->sdb; in scsi_eh_prep_cmnd()
1089 ses->result = scmd->result; in scsi_eh_prep_cmnd()
1090 ses->resid_len = scmd->resid_len; in scsi_eh_prep_cmnd()
1091 ses->underflow = scmd->underflow; in scsi_eh_prep_cmnd()
1092 ses->prot_op = scmd->prot_op; in scsi_eh_prep_cmnd()
1093 ses->eh_eflags = scmd->eh_eflags; in scsi_eh_prep_cmnd()
1097 memcpy(ses->cmnd, scmd->cmnd, sizeof(ses->cmnd)); in scsi_eh_prep_cmnd()
[all …]
/linux/fs/nfs/
H A Dnfs4session.c534 int nfs4_setup_session_slot_tables(struct nfs4_session *ses) in nfs4_setup_session_slot_tables() argument
541 tbl = &ses->fc_slot_table; in nfs4_setup_session_slot_tables()
542 tbl->session = ses; in nfs4_setup_session_slot_tables()
543 status = nfs4_realloc_slot_table(tbl, ses->fc_attrs.max_reqs, 1); in nfs4_setup_session_slot_tables()
544 if (status || !(ses->flags & SESSION4_BACK_CHAN)) /* -ENOMEM */ in nfs4_setup_session_slot_tables()
547 tbl = &ses->bc_slot_table; in nfs4_setup_session_slot_tables()
548 tbl->session = ses; in nfs4_setup_session_slot_tables()
549 status = nfs4_realloc_slot_table(tbl, ses->bc_attrs.max_reqs, 0); in nfs4_setup_session_slot_tables()
553 nfs4_release_session_slot_tables(ses); in nfs4_setup_session_slot_tables()
/linux/include/scsi/
H A Dscsi_eh.h53 struct scsi_eh_save *ses, unsigned char *cmnd,
57 struct scsi_eh_save *ses);

12