/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 | 48 __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, unsigned mask) in eventfd_signal_mask() argument 63 spin_lock_irqsave(&ctx->wqh.lock, flags); in eventfd_signal_mask() 65 if (ULLONG_MAX - ctx->count < n) in eventfd_signal_mask() 66 n = ULLONG_MAX - ctx->count; in eventfd_signal_mask() 67 ctx->count += n; in eventfd_signal_mask() 68 if (waitqueue_active(&ctx->wqh)) in eventfd_signal_mask() 69 wake_up_locked_poll(&ctx->wqh, EPOLLIN | mask); in eventfd_signal_mask() 71 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in eventfd_signal_mask() 90 __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n) in eventfd_signal() argument 92 return eventfd_signal_mask(ctx, n, 0); in eventfd_signal() [all …]
|
D | userfaultfd.c | 83 struct userfaultfd_ctx *ctx; member 92 struct userfaultfd_ctx *ctx; member 104 static bool userfaultfd_is_initialized(struct userfaultfd_ctx *ctx) in userfaultfd_is_initialized() argument 106 return ctx->features & UFFD_FEATURE_INITIALIZED; in userfaultfd_is_initialized() 154 static void userfaultfd_ctx_get(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_get() argument 156 refcount_inc(&ctx->refcount); in userfaultfd_ctx_get() 161 struct userfaultfd_ctx *ctx = container_of(head, struct userfaultfd_ctx, in __free_userfaultfd_ctx() local 163 kmem_cache_free(userfaultfd_ctx_cachep, ctx); in __free_userfaultfd_ctx() 174 static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_put() argument 176 if (refcount_dec_and_test(&ctx->refcount)) { in userfaultfd_ctx_put() [all …]
|
D | aio.c | 236 static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) in aio_private_file() argument 244 inode->i_mapping->private_data = ctx; in aio_private_file() 283 static void put_aio_ring_file(struct kioctx *ctx) in put_aio_ring_file() argument 285 struct file *aio_ring_file = ctx->aio_ring_file; in put_aio_ring_file() 295 ctx->aio_ring_file = NULL; in put_aio_ring_file() 302 static void aio_free_ring(struct kioctx *ctx) in aio_free_ring() argument 309 put_aio_ring_file(ctx); in aio_free_ring() 311 for (i = 0; i < ctx->nr_pages; i++) { in aio_free_ring() 314 page_count(ctx->ring_pages[i])); in aio_free_ring() 315 page = ctx->ring_pages[i]; in aio_free_ring() [all …]
|
D | locks.c | 251 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 …]
|
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 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 …]
|
D | fs_context.c | 464 struct legacy_fs_context *ctx = fc->fs_private; in legacy_fs_context_free() local 466 if (ctx) { in legacy_fs_context_free() 467 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) in legacy_fs_context_free() 468 kfree(ctx->legacy_data); in legacy_fs_context_free() 469 kfree(ctx); in legacy_fs_context_free() 478 struct legacy_fs_context *ctx; in legacy_fs_context_dup() local 481 ctx = kmemdup(src_ctx, sizeof(*src_ctx), GFP_KERNEL); in legacy_fs_context_dup() 482 if (!ctx) in legacy_fs_context_dup() 485 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) { in legacy_fs_context_dup() 486 ctx->legacy_data = kmemdup(src_ctx->legacy_data, in legacy_fs_context_dup() [all …]
|
/fs/nfs/ |
D | fs_context.c | 275 static void nfs_validate_transport_protocol(struct nfs_fs_context *ctx) in nfs_validate_transport_protocol() argument 277 switch (ctx->nfs_server.protocol) { in nfs_validate_transport_protocol() 283 ctx->nfs_server.protocol = XPRT_TRANSPORT_TCP; in nfs_validate_transport_protocol() 291 static void nfs_set_mount_transport_protocol(struct nfs_fs_context *ctx) in nfs_set_mount_transport_protocol() argument 293 nfs_validate_transport_protocol(ctx); in nfs_set_mount_transport_protocol() 295 if (ctx->mount_server.protocol == XPRT_TRANSPORT_UDP || in nfs_set_mount_transport_protocol() 296 ctx->mount_server.protocol == XPRT_TRANSPORT_TCP) in nfs_set_mount_transport_protocol() 298 switch (ctx->nfs_server.protocol) { in nfs_set_mount_transport_protocol() 300 ctx->mount_server.protocol = XPRT_TRANSPORT_UDP; in nfs_set_mount_transport_protocol() 304 ctx->mount_server.protocol = XPRT_TRANSPORT_TCP; in nfs_set_mount_transport_protocol() [all …]
|
D | super.c | 752 static int nfs_verify_authflavors(struct nfs_fs_context *ctx, in nfs_verify_authflavors() argument 775 if (nfs_auth_info_match(&ctx->auth_info, flavor)) in nfs_verify_authflavors() 783 flavor = ctx->auth_info.flavors[0]; in nfs_verify_authflavors() 792 ctx->selected_flavor = flavor; in nfs_verify_authflavors() 793 dfprintk(MOUNT, "NFS: using auth flavor %u\n", ctx->selected_flavor); in nfs_verify_authflavors() 806 struct nfs_fs_context *ctx = nfs_fc2context(fc); in nfs_request_mount() local 809 &ctx->mount_server.address, in nfs_request_mount() 810 .dirpath = ctx->nfs_server.export_path, in nfs_request_mount() 811 .protocol = ctx->mount_server.protocol, in nfs_request_mount() 813 .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() 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/cifs/ |
D | asn1.c | 98 asn1_open(struct asn1_ctx *ctx, unsigned char *buf, unsigned int len) in asn1_open() argument 100 ctx->begin = buf; in asn1_open() 101 ctx->end = buf + len; in asn1_open() 102 ctx->pointer = buf; in asn1_open() 103 ctx->error = ASN1_ERR_NOERROR; in asn1_open() 107 asn1_octet_decode(struct asn1_ctx *ctx, unsigned char *ch) in asn1_octet_decode() argument 109 if (ctx->pointer >= ctx->end) { in asn1_octet_decode() 110 ctx->error = ASN1_ERR_DEC_EMPTY; in asn1_octet_decode() 113 *ch = *(ctx->pointer)++; in asn1_octet_decode() 119 asn1_enum_decode(struct asn1_ctx *ctx, __le32 *val) [all …]
|
/fs/afs/ |
D | super.c | 226 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/ |
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 …]
|
D | inode.c | 432 static int ntfs_is_extended_system_file(ntfs_attr_search_ctx *ctx) in ntfs_is_extended_system_file() argument 437 ntfs_attr_reinit_search_ctx(ctx); in ntfs_is_extended_system_file() 440 nr_links = le16_to_cpu(ctx->mrec->link_count); in ntfs_is_extended_system_file() 444 ctx))) { in ntfs_is_extended_system_file() 446 ATTR_RECORD *attr = ctx->attr; in ntfs_is_extended_system_file() 455 if (p < (u8*)ctx->mrec || (u8*)p > (u8*)ctx->mrec + in ntfs_is_extended_system_file() 456 le32_to_cpu(ctx->mrec->bytes_in_use)) { in ntfs_is_extended_system_file() 458 ntfs_error(ctx->ntfs_ino->vol->sb, "Corrupt file name " in ntfs_is_extended_system_file() 463 ntfs_error(ctx->ntfs_ino->vol->sb, "Non-resident file " in ntfs_is_extended_system_file() 468 ntfs_error(ctx->ntfs_ino->vol->sb, "File name with " in ntfs_is_extended_system_file() [all …]
|
/fs/xfs/ |
D | xfs_log_cil.c | 391 struct xfs_cil_ctx *ctx = cil->xc_ctx; in xlog_cil_insert_items() local 411 ctx->nvecs += diff_iovecs; in xlog_cil_insert_items() 415 list_splice_init(&tp->t_busy, &ctx->busy_extents); in xlog_cil_insert_items() 424 if (ctx->ticket->t_curr_res == 0) { in xlog_cil_insert_items() 425 ctx_res = ctx->ticket->t_unit_res; in xlog_cil_insert_items() 426 ctx->ticket->t_curr_res = ctx_res; in xlog_cil_insert_items() 432 if (len > 0 && (ctx->space_used / iclog_space != in xlog_cil_insert_items() 433 (ctx->space_used + len) / iclog_space)) { in xlog_cil_insert_items() 437 ctx->ticket->t_unit_res += split_res; in xlog_cil_insert_items() 438 ctx->ticket->t_curr_res += split_res; in xlog_cil_insert_items() [all …]
|
D | xfs_dir2_readdir.c | 47 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/proc/ |
D | root.c | 63 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/ |
D | policy.c | 269 struct fscrypt_context_v1 *ctx = &ctx_u->v1; in fscrypt_new_context() local 271 ctx->version = FSCRYPT_CONTEXT_V1; in fscrypt_new_context() 272 ctx->contents_encryption_mode = in fscrypt_new_context() 274 ctx->filenames_encryption_mode = in fscrypt_new_context() 276 ctx->flags = policy->flags; in fscrypt_new_context() 277 memcpy(ctx->master_key_descriptor, in fscrypt_new_context() 279 sizeof(ctx->master_key_descriptor)); in fscrypt_new_context() 280 memcpy(ctx->nonce, nonce, FSCRYPT_FILE_NONCE_SIZE); in fscrypt_new_context() 281 return sizeof(*ctx); in fscrypt_new_context() 285 struct fscrypt_context_v2 *ctx = &ctx_u->v2; in fscrypt_new_context() local [all …]
|
/fs/vboxsf/ |
D | super.c | 56 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 …]
|
/fs/ext4/ |
D | readpage.c | 95 static void bio_post_read_processing(struct bio_post_read_ctx *ctx); 99 struct bio_post_read_ctx *ctx = in decrypt_work() local 102 fscrypt_decrypt_bio(ctx->bio); in decrypt_work() 104 bio_post_read_processing(ctx); in decrypt_work() 109 struct bio_post_read_ctx *ctx = in verity_work() local 111 struct bio *bio = ctx->bio; in verity_work() 121 mempool_free(ctx, bio_post_read_ctx_pool); in verity_work() 129 static void bio_post_read_processing(struct bio_post_read_ctx *ctx) in bio_post_read_processing() argument 136 switch (++ctx->cur_step) { in bio_post_read_processing() 138 if (ctx->enabled_steps & (1 << STEP_DECRYPT)) { in bio_post_read_processing() [all …]
|
/fs/hpfs/ |
D | dir.c | 65 static int hpfs_readdir(struct file *file, struct dir_context *ctx) in hpfs_readdir() argument 113 if (ctx->pos == 12) { /* diff -r requires this (note, that diff -r */ in hpfs_readdir() 114 ctx->pos = 13; /* also fails on msdos filesystem in 2.0) */ in hpfs_readdir() 117 if (ctx->pos == 13) { in hpfs_readdir() 128 if (hpfs_stop_cycles(inode->i_sb, ctx->pos, &c1, &c2, "hpfs_readdir")) { in hpfs_readdir() 132 if (ctx->pos == 12) in hpfs_readdir() 134 if (ctx->pos == 3 || ctx->pos == 4 || ctx->pos == 5) { in hpfs_readdir() 135 pr_err("pos==%d\n", (int)ctx->pos); in hpfs_readdir() 138 if (ctx->pos == 0) { in hpfs_readdir() 139 if (!dir_emit_dot(file, ctx)) in hpfs_readdir() [all …]
|
/fs/btrfs/ |
D | tree-log.h | 26 static inline void btrfs_init_log_ctx(struct btrfs_log_ctx *ctx, in btrfs_init_log_ctx() argument 29 ctx->log_ret = 0; in btrfs_init_log_ctx() 30 ctx->log_transid = 0; in btrfs_init_log_ctx() 31 ctx->log_new_dentries = false; in btrfs_init_log_ctx() 32 ctx->logging_new_name = false; in btrfs_init_log_ctx() 33 ctx->inode = inode; in btrfs_init_log_ctx() 34 INIT_LIST_HEAD(&ctx->list); in btrfs_init_log_ctx() 35 INIT_LIST_HEAD(&ctx->ordered_extents); in btrfs_init_log_ctx() 38 static inline void btrfs_release_log_ctx_extents(struct btrfs_log_ctx *ctx) in btrfs_release_log_ctx_extents() argument 43 ASSERT(inode_is_locked(ctx->inode)); in btrfs_release_log_ctx_extents() [all …]
|
/fs/orangefs/ |
D | dir.c | 190 struct dir_context *ctx) in fill_from_part() argument 197 i = ctx->pos & ~PART_MASK; in fill_from_part() 226 if (!dir_emit(ctx, s, *len, in fill_from_part() 233 ctx->pos = (ctx->pos & PART_MASK) | i; in fill_from_part() 243 struct dir_context *ctx) in orangefs_dir_fill() argument 248 count = ((ctx->pos & PART_MASK) >> PART_SHIFT) - 1; in orangefs_dir_fill() 263 r = fill_from_part(part, ctx); in orangefs_dir_fill() 274 ctx->pos = (ctx->pos & PART_MASK) + in orangefs_dir_fill() 305 struct dir_context *ctx) in orangefs_dir_iterate() argument 319 if (ctx->pos == 0) { in orangefs_dir_iterate() [all …]
|
/fs/isofs/ |
D | dir.c | 83 struct dir_context *ctx, in do_isofs_readdir() argument 98 offset = ctx->pos & (bufsize - 1); in do_isofs_readdir() 99 block = ctx->pos >> bufbits; in do_isofs_readdir() 101 while (ctx->pos < inode->i_size) { in do_isofs_readdir() 123 ctx->pos = (ctx->pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1); in do_isofs_readdir() 124 block = ctx->pos >> bufbits; in do_isofs_readdir() 169 ctx->pos += de_len; in do_isofs_readdir() 176 if (!dir_emit_dot(file, ctx)) in do_isofs_readdir() 178 ctx->pos += de_len; in do_isofs_readdir() 186 if (!dir_emit_dotdot(file, ctx)) in do_isofs_readdir() [all …]
|