Home
last modified time | relevance | path

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

1234567

/fs/
Dtimerfd.c51 static inline bool isalarm(struct timerfd_ctx *ctx) in isalarm() argument
53 return ctx->clockid == CLOCK_REALTIME_ALARM || in isalarm()
54 ctx->clockid == CLOCK_BOOTTIME_ALARM; in isalarm()
62 static void timerfd_triggered(struct timerfd_ctx *ctx) in timerfd_triggered() argument
66 spin_lock_irqsave(&ctx->wqh.lock, flags); in timerfd_triggered()
67 ctx->expired = 1; in timerfd_triggered()
68 ctx->ticks++; in timerfd_triggered()
69 wake_up_locked_poll(&ctx->wqh, EPOLLIN); in timerfd_triggered()
70 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in timerfd_triggered()
75 struct timerfd_ctx *ctx = container_of(htmr, struct timerfd_ctx, in timerfd_tmrproc() local
[all …]
Deventfd.c59 __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n) in eventfd_signal() argument
63 spin_lock_irqsave(&ctx->wqh.lock, flags); in eventfd_signal()
64 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
65 n = ULLONG_MAX - ctx->count; in eventfd_signal()
66 ctx->count += n; in eventfd_signal()
67 if (waitqueue_active(&ctx->wqh)) in eventfd_signal()
68 wake_up_locked_poll(&ctx->wqh, EPOLLIN); in eventfd_signal()
69 spin_unlock_irqrestore(&ctx->wqh.lock, flags); in eventfd_signal()
75 static void eventfd_free_ctx(struct eventfd_ctx *ctx) in eventfd_free_ctx() argument
77 if (ctx->id >= 0) in eventfd_free_ctx()
[all …]
Duserfaultfd.c88 struct userfaultfd_ctx *ctx; member
97 struct userfaultfd_ctx *ctx; member
151 static void userfaultfd_ctx_get(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_get() argument
153 refcount_inc(&ctx->refcount); in userfaultfd_ctx_get()
164 static void userfaultfd_ctx_put(struct userfaultfd_ctx *ctx) in userfaultfd_ctx_put() argument
166 if (refcount_dec_and_test(&ctx->refcount)) { in userfaultfd_ctx_put()
167 VM_BUG_ON(spin_is_locked(&ctx->fault_pending_wqh.lock)); in userfaultfd_ctx_put()
168 VM_BUG_ON(waitqueue_active(&ctx->fault_pending_wqh)); in userfaultfd_ctx_put()
169 VM_BUG_ON(spin_is_locked(&ctx->fault_wqh.lock)); in userfaultfd_ctx_put()
170 VM_BUG_ON(waitqueue_active(&ctx->fault_wqh)); in userfaultfd_ctx_put()
[all …]
Dio_uring.c314 struct io_ring_ctx *ctx; member
364 static void io_cqring_fill_event(struct io_ring_ctx *ctx, u64 ki_user_data,
376 struct io_ring_ctx *ctx = file->private_data; in io_uring_get_socket() local
378 return ctx->ring_sock->sk; in io_uring_get_socket()
387 struct io_ring_ctx *ctx = container_of(ref, struct io_ring_ctx, refs); in io_ring_ctx_ref_free() local
389 complete(&ctx->ctx_done); in io_ring_ctx_ref_free()
394 struct io_ring_ctx *ctx; in io_ring_ctx_alloc() local
397 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); in io_ring_ctx_alloc()
398 if (!ctx) in io_ring_ctx_alloc()
401 if (percpu_ref_init(&ctx->refs, io_ring_ctx_ref_free, in io_ring_ctx_alloc()
[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()
182 .ctx.actor = fillonedir, in SYSCALL_DEFINE3()
189 error = iterate_dir(f.file, &buf.ctx); in SYSCALL_DEFINE3()
[all …]
Dfs_context.c519 struct legacy_fs_context *ctx = fc->fs_private; in legacy_fs_context_free() local
521 if (ctx) { in legacy_fs_context_free()
522 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) in legacy_fs_context_free()
523 kfree(ctx->legacy_data); in legacy_fs_context_free()
524 kfree(ctx); in legacy_fs_context_free()
533 struct legacy_fs_context *ctx; in legacy_fs_context_dup() local
536 ctx = kmemdup(src_ctx, sizeof(*src_ctx), GFP_KERNEL); in legacy_fs_context_dup()
537 if (!ctx) in legacy_fs_context_dup()
540 if (ctx->param_type == LEGACY_FS_INDIVIDUAL_PARAMS) { in legacy_fs_context_dup()
541 ctx->legacy_data = kmemdup(src_ctx->legacy_data, in legacy_fs_context_dup()
[all …]
/fs/cifs/
Dasn1.c98 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/
Dsuper.c232 struct afs_fs_context *ctx = fc->fs_private; in afs_parse_source() local
247 ctx->no_cell = true; in afs_parse_source()
256 ctx->type = AFSVL_RWVOL; in afs_parse_source()
257 ctx->force = true; in afs_parse_source()
262 ctx->volname = strchr(name, ':'); in afs_parse_source()
263 if (ctx->volname) { in afs_parse_source()
265 cellnamesz = ctx->volname - name; in afs_parse_source()
266 ctx->volname++; in afs_parse_source()
268 ctx->volname = name; in afs_parse_source()
274 suffix = strrchr(ctx->volname, '.'); in afs_parse_source()
[all …]
/fs/xfs/
Dxfs_log_cil.c392 struct xfs_cil_ctx *ctx = cil->xc_ctx; in xlog_cil_insert_items() local
412 ctx->nvecs += diff_iovecs; in xlog_cil_insert_items()
416 list_splice_init(&tp->t_busy, &ctx->busy_extents); in xlog_cil_insert_items()
425 if (ctx->ticket->t_curr_res == 0) { in xlog_cil_insert_items()
426 ctx_res = ctx->ticket->t_unit_res; in xlog_cil_insert_items()
427 ctx->ticket->t_curr_res = ctx_res; in xlog_cil_insert_items()
433 if (len > 0 && (ctx->space_used / iclog_space != in xlog_cil_insert_items()
434 (ctx->space_used + len) / iclog_space)) { in xlog_cil_insert_items()
438 ctx->ticket->t_unit_res += split_res; in xlog_cil_insert_items()
439 ctx->ticket->t_curr_res += split_res; in xlog_cil_insert_items()
[all …]
Dxfs_dir2_readdir.c46 struct dir_context *ctx) in xfs_dir2_sf_getdents() argument
67 if (xfs_dir2_dataptr_to_db(geo, ctx->pos) > geo->datablk) in xfs_dir2_sf_getdents()
84 if (ctx->pos <= dot_offset) { in xfs_dir2_sf_getdents()
85 ctx->pos = dot_offset & 0x7fffffff; in xfs_dir2_sf_getdents()
86 if (!dir_emit(ctx, ".", 1, dp->i_ino, DT_DIR)) in xfs_dir2_sf_getdents()
93 if (ctx->pos <= dotdot_offset) { in xfs_dir2_sf_getdents()
95 ctx->pos = dotdot_offset & 0x7fffffff; in xfs_dir2_sf_getdents()
96 if (!dir_emit(ctx, "..", 2, ino, DT_DIR)) in xfs_dir2_sf_getdents()
110 if (ctx->pos > off) { in xfs_dir2_sf_getdents()
117 ctx->pos = off & 0x7fffffff; in xfs_dir2_sf_getdents()
[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 …]
Dinode.c431 static int ntfs_is_extended_system_file(ntfs_attr_search_ctx *ctx) in ntfs_is_extended_system_file() argument
436 ntfs_attr_reinit_search_ctx(ctx); in ntfs_is_extended_system_file()
439 nr_links = le16_to_cpu(ctx->mrec->link_count); in ntfs_is_extended_system_file()
443 ctx))) { in ntfs_is_extended_system_file()
445 ATTR_RECORD *attr = ctx->attr; in ntfs_is_extended_system_file()
454 if (p < (u8*)ctx->mrec || (u8*)p > (u8*)ctx->mrec + in ntfs_is_extended_system_file()
455 le32_to_cpu(ctx->mrec->bytes_in_use)) { in ntfs_is_extended_system_file()
457 ntfs_error(ctx->ntfs_ino->vol->sb, "Corrupt file name " in ntfs_is_extended_system_file()
462 ntfs_error(ctx->ntfs_ino->vol->sb, "Non-resident file " in ntfs_is_extended_system_file()
467 ntfs_error(ctx->ntfs_ino->vol->sb, "File name with " in ntfs_is_extended_system_file()
[all …]
Dnamei.c165 ntfs_attr_search_ctx *ctx; in ntfs_lookup() local
189 ctx = NULL; in ntfs_lookup()
192 ctx = ntfs_attr_get_search_ctx(ni, m); in ntfs_lookup()
193 if (unlikely(!ctx)) { in ntfs_lookup()
202 NULL, 0, ctx); in ntfs_lookup()
212 a = ctx->attr; in ntfs_lookup()
219 fn = (FILE_NAME_ATTR*)((u8*)ctx->attr + le16_to_cpu( in ntfs_lookup()
220 ctx->attr->data.resident.value_offset)); in ntfs_lookup()
231 ntfs_attr_put_search_ctx(ctx); in ntfs_lookup()
235 ctx = NULL; in ntfs_lookup()
[all …]
Dfile.c105 ntfs_attr_search_ctx *ctx = NULL; in ntfs_attr_extend_initialized() local
137 ctx = ntfs_attr_get_search_ctx(base_ni, m); in ntfs_attr_extend_initialized()
138 if (unlikely(!ctx)) { in ntfs_attr_extend_initialized()
143 CASE_SENSITIVE, 0, NULL, 0, ctx); in ntfs_attr_extend_initialized()
149 m = ctx->mrec; in ntfs_attr_extend_initialized()
150 a = ctx->attr; in ntfs_attr_extend_initialized()
181 ctx = ntfs_attr_get_search_ctx(base_ni, m); in ntfs_attr_extend_initialized()
182 if (unlikely(!ctx)) { in ntfs_attr_extend_initialized()
187 CASE_SENSITIVE, 0, NULL, 0, ctx); in ntfs_attr_extend_initialized()
193 m = ctx->mrec; in ntfs_attr_extend_initialized()
[all …]
/fs/crypto/
Dpolicy.c154 struct fscrypt_context_v1 *ctx = &ctx_u->v1; in fscrypt_new_context_from_policy() local
156 ctx->version = FSCRYPT_CONTEXT_V1; in fscrypt_new_context_from_policy()
157 ctx->contents_encryption_mode = in fscrypt_new_context_from_policy()
159 ctx->filenames_encryption_mode = in fscrypt_new_context_from_policy()
161 ctx->flags = policy->flags; in fscrypt_new_context_from_policy()
162 memcpy(ctx->master_key_descriptor, in fscrypt_new_context_from_policy()
164 sizeof(ctx->master_key_descriptor)); in fscrypt_new_context_from_policy()
165 get_random_bytes(ctx->nonce, sizeof(ctx->nonce)); in fscrypt_new_context_from_policy()
166 return sizeof(*ctx); in fscrypt_new_context_from_policy()
170 struct fscrypt_context_v2 *ctx = &ctx_u->v2; in fscrypt_new_context_from_policy() local
[all …]
/fs/proc/
Droot.c57 struct proc_fs_context *ctx = fc->fs_private; in proc_parse_param() local
67 ctx->gid = result.uint_32; in proc_parse_param()
71 ctx->hidepid = result.uint_32; in proc_parse_param()
72 if (ctx->hidepid < HIDEPID_OFF || in proc_parse_param()
73 ctx->hidepid > HIDEPID_INVISIBLE) in proc_parse_param()
81 ctx->mask |= 1 << opt; in proc_parse_param()
89 struct proc_fs_context *ctx = fc->fs_private; in proc_apply_options() local
91 if (ctx->mask & (1 << Opt_gid)) in proc_apply_options()
92 pid_ns->pid_gid = make_kgid(user_ns, ctx->gid); in proc_apply_options()
93 if (ctx->mask & (1 << Opt_hidepid)) in proc_apply_options()
[all …]
/fs/ext4/
Dreadpage.c94 static void bio_post_read_processing(struct bio_post_read_ctx *ctx);
98 struct bio_post_read_ctx *ctx = in decrypt_work() local
101 fscrypt_decrypt_bio(ctx->bio); in decrypt_work()
103 bio_post_read_processing(ctx); in decrypt_work()
108 struct bio_post_read_ctx *ctx = in verity_work() local
111 fsverity_verify_bio(ctx->bio); in verity_work()
113 bio_post_read_processing(ctx); in verity_work()
116 static void bio_post_read_processing(struct bio_post_read_ctx *ctx) in bio_post_read_processing() argument
123 switch (++ctx->cur_step) { in bio_post_read_processing()
125 if (ctx->enabled_steps & (1 << STEP_DECRYPT)) { in bio_post_read_processing()
[all …]
Ddir.c111 static int ext4_readdir(struct file *file, struct dir_context *ctx) in ext4_readdir() argument
129 err = ext4_dx_readdir(file, ctx); in ext4_readdir()
143 err = ext4_read_inline_dir(file, ctx, in ext4_readdir()
155 while (ctx->pos < inode->i_size) { in ext4_readdir()
163 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir()
164 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir()
172 ctx->pos += map.m_len * sb->s_blocksize; in ext4_readdir()
194 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir()
196 ctx->pos += sb->s_blocksize - offset; in ext4_readdir()
205 (unsigned long long)ctx->pos); in ext4_readdir()
[all …]
/fs/hpfs/
Ddir.c65 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/orangefs/
Ddir.c190 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/hugetlbfs/
Dinode.c729 struct hugetlbfs_fs_context *ctx) in hugetlbfs_get_root() argument
736 inode->i_mode = S_IFDIR | ctx->mode; in hugetlbfs_get_root()
737 inode->i_uid = ctx->uid; in hugetlbfs_get_root()
738 inode->i_gid = ctx->gid; in hugetlbfs_get_root()
1148 struct hugetlbfs_fs_context *ctx = fc->fs_private; in hugetlbfs_parse_param() local
1160 ctx->uid = make_kuid(current_user_ns(), result.uint_32); in hugetlbfs_parse_param()
1161 if (!uid_valid(ctx->uid)) in hugetlbfs_parse_param()
1166 ctx->gid = make_kgid(current_user_ns(), result.uint_32); in hugetlbfs_parse_param()
1167 if (!gid_valid(ctx->gid)) in hugetlbfs_parse_param()
1172 ctx->mode = result.uint_32 & 01777U; in hugetlbfs_parse_param()
[all …]
/fs/isofs/
Ddir.c83 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()
168 ctx->pos += de_len; in do_isofs_readdir()
175 if (!dir_emit_dot(file, ctx)) in do_isofs_readdir()
177 ctx->pos += de_len; in do_isofs_readdir()
185 if (!dir_emit_dotdot(file, ctx)) in do_isofs_readdir()
[all …]
/fs/fuse/
Dreaddir.c16 static bool fuse_use_readdirplus(struct inode *dir, struct dir_context *ctx) in fuse_use_readdirplus() argument
27 if (ctx->pos == 0) in fuse_use_readdirplus()
112 static bool fuse_emit(struct file *file, struct dir_context *ctx, in fuse_emit() argument
118 fuse_add_dirent_to_cache(file, dirent, ctx->pos); in fuse_emit()
120 return dir_emit(ctx, dirent->name, dirent->namelen, dirent->ino, in fuse_emit()
125 struct dir_context *ctx) in parse_dirfile() argument
137 if (!fuse_emit(file, ctx, dirent)) in parse_dirfile()
142 ctx->pos = dirent->off; in parse_dirfile()
274 struct dir_context *ctx, u64 attr_version) in parse_dirplusfile() argument
301 over = !fuse_emit(file, ctx, dirent); in parse_dirplusfile()
[all …]

1234567