/fs/smb/client/ |
D | fs_context.c | 198 cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_context *ctx) in cifs_parse_security_flavors() argument 207 ctx->sectype = Unspecified; in cifs_parse_security_flavors() 208 ctx->sign = false; in cifs_parse_security_flavors() 215 ctx->sign = true; in cifs_parse_security_flavors() 218 ctx->sectype = Kerberos; in cifs_parse_security_flavors() 221 ctx->sign = true; in cifs_parse_security_flavors() 224 ctx->sectype = RawNTLMSSP; in cifs_parse_security_flavors() 227 ctx->sign = true; in cifs_parse_security_flavors() 230 ctx->sectype = NTLMv2; in cifs_parse_security_flavors() 233 ctx->nullauth = 1; in cifs_parse_security_flavors() [all …]
|
D | connect.c | 1508 match_security(struct TCP_Server_Info *server, struct smb3_fs_context *ctx) in match_security() argument 1515 if (server->ops->select_sectype(server, ctx->sectype) in match_security() 1524 if (ctx->sign && !server->sign) in match_security() 1531 static int match_server(struct TCP_Server_Info *server, struct smb3_fs_context *ctx) in match_server() argument 1533 struct sockaddr *addr = (struct sockaddr *)&ctx->dstaddr; in match_server() 1537 if (ctx->nosharesock) in match_server() 1545 if (strcmp(ctx->vals->version_string, SMB3ANY_VERSION_STRING) == 0) { in match_server() 1548 } else if (strcmp(ctx->vals->version_string, in match_server() 1552 } else if ((server->vals != ctx->vals) || (server->ops != ctx->ops)) in match_server() 1558 if (strcasecmp(server->hostname, ctx->server_hostname)) in match_server() [all …]
|
/fs/ |
D | timerfd.c | 54 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 …]
|
D | eventfd.c | 46 __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 …]
|
D | userfaultfd.c | 85 struct userfaultfd_ctx *ctx; member 94 struct userfaultfd_ctx *ctx; member 106 static bool userfaultfd_is_initialized(struct userfaultfd_ctx *ctx) in userfaultfd_is_initialized() argument 108 return ctx->features & UFFD_FEATURE_INITIALIZED; in userfaultfd_is_initialized() 171 static void userfaultfd_ctx_get(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_get() argument 173 refcount_inc(&ctx->refcount); in userfaultfd_ctx_get() 184 static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_put() argument 186 if (refcount_dec_and_test(&ctx->refcount)) { in userfaultfd_ctx_put() 187 VM_BUG_ON(spin_is_locked(&ctx->fault_pending_wqh.lock)); in userfaultfd_ctx_put() 188 VM_BUG_ON(waitqueue_active(&ctx->fault_pending_wqh)); in userfaultfd_ctx_put() [all …]
|
D | aio.c | 261 static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) in aio_private_file() argument 269 inode->i_mapping->private_data = ctx; in aio_private_file() 309 static void put_aio_ring_file(struct kioctx *ctx) in put_aio_ring_file() argument 311 struct file *aio_ring_file = ctx->aio_ring_file; in put_aio_ring_file() 321 ctx->aio_ring_file = NULL; in put_aio_ring_file() 328 static void aio_free_ring(struct kioctx *ctx) in aio_free_ring() argument 335 put_aio_ring_file(ctx); in aio_free_ring() 337 for (i = 0; i < ctx->nr_pages; i++) { in aio_free_ring() 340 page_count(ctx->ring_pages[i])); in aio_free_ring() 341 page = ctx->ring_pages[i]; in aio_free_ring() [all …]
|
D | locks.c | 175 struct file_lock_context *ctx; in locks_get_lock_context() local 178 ctx = smp_load_acquire(&inode->i_flctx); in locks_get_lock_context() 179 if (likely(ctx) || type == F_UNLCK) in locks_get_lock_context() 182 ctx = kmem_cache_alloc(flctx_cache, GFP_KERNEL); in locks_get_lock_context() 183 if (!ctx) in locks_get_lock_context() 186 spin_lock_init(&ctx->flc_lock); in locks_get_lock_context() 187 INIT_LIST_HEAD(&ctx->flc_flock); in locks_get_lock_context() 188 INIT_LIST_HEAD(&ctx->flc_posix); in locks_get_lock_context() 189 INIT_LIST_HEAD(&ctx->flc_lease); in locks_get_lock_context() 195 if (cmpxchg(&inode->i_flctx, NULL, ctx)) { in locks_get_lock_context() [all …]
|
D | readdir.c | 40 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 bool 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 …]
|
D | fs_context.c | 508 struct legacy_fs_context *ctx = fc->fs_private; in legacy_fs_context_free() local 510 if (ctx) { in legacy_fs_context_free() 511 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) in legacy_fs_context_free() 512 kfree(ctx->legacy_data); in legacy_fs_context_free() 513 kfree(ctx); in legacy_fs_context_free() 522 struct legacy_fs_context *ctx; in legacy_fs_context_dup() local 525 ctx = kmemdup(src_ctx, sizeof(*src_ctx), GFP_KERNEL); in legacy_fs_context_dup() 526 if (!ctx) in legacy_fs_context_dup() 529 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) { in legacy_fs_context_dup() 530 ctx->legacy_data = kmemdup(src_ctx->legacy_data, in legacy_fs_context_dup() [all …]
|
/fs/nfs/ |
D | fs_context.c | 293 static bool nfs_server_transport_udp_invalid(const struct nfs_fs_context *ctx) in nfs_server_transport_udp_invalid() argument 298 static bool nfs_server_transport_udp_invalid(const struct nfs_fs_context *ctx) in nfs_server_transport_udp_invalid() argument 300 if (ctx->version == 4) in nfs_server_transport_udp_invalid() 310 struct nfs_fs_context *ctx) in nfs_validate_transport_protocol() argument 312 switch (ctx->nfs_server.protocol) { in nfs_validate_transport_protocol() 314 if (nfs_server_transport_udp_invalid(ctx)) in nfs_validate_transport_protocol() 321 ctx->nfs_server.protocol = XPRT_TRANSPORT_TCP; in nfs_validate_transport_protocol() 332 static void nfs_set_mount_transport_protocol(struct nfs_fs_context *ctx) in nfs_set_mount_transport_protocol() argument 334 if (ctx->mount_server.protocol == XPRT_TRANSPORT_UDP || in nfs_set_mount_transport_protocol() 335 ctx->mount_server.protocol == XPRT_TRANSPORT_TCP) in nfs_set_mount_transport_protocol() [all …]
|
D | super.c | 769 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 825 .sap = &ctx->mount_server._address, in nfs_request_mount() 826 .dirpath = ctx->nfs_server.export_path, in nfs_request_mount() 827 .protocol = ctx->mount_server.protocol, in nfs_request_mount() 829 .noresvport = ctx->flags & NFS_MOUNT_NORESVPORT, in nfs_request_mount() [all …]
|
D | namespace.c | 147 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 …]
|
D | nfs4namespace.c | 131 struct nfs_fs_context *ctx) in nfs4_validate_fspath() argument 160 __func__, path, ctx->nfs_server.export_path); in nfs4_validate_fspath() 291 struct nfs_fs_context *ctx = nfs_fc2context(fc); in try_location() local 307 kfree(ctx->nfs_server.hostname); in try_location() 308 ctx->nfs_server.hostname = kmalloc(len + 1, GFP_KERNEL); in try_location() 309 if (!ctx->nfs_server.hostname) in try_location() 313 &ctx->nfs_server.export_path_len); in try_location() 317 kfree(ctx->nfs_server.export_path); in try_location() 318 ctx->nfs_server.export_path = export_path; in try_location() 320 source = kmalloc(len + 1 + ctx->nfs_server.export_path_len + 1, in try_location() [all …]
|
/fs/smb/server/ |
D | crypto_ctx.c | 100 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 …]
|
D | auth.c | 82 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/ |
D | super.c | 227 struct afs_fs_context *ctx = fc->fs_private; in afs_parse_source() local 245 ctx->no_cell = true; in afs_parse_source() 254 ctx->type = AFSVL_RWVOL; in afs_parse_source() 255 ctx->force = true; in afs_parse_source() 260 ctx->volname = strchr(name, ':'); in afs_parse_source() 261 if (ctx->volname) { in afs_parse_source() 263 cellnamesz = ctx->volname - name; in afs_parse_source() 264 ctx->volname++; in afs_parse_source() 266 ctx->volname = name; in afs_parse_source() 272 suffix = strrchr(ctx->volname, '.'); in afs_parse_source() [all …]
|
/fs/xfs/ |
D | xfs_log_cil.c | 102 struct xfs_cil_ctx *ctx; in xlog_cil_ctx_alloc() local 104 ctx = kmem_zalloc(sizeof(*ctx), KM_NOFS); in xlog_cil_ctx_alloc() 105 INIT_LIST_HEAD(&ctx->committing); in xlog_cil_ctx_alloc() 106 INIT_LIST_HEAD(&ctx->busy_extents); in xlog_cil_ctx_alloc() 107 INIT_LIST_HEAD(&ctx->log_items); in xlog_cil_ctx_alloc() 108 INIT_LIST_HEAD(&ctx->lv_chain); in xlog_cil_ctx_alloc() 109 INIT_WORK(&ctx->push_work, xlog_cil_push_work); in xlog_cil_ctx_alloc() 110 return ctx; in xlog_cil_ctx_alloc() 122 struct xfs_cil_ctx *ctx) in xlog_cil_push_pcp_aggregate() argument 130 ctx->ticket->t_curr_res += cilpcp->space_reserved; in xlog_cil_push_pcp_aggregate() [all …]
|
/fs/ntfs/ |
D | attrib.c | 70 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/ |
D | root.c | 60 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_hidepid_param() local 71 ctx->hidepid = result.uint_32; in proc_parse_hidepid_param() 76 ctx->hidepid = HIDEPID_OFF; in proc_parse_hidepid_param() 78 ctx->hidepid = HIDEPID_NO_ACCESS; in proc_parse_hidepid_param() 80 ctx->hidepid = HIDEPID_INVISIBLE; in proc_parse_hidepid_param() 82 ctx->hidepid = HIDEPID_NOT_PTRACEABLE; in proc_parse_hidepid_param() 91 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_subset_param() local 101 ctx->pidonly = PROC_PIDONLY_ON; in proc_parse_subset_param() 114 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_param() local 124 ctx->gid = result.uint_32; in proc_parse_param() [all …]
|
/fs/btrfs/ |
D | tree-log.h | 35 static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx, in btrfs_init_log_ctx() argument 38 ctx->log_ret = 0; in btrfs_init_log_ctx() 39 ctx->log_transid = 0; in btrfs_init_log_ctx() 40 ctx->log_new_dentries = false; in btrfs_init_log_ctx() 41 ctx->logging_new_name = false; in btrfs_init_log_ctx() 42 ctx->logging_new_delayed_dentries = false; in btrfs_init_log_ctx() 43 ctx->logged_before = false; in btrfs_init_log_ctx() 44 ctx->inode = inode; in btrfs_init_log_ctx() 45 INIT_LIST_HEAD(&ctx->list); in btrfs_init_log_ctx() 46 INIT_LIST_HEAD(&ctx->ordered_extents); in btrfs_init_log_ctx() [all …]
|
/fs/crypto/ |
D | policy.c | 341 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/ |
D | lznt.c | 48 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/smb/common/ |
D | cifs_arc4.c | 15 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/erofs/ |
D | super.c | 378 static void erofs_default_options(struct erofs_fs_context *ctx) in erofs_default_options() argument 381 ctx->opt.cache_strategy = EROFS_ZIP_CACHE_READAROUND; in erofs_default_options() 382 ctx->opt.max_sync_decompress_pages = 3; in erofs_default_options() 383 ctx->opt.sync_decompress = EROFS_SYNC_DECOMPRESS_AUTO; in erofs_default_options() 386 set_opt(&ctx->opt, XATTR_USER); in erofs_default_options() 389 set_opt(&ctx->opt, POSIX_ACL); in erofs_default_options() 434 struct erofs_fs_context *ctx = fc->fs_private; in erofs_fc_set_dax_mode() local 439 set_opt(&ctx->opt, DAX_ALWAYS); in erofs_fc_set_dax_mode() 440 clear_opt(&ctx->opt, DAX_NEVER); in erofs_fc_set_dax_mode() 443 set_opt(&ctx->opt, DAX_NEVER); in erofs_fc_set_dax_mode() [all …]
|
/fs/ext4/ |
D | readpage.c | 90 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 …]
|