Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 214) sorted by relevance

123456789

/fs/cifs/
Dfs_context.c194 cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_context *ctx) in cifs_parse_security_flavors() argument
203 ctx->sectype = Unspecified; in cifs_parse_security_flavors()
204 ctx->sign = false; in cifs_parse_security_flavors()
211 ctx->sign = true; in cifs_parse_security_flavors()
214 ctx->sectype = Kerberos; in cifs_parse_security_flavors()
217 ctx->sign = true; in cifs_parse_security_flavors()
220 ctx->sectype = RawNTLMSSP; in cifs_parse_security_flavors()
223 ctx->sign = true; in cifs_parse_security_flavors()
226 ctx->sectype = NTLMv2; in cifs_parse_security_flavors()
229 ctx->nullauth = 1; in cifs_parse_security_flavors()
[all …]
Dconnect.c1254 match_security(struct TCP_Server_Info *server, struct smb3_fs_context *ctx) in match_security() argument
1261 if (server->ops->select_sectype(server, ctx->sectype) in match_security()
1270 if (ctx->sign && !server->sign) in match_security()
1276 static int match_server(struct TCP_Server_Info *server, struct smb3_fs_context *ctx) in match_server() argument
1278 struct sockaddr *addr = (struct sockaddr *)&ctx->dstaddr; in match_server()
1280 if (ctx->nosharesock) in match_server()
1288 if (strcmp(ctx->vals->version_string, SMB3ANY_VERSION_STRING) == 0) { in match_server()
1291 } else if (strcmp(ctx->vals->version_string, in match_server()
1295 } else if ((server->vals != ctx->vals) || (server->ops != ctx->ops)) in match_server()
1301 if (strcasecmp(server->hostname, ctx->server_hostname)) in match_server()
[all …]
/fs/
Dtimerfd.c54 static inline bool isalarm(struct timerfd_ctx *ctx) in isalarm() argument
56 return ctx->clockid == CLOCK_REALTIME_ALARM || in isalarm()
57 ctx->clockid == CLOCK_BOOTTIME_ALARM; in isalarm()
65 static void timerfd_triggered(struct timerfd_ctx *ctx) in timerfd_triggered() argument
69 spin_lock_irqsave(&ctx->wqh.lock, flags); in timerfd_triggered()
70 ctx->expired = 1; in timerfd_triggered()
71 ctx->ticks++; in timerfd_triggered()
72 wake_up_locked_poll(&ctx->wqh, EPOLLIN); in timerfd_triggered()
73 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in timerfd_triggered()
78 struct timerfd_ctx *ctx = container_of(htmr, struct timerfd_ctx, in timerfd_tmrproc() local
[all …]
Deventfd.c46 __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask) in eventfd_signal_mask() argument
61 spin_lock_irqsave(&ctx->wqh.lock, flags); in eventfd_signal_mask()
63 if (ULLONG_MAX - ctx->count < n) in eventfd_signal_mask()
64 n = ULLONG_MAX - ctx->count; in eventfd_signal_mask()
65 ctx->count += n; in eventfd_signal_mask()
66 if (waitqueue_active(&ctx->wqh)) in eventfd_signal_mask()
67 wake_up_locked_poll(&ctx->wqh, EPOLLIN | mask); in eventfd_signal_mask()
69 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in eventfd_signal_mask()
88 __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n) in eventfd_signal() argument
90 return eventfd_signal_mask(ctx, n, 0); in eventfd_signal()
[all …]
Duserfaultfd.c84 struct userfaultfd_ctx *ctx; member
93 struct userfaultfd_ctx *ctx; member
105 static bool userfaultfd_is_initialized(struct userfaultfd_ctx *ctx) in userfaultfd_is_initialized() argument
107 return ctx->features & UFFD_FEATURE_INITIALIZED; in userfaultfd_is_initialized()
155 static void userfaultfd_ctx_get(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_get() argument
157 refcount_inc(&ctx->refcount); in userfaultfd_ctx_get()
162 struct userfaultfd_ctx *ctx = container_of(head, struct userfaultfd_ctx, in __free_userfaultfd_ctx() local
164 kmem_cache_free(userfaultfd_ctx_cachep, ctx); in __free_userfaultfd_ctx()
175 static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_put() argument
177 if (refcount_dec_and_test(&ctx->refcount)) { in userfaultfd_ctx_put()
[all …]
Daio.c235 static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) in aio_private_file() argument
243 inode->i_mapping->private_data = ctx; in aio_private_file()
282 static void put_aio_ring_file(struct kioctx *ctx) in put_aio_ring_file() argument
284 struct file *aio_ring_file = ctx->aio_ring_file; in put_aio_ring_file()
294 ctx->aio_ring_file = NULL; in put_aio_ring_file()
301 static void aio_free_ring(struct kioctx *ctx) in aio_free_ring() argument
308 put_aio_ring_file(ctx); in aio_free_ring()
310 for (i = 0; i < ctx->nr_pages; i++) { in aio_free_ring()
313 page_count(ctx->ring_pages[i])); in aio_free_ring()
314 page = ctx->ring_pages[i]; in aio_free_ring()
[all …]
Dlocks.c251 struct file_lock_context *ctx; in locks_get_lock_context() local
254 ctx = smp_load_acquire(&inode->i_flctx); in locks_get_lock_context()
255 if (likely(ctx) || type == F_UNLCK) in locks_get_lock_context()
258 ctx = kmem_cache_alloc(flctx_cache, GFP_KERNEL); in locks_get_lock_context()
259 if (!ctx) in locks_get_lock_context()
262 spin_lock_init(&ctx->flc_lock); in locks_get_lock_context()
263 INIT_LIST_HEAD(&ctx->flc_flock); in locks_get_lock_context()
264 INIT_LIST_HEAD(&ctx->flc_posix); in locks_get_lock_context()
265 INIT_LIST_HEAD(&ctx->flc_lease); in locks_get_lock_context()
271 if (cmpxchg(&inode->i_flctx, NULL, ctx)) { in locks_get_lock_context()
[all …]
Dreaddir.c40 int iterate_dir(struct file *file, struct dir_context *ctx) in iterate_dir() argument
63 ctx->pos = file->f_pos; in iterate_dir()
65 res = file->f_op->iterate_shared(file, ctx); in iterate_dir()
67 res = file->f_op->iterate(file, ctx); in iterate_dir()
68 file->f_pos = ctx->pos; in iterate_dir()
138 struct dir_context ctx; member
143 static int fillonedir(struct dir_context *ctx, const char *name, int namlen, in fillonedir() argument
147 container_of(ctx, struct readdir_callback, ctx); in fillonedir()
186 .ctx.actor = fillonedir, in SYSCALL_DEFINE3()
193 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
[all …]
Dfs_context.c487 struct legacy_fs_context *ctx = fc->fs_private; in legacy_fs_context_free() local
489 if (ctx) { in legacy_fs_context_free()
490 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) in legacy_fs_context_free()
491 kfree(ctx->legacy_data); in legacy_fs_context_free()
492 kfree(ctx); in legacy_fs_context_free()
501 struct legacy_fs_context *ctx; in legacy_fs_context_dup() local
504 ctx = kmemdup(src_ctx, sizeof(*src_ctx), GFP_KERNEL); in legacy_fs_context_dup()
505 if (!ctx) in legacy_fs_context_dup()
508 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) { in legacy_fs_context_dup()
509 ctx->legacy_data = kmemdup(src_ctx->legacy_data, in legacy_fs_context_dup()
[all …]
/fs/nfs/
Dfs_context.c289 static bool nfs_server_transport_udp_invalid(const struct nfs_fs_context *ctx) in nfs_server_transport_udp_invalid() argument
294 static bool nfs_server_transport_udp_invalid(const struct nfs_fs_context *ctx) in nfs_server_transport_udp_invalid() argument
296 if (ctx->version == 4) in nfs_server_transport_udp_invalid()
306 struct nfs_fs_context *ctx) in nfs_validate_transport_protocol() argument
308 switch (ctx->nfs_server.protocol) { in nfs_validate_transport_protocol()
310 if (nfs_server_transport_udp_invalid(ctx)) in nfs_validate_transport_protocol()
317 ctx->nfs_server.protocol = XPRT_TRANSPORT_TCP; in nfs_validate_transport_protocol()
328 static void nfs_set_mount_transport_protocol(struct nfs_fs_context *ctx) in nfs_set_mount_transport_protocol() argument
330 if (ctx->mount_server.protocol == XPRT_TRANSPORT_UDP || in nfs_set_mount_transport_protocol()
331 ctx->mount_server.protocol == XPRT_TRANSPORT_TCP) in nfs_set_mount_transport_protocol()
[all …]
Dsuper.c769 static int nfs_verify_authflavors(struct nfs_fs_context *ctx, in nfs_verify_authflavors() argument
792 if (nfs_auth_info_match(&ctx->auth_info, flavor)) in nfs_verify_authflavors()
800 flavor = ctx->auth_info.flavors[0]; in nfs_verify_authflavors()
809 ctx->selected_flavor = flavor; in nfs_verify_authflavors()
810 dfprintk(MOUNT, "NFS: using auth flavor %u\n", ctx->selected_flavor); in nfs_verify_authflavors()
823 struct nfs_fs_context *ctx = nfs_fc2context(fc); in nfs_request_mount() local
826 &ctx->mount_server.address, in nfs_request_mount()
827 .dirpath = ctx->nfs_server.export_path, in nfs_request_mount()
828 .protocol = ctx->mount_server.protocol, in nfs_request_mount()
830 .noresvport = ctx->flags & NFS_MOUNT_NORESVPORT, in nfs_request_mount()
[all …]
Dnamespace.c147 struct nfs_fs_context *ctx; in nfs_d_automount() local
165 ctx = nfs_fc2context(fc); in nfs_d_automount()
166 ctx->clone_data.dentry = path->dentry; in nfs_d_automount()
167 ctx->clone_data.sb = path->dentry->d_sb; in nfs_d_automount()
168 ctx->clone_data.fattr = nfs_alloc_fattr(); in nfs_d_automount()
169 if (!ctx->clone_data.fattr) in nfs_d_automount()
178 memcpy(&ctx->nfs_server.address, &client->cl_addr, client->cl_addrlen); in nfs_d_automount()
179 ctx->nfs_server.addrlen = client->cl_addrlen; in nfs_d_automount()
180 ctx->nfs_server.port = server->port; in nfs_d_automount()
182 ctx->version = client->rpc_ops->version; in nfs_d_automount()
[all …]
Dnfs4namespace.c131 struct nfs_fs_context *ctx) in nfs4_validate_fspath() argument
160 __func__, path, ctx->nfs_server.export_path); in nfs4_validate_fspath()
290 struct nfs_fs_context *ctx = nfs_fc2context(fc); in try_location() local
306 kfree(ctx->nfs_server.hostname); in try_location()
307 ctx->nfs_server.hostname = kmalloc(len + 1, GFP_KERNEL); in try_location()
308 if (!ctx->nfs_server.hostname) in try_location()
312 &ctx->nfs_server.export_path_len); in try_location()
316 kfree(ctx->nfs_server.export_path); in try_location()
317 ctx->nfs_server.export_path = export_path; in try_location()
319 source = kmalloc(len + 1 + ctx->nfs_server.export_path_len + 1, in try_location()
[all …]
/fs/xfs/
Dxfs_log_cil.c59 struct xfs_cil_ctx *ctx; in xlog_cil_ctx_alloc() local
61 ctx = kmem_zalloc(sizeof(*ctx), KM_NOFS); in xlog_cil_ctx_alloc()
62 INIT_LIST_HEAD(&ctx->committing); in xlog_cil_ctx_alloc()
63 INIT_LIST_HEAD(&ctx->busy_extents); in xlog_cil_ctx_alloc()
64 INIT_WORK(&ctx->push_work, xlog_cil_push_work); in xlog_cil_ctx_alloc()
65 return ctx; in xlog_cil_ctx_alloc()
71 struct xfs_cil_ctx *ctx) in xlog_cil_ctx_switch() argument
73 ctx->sequence = ++cil->xc_current_sequence; in xlog_cil_ctx_switch()
74 ctx->cil = cil; in xlog_cil_ctx_switch()
75 cil->xc_ctx = ctx; in xlog_cil_ctx_switch()
[all …]
Dxfs_dir2_readdir.c47 struct dir_context *ctx) in xfs_dir2_sf_getdents() argument
69 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_sf_getdents()
86 if (ctx->pos <= dot_offset) { in xfs_dir2_sf_getdents()
87 ctx->pos = dot_offset & 0x7fffffff; in xfs_dir2_sf_getdents()
88 if (!dir_emit(ctx, ".", 1, dp->i_ino, DT_DIR)) in xfs_dir2_sf_getdents()
95 if (ctx->pos <= dotdot_offset) { in xfs_dir2_sf_getdents()
97 ctx->pos = dotdot_offset & 0x7fffffff; in xfs_dir2_sf_getdents()
98 if (!dir_emit(ctx, "..", 2, ino, DT_DIR)) in xfs_dir2_sf_getdents()
112 if (ctx->pos > off) { in xfs_dir2_sf_getdents()
119 ctx->pos = off & 0x7fffffff; in xfs_dir2_sf_getdents()
[all …]
/fs/ksmbd/
Dcrypto_ctx.c100 static void ctx_free(struct ksmbd_crypto_ctx *ctx) in ctx_free() argument
105 free_shash(ctx->desc[i]); in ctx_free()
107 free_aead(ctx->ccmaes[i]); in ctx_free()
108 kfree(ctx); in ctx_free()
113 struct ksmbd_crypto_ctx *ctx; in ksmbd_find_crypto_ctx() local
118 ctx = list_entry(ctx_list.idle_ctx.next, in ksmbd_find_crypto_ctx()
121 list_del(&ctx->list); in ksmbd_find_crypto_ctx()
123 return ctx; in ksmbd_find_crypto_ctx()
136 ctx = kzalloc(sizeof(struct ksmbd_crypto_ctx), GFP_KERNEL); in ksmbd_find_crypto_ctx()
137 if (!ctx) { in ksmbd_find_crypto_ctx()
[all …]
Dauth.c82 struct ksmbd_crypto_ctx *ctx; in ksmbd_gen_sess_key() local
85 ctx = ksmbd_crypto_ctx_find_hmacmd5(); in ksmbd_gen_sess_key()
86 if (!ctx) { in ksmbd_gen_sess_key()
91 rc = crypto_shash_setkey(CRYPTO_HMACMD5_TFM(ctx), in ksmbd_gen_sess_key()
99 rc = crypto_shash_init(CRYPTO_HMACMD5(ctx)); in ksmbd_gen_sess_key()
105 rc = crypto_shash_update(CRYPTO_HMACMD5(ctx), in ksmbd_gen_sess_key()
113 rc = crypto_shash_final(CRYPTO_HMACMD5(ctx), sess->sess_key); in ksmbd_gen_sess_key()
120 ksmbd_release_crypto_ctx(ctx); in ksmbd_gen_sess_key()
130 struct ksmbd_crypto_ctx *ctx; in calc_ntlmv2_hash() local
132 ctx = ksmbd_crypto_ctx_find_hmacmd5(); in calc_ntlmv2_hash()
[all …]
/fs/afs/
Dsuper.c226 struct afs_fs_context *ctx = fc->fs_private; in afs_parse_source() local
244 ctx->no_cell = true; in afs_parse_source()
253 ctx->type = AFSVL_RWVOL; in afs_parse_source()
254 ctx->force = true; in afs_parse_source()
259 ctx->volname = strchr(name, ':'); in afs_parse_source()
260 if (ctx->volname) { in afs_parse_source()
262 cellnamesz = ctx->volname - name; in afs_parse_source()
263 ctx->volname++; in afs_parse_source()
265 ctx->volname = name; in afs_parse_source()
271 suffix = strrchr(ctx->volname, '.'); in afs_parse_source()
[all …]
/fs/ntfs/
Dattrib.c70 int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx) in ntfs_map_runlist_nolock() argument
89 if (!ctx) { in ntfs_map_runlist_nolock()
94 ctx = ntfs_attr_get_search_ctx(base_ni, m); in ntfs_map_runlist_nolock()
95 if (unlikely(!ctx)) { in ntfs_map_runlist_nolock()
102 BUG_ON(IS_ERR(ctx->mrec)); in ntfs_map_runlist_nolock()
103 a = ctx->attr; in ntfs_map_runlist_nolock()
129 old_ctx = *ctx; in ntfs_map_runlist_nolock()
147 ntfs_attr_reinit_search_ctx(ctx); in ntfs_map_runlist_nolock()
153 CASE_SENSITIVE, vcn, NULL, 0, ctx); in ntfs_map_runlist_nolock()
159 BUG_ON(!ctx->attr->non_resident); in ntfs_map_runlist_nolock()
[all …]
/fs/proc/
Droot.c63 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_hidepid_param() local
74 ctx->hidepid = result.uint_32; in proc_parse_hidepid_param()
79 ctx->hidepid = HIDEPID_OFF; in proc_parse_hidepid_param()
81 ctx->hidepid = HIDEPID_NO_ACCESS; in proc_parse_hidepid_param()
83 ctx->hidepid = HIDEPID_INVISIBLE; in proc_parse_hidepid_param()
85 ctx->hidepid = HIDEPID_NOT_PTRACEABLE; in proc_parse_hidepid_param()
94 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_subset_param() local
104 ctx->pidonly = PROC_PIDONLY_ON; in proc_parse_subset_param()
117 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_param() local
127 ctx->gid = result.uint_32; in proc_parse_param()
[all …]
/fs/crypto/
Dpolicy.c341 struct fscrypt_context_v1 *ctx = &ctx_u->v1; in fscrypt_new_context() local
343 ctx->version = FSCRYPT_CONTEXT_V1; in fscrypt_new_context()
344 ctx->contents_encryption_mode = in fscrypt_new_context()
346 ctx->filenames_encryption_mode = in fscrypt_new_context()
348 ctx->flags = policy->flags; in fscrypt_new_context()
349 memcpy(ctx->master_key_descriptor, in fscrypt_new_context()
351 sizeof(ctx->master_key_descriptor)); in fscrypt_new_context()
352 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context()
353 return sizeof(*ctx); in fscrypt_new_context()
357 struct fscrypt_context_v2 *ctx = &ctx_u->v2; in fscrypt_new_context() local
[all …]
/fs/ntfs3/
Dlznt.c48 static size_t longest_match_std(const u8 *src, struct lznt *ctx) in longest_match_std() argument
58 hash = &(ctx->hash[hash_index].p1); in longest_match_std()
60 if (hash[0] >= ctx->unc && hash[0] < src && hash[0][0] == src[0] && in longest_match_std()
63 if (ctx->max_len > 3) in longest_match_std()
64 len1 += get_match_len(src + 3, ctx->unc_end, in longest_match_std()
65 hash[0] + 3, ctx->max_len - 3); in longest_match_std()
68 if (hash[1] >= ctx->unc && hash[1] < src && hash[1][0] == src[0] && in longest_match_std()
71 if (ctx->max_len > 3) in longest_match_std()
72 len2 += get_match_len(src + 3, ctx->unc_end, in longest_match_std()
73 hash[1] + 3, ctx->max_len - 3); in longest_match_std()
[all …]
/fs/smbfs_common/
Dcifs_arc4.c15 int cifs_arc4_setkey(struct arc4_ctx *ctx, const u8 *in_key, unsigned int key_len) in cifs_arc4_setkey() argument
19 ctx->x = 1; in cifs_arc4_setkey()
20 ctx->y = 0; in cifs_arc4_setkey()
23 ctx->S[i] = i; in cifs_arc4_setkey()
26 u32 a = ctx->S[i]; in cifs_arc4_setkey()
29 ctx->S[i] = ctx->S[j]; in cifs_arc4_setkey()
30 ctx->S[j] = a; in cifs_arc4_setkey()
39 void cifs_arc4_crypt(struct arc4_ctx *ctx, u8 *out, const u8 *in, unsigned int len) in cifs_arc4_crypt() argument
41 u32 *const S = ctx->S; in cifs_arc4_crypt()
48 x = ctx->x; in cifs_arc4_crypt()
[all …]
/fs/ext4/
Dreadpage.c90 static void bio_post_read_processing(struct bio_post_read_ctx *ctx);
94 struct bio_post_read_ctx *ctx = in decrypt_work() local
96 struct bio *bio = ctx->bio; in decrypt_work()
99 bio_post_read_processing(ctx); in decrypt_work()
106 struct bio_post_read_ctx *ctx = in verity_work() local
108 struct bio *bio = ctx->bio; in verity_work()
118 mempool_free(ctx, bio_post_read_ctx_pool); in verity_work()
126 static void bio_post_read_processing(struct bio_post_read_ctx *ctx) in bio_post_read_processing() argument
133 switch (++ctx->cur_step) { in bio_post_read_processing()
135 if (ctx->enabled_steps & (1 << STEP_DECRYPT)) { in bio_post_read_processing()
[all …]
/fs/vboxsf/
Dsuper.c56 struct vboxsf_fs_context *ctx = fc->fs_private; in vboxsf_parse_param() local
68 if (ctx->nls_name || fc->purpose != FS_CONTEXT_FOR_MOUNT) { in vboxsf_parse_param()
72 ctx->nls_name = param->string; in vboxsf_parse_param()
79 ctx->o.uid = uid; in vboxsf_parse_param()
85 ctx->o.gid = gid; in vboxsf_parse_param()
88 ctx->o.ttl = msecs_to_jiffies(result.uint_32); in vboxsf_parse_param()
93 ctx->o.dmode = result.uint_32; in vboxsf_parse_param()
94 ctx->o.dmode_set = true; in vboxsf_parse_param()
99 ctx->o.fmode = result.uint_32; in vboxsf_parse_param()
100 ctx->o.fmode_set = true; in vboxsf_parse_param()
[all …]

123456789