/fs/proc/ |
D | proc_sysctl.c | 40 static bool is_empty_dir(struct ctl_table_header *head) in is_empty_dir() argument 42 return head->ctl_table[0].child == sysctl_mount_point; in is_empty_dir() 88 static int insert_links(struct ctl_table_header *head); 112 struct ctl_table_header *head; in find_entry() local 123 head = ctl_node->header; in find_entry() 124 entry = &head->ctl_table[ctl_node - head->node]; in find_entry() 133 *phead = head; in find_entry() 140 static int insert_entry(struct ctl_table_header *head, struct ctl_table *entry) in insert_entry() argument 142 struct rb_node *node = &head->node[entry - head->ctl_table].node; in insert_entry() 143 struct rb_node **p = &head->parent->root.rb_node; in insert_entry() [all …]
|
/fs/gfs2/ |
D | recovery.c | 57 struct list_head *head = &jd->jd_revoke_list; in gfs2_revoke_add() local 61 list_for_each_entry(rr, head, rr_list) { in gfs2_revoke_add() 79 list_add(&rr->rr_list, head); in gfs2_revoke_add() 110 struct list_head *head = &jd->jd_revoke_list; in gfs2_revoke_clean() local 113 while (!list_empty(head)) { in gfs2_revoke_clean() 114 rr = list_first_entry(head, struct gfs2_revoke_replay, rr_list); in gfs2_revoke_clean() 121 unsigned int blkno, struct gfs2_log_header_host *head) in __get_log_header() argument 142 head->lh_sequence = be64_to_cpu(lh->lh_sequence); in __get_log_header() 143 head->lh_flags = be32_to_cpu(lh->lh_flags); in __get_log_header() 144 head->lh_tail = be32_to_cpu(lh->lh_tail); in __get_log_header() [all …]
|
D | lops.c | 426 struct gfs2_log_header_host *head, in gfs2_jhead_pg_srch() argument 437 if (lh.lh_sequence >= head->lh_sequence) in gfs2_jhead_pg_srch() 438 *head = lh; in gfs2_jhead_pg_srch() 470 struct gfs2_log_header_host *head, in gfs2_jhead_process_page() argument 482 *done = gfs2_jhead_pg_srch(jd, head, page); in gfs2_jhead_process_page() 513 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, in gfs2_find_jhead() argument 530 memset(head, 0, sizeof(*head)); in gfs2_find_jhead() 586 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead() 597 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead() 740 struct list_head *head; in buf_lo_after_commit() local [all …]
|
/fs/ |
D | mbcache.c | 79 struct hlist_bl_head *head; in mb_cache_entry_create() local 106 head = mb_cache_entry_head(cache, key); in mb_cache_entry_create() 107 hlist_bl_lock(head); in mb_cache_entry_create() 108 hlist_bl_for_each_entry(dup, dup_node, head, e_hash_list) { in mb_cache_entry_create() 110 hlist_bl_unlock(head); in mb_cache_entry_create() 115 hlist_bl_add_head(&entry->e_hash_list, head); in mb_cache_entry_create() 116 hlist_bl_unlock(head); in mb_cache_entry_create() 129 struct hlist_bl_head *head; in __mb_cache_entry_free() local 131 head = mb_cache_entry_head(cache, entry->e_key); in __mb_cache_entry_free() 132 hlist_bl_lock(head); in __mb_cache_entry_free() [all …]
|
D | buffer.c | 89 struct buffer_head *head, *bh; in buffer_check_dirty_writeback() local 101 head = page_buffers(page); in buffer_check_dirty_writeback() 102 bh = head; in buffer_check_dirty_writeback() 111 } while (bh != head); in buffer_check_dirty_writeback() 196 struct buffer_head *head; in __find_get_block_slow() local 209 head = page_buffers(page); in __find_get_block_slow() 210 bh = head; in __find_get_block_slow() 220 } while (bh != head); in __find_get_block_slow() 626 struct buffer_head *head = page_buffers(page); in __set_page_dirty_buffers() local 627 struct buffer_head *bh = head; in __set_page_dirty_buffers() [all …]
|
D | pipe.c | 222 unsigned int head = READ_ONCE(pipe->head); in pipe_readable() local 226 return !pipe_empty(head, tail) || !writers; in pipe_readable() 253 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read() 256 unsigned int head = smp_load_acquire(&pipe->head); in pipe_read() local 284 if (!pipe_empty(head, tail)) { in pipe_read() 336 if (!pipe_empty(head, tail)) /* More to do? */ in pipe_read() 381 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read() 384 if (pipe_empty(pipe->head, pipe->tail)) in pipe_read() 406 unsigned int head = READ_ONCE(pipe->head); in pipe_writable() local 410 return !pipe_full(head, tail, max_usage) || in pipe_writable() [all …]
|
D | splice.c | 187 unsigned int head = pipe->head; in splice_to_pipe() local 200 while (!pipe_full(head, tail, pipe->max_usage)) { in splice_to_pipe() 201 struct pipe_buffer *buf = &pipe->bufs[head & mask]; in splice_to_pipe() 210 head++; in splice_to_pipe() 211 pipe->head = head; in splice_to_pipe() 232 unsigned int head = pipe->head; in add_to_pipe() local 240 } else if (pipe_full(head, tail, pipe->max_usage)) { in add_to_pipe() 243 pipe->bufs[head & mask] = *buf; in add_to_pipe() 244 pipe->head = head + 1; in add_to_pipe() 308 i_head = to.head; in generic_file_splice_read() [all …]
|
D | seq_file.c | 919 struct list_head *seq_list_start(struct list_head *head, loff_t pos) in seq_list_start() argument 923 list_for_each(lh, head) in seq_list_start() 931 struct list_head *seq_list_start_head(struct list_head *head, loff_t pos) in seq_list_start_head() argument 934 return head; in seq_list_start_head() 936 return seq_list_start(head, pos - 1); in seq_list_start_head() 940 struct list_head *seq_list_next(void *v, struct list_head *head, loff_t *ppos) in seq_list_next() argument 946 return lh == head ? NULL : lh; in seq_list_next() 950 struct list_head *seq_list_start_rcu(struct list_head *head, loff_t pos) in seq_list_start_rcu() argument 954 list_for_each_rcu(lh, head) in seq_list_start_rcu() 962 struct list_head *seq_list_start_head_rcu(struct list_head *head, loff_t pos) in seq_list_start_head_rcu() argument [all …]
|
D | aio.c | 59 unsigned head; /* Written to by userland or under ring_lock member 182 struct wait_queue_head *head; member 550 ring->head = ring->tail = 0; in aio_setup_ring() 960 static void refill_reqs_available(struct kioctx *ctx, unsigned head, in refill_reqs_available() argument 966 head %= ctx->nr_events; in refill_reqs_available() 967 if (head <= tail) in refill_reqs_available() 968 events_in_ring = tail - head; in refill_reqs_available() 970 events_in_ring = ctx->nr_events - (head - tail); in refill_reqs_available() 994 unsigned head; in user_refill_reqs_available() local 1006 head = ring->head; in user_refill_reqs_available() [all …]
|
/fs/hfsplus/ |
D | btree.c | 136 struct hfs_btree_header_rec *head; in hfs_btree_open() local 166 head = (struct hfs_btree_header_rec *)(kmap(page) + in hfs_btree_open() 168 tree->root = be32_to_cpu(head->root); in hfs_btree_open() 169 tree->leaf_count = be32_to_cpu(head->leaf_count); in hfs_btree_open() 170 tree->leaf_head = be32_to_cpu(head->leaf_head); in hfs_btree_open() 171 tree->leaf_tail = be32_to_cpu(head->leaf_tail); in hfs_btree_open() 172 tree->node_count = be32_to_cpu(head->node_count); in hfs_btree_open() 173 tree->free_nodes = be32_to_cpu(head->free_nodes); in hfs_btree_open() 174 tree->attributes = be32_to_cpu(head->attributes); in hfs_btree_open() 175 tree->node_size = be16_to_cpu(head->node_size); in hfs_btree_open() [all …]
|
/fs/9p/ |
D | vfs_dir.c | 40 int head; member 108 if (rdir->tail == rdir->head) { in v9fs_dir_readdir() 119 rdir->head = 0; in v9fs_dir_readdir() 122 while (rdir->head < rdir->tail) { in v9fs_dir_readdir() 123 err = p9stat_read(fid->clnt, rdir->buf + rdir->head, in v9fs_dir_readdir() 124 rdir->tail - rdir->head, &st); in v9fs_dir_readdir() 136 rdir->head += err; in v9fs_dir_readdir() 166 if (rdir->tail == rdir->head) { in v9fs_dir_readdir_dotl() 172 rdir->head = 0; in v9fs_dir_readdir_dotl() 176 while (rdir->head < rdir->tail) { in v9fs_dir_readdir_dotl() [all …]
|
/fs/nilfs2/ |
D | segbuf.h | 85 #define NILFS_LIST_SEGBUF(head) \ argument 86 list_entry((head), struct nilfs_segment_buffer, sb_list) 89 #define NILFS_LAST_SEGBUF(head) NILFS_LIST_SEGBUF((head)->prev) argument 90 #define NILFS_FIRST_SEGBUF(head) NILFS_LIST_SEGBUF((head)->next) argument 91 #define NILFS_SEGBUF_IS_LAST(segbuf, head) ((segbuf)->sb_list.next == (head)) argument 97 #define NILFS_SEGBUF_FIRST_BH(head) \ argument 98 (list_entry((head)->next, struct buffer_head, b_assoc_buffers)) 102 #define NILFS_SEGBUF_BH_IS_LAST(bh, head) ((bh)->b_assoc_buffers.next == head) argument
|
D | page.c | 142 struct buffer_head *bh, *head; in nilfs_page_buffers_clean() local 144 bh = head = page_buffers(page); in nilfs_page_buffers_clean() 149 } while (bh != head); in nilfs_page_buffers_clean() 172 struct buffer_head *bh, *head; in nilfs_page_bug() local 175 bh = head = page_buffers(page); in nilfs_page_bug() 182 } while (bh != head); in nilfs_page_bug() 408 struct buffer_head *bh, *head; in nilfs_clear_dirty_page() local 414 bh = head = page_buffers(page); in nilfs_clear_dirty_page() 424 } while (bh = bh->b_this_page, bh != head); in nilfs_clear_dirty_page() 434 struct buffer_head *bh, *head; in nilfs_page_count_clean_buffers() local [all …]
|
/fs/hfs/ |
D | btree.c | 22 struct hfs_btree_header_rec *head; in hfs_btree_open() local 83 head = (struct hfs_btree_header_rec *)(kmap(page) + sizeof(struct hfs_bnode_desc)); in hfs_btree_open() 84 tree->root = be32_to_cpu(head->root); in hfs_btree_open() 85 tree->leaf_count = be32_to_cpu(head->leaf_count); in hfs_btree_open() 86 tree->leaf_head = be32_to_cpu(head->leaf_head); in hfs_btree_open() 87 tree->leaf_tail = be32_to_cpu(head->leaf_tail); in hfs_btree_open() 88 tree->node_count = be32_to_cpu(head->node_count); in hfs_btree_open() 89 tree->free_nodes = be32_to_cpu(head->free_nodes); in hfs_btree_open() 90 tree->attributes = be32_to_cpu(head->attributes); in hfs_btree_open() 91 tree->node_size = be16_to_cpu(head->node_size); in hfs_btree_open() [all …]
|
/fs/nfs/ |
D | write.c | 246 struct nfs_page *req, *head; in nfs_find_and_lock_page_request() local 253 head = nfs_page_group_lock_head(req); in nfs_find_and_lock_page_request() 254 if (head != req) in nfs_find_and_lock_page_request() 256 if (IS_ERR(head)) in nfs_find_and_lock_page_request() 257 return head; in nfs_find_and_lock_page_request() 258 ret = nfs_cancel_remove_inode(head, inode); in nfs_find_and_lock_page_request() 260 nfs_unlock_and_release_request(head); in nfs_find_and_lock_page_request() 264 if (head == nfs_page_private_request(page)) in nfs_find_and_lock_page_request() 268 nfs_unlock_and_release_request(head); in nfs_find_and_lock_page_request() 270 return head; in nfs_find_and_lock_page_request() [all …]
|
D | pagelist.c | 158 struct nfs_page *head = req->wb_head; in nfs_page_group_lock_head() local 160 while (!nfs_lock_request(head)) { in nfs_page_group_lock_head() 161 int ret = nfs_wait_on_request(head); in nfs_page_group_lock_head() 165 if (head != req) in nfs_page_group_lock_head() 166 kref_get(&head->wb_kref); in nfs_page_group_lock_head() 167 return head; in nfs_page_group_lock_head() 179 nfs_unroll_locks(struct nfs_page *head, struct nfs_page *req) in nfs_unroll_locks() argument 184 for (tmp = head->wb_this_page ; tmp != req; tmp = tmp->wb_this_page) { in nfs_unroll_locks() 201 nfs_page_group_lock_subreq(struct nfs_page *head, struct nfs_page *subreq) in nfs_page_group_lock_subreq() argument 208 nfs_page_group_unlock(head); in nfs_page_group_lock_subreq() [all …]
|
/fs/btrfs/ |
D | delayed-ref.c | 398 struct btrfs_delayed_ref_head *head) in btrfs_delayed_ref_lock() argument 401 if (mutex_trylock(&head->mutex)) in btrfs_delayed_ref_lock() 404 refcount_inc(&head->refs); in btrfs_delayed_ref_lock() 407 mutex_lock(&head->mutex); in btrfs_delayed_ref_lock() 409 if (RB_EMPTY_NODE(&head->href_node)) { in btrfs_delayed_ref_lock() 410 mutex_unlock(&head->mutex); in btrfs_delayed_ref_lock() 411 btrfs_put_delayed_ref_head(head); in btrfs_delayed_ref_lock() 414 btrfs_put_delayed_ref_head(head); in btrfs_delayed_ref_lock() 420 struct btrfs_delayed_ref_head *head, in drop_delayed_ref() argument 423 lockdep_assert_held(&head->lock); in drop_delayed_ref() [all …]
|
D | delayed-ref.h | 340 static inline void btrfs_put_delayed_ref_head(struct btrfs_delayed_ref_head *head) in btrfs_put_delayed_ref_head() argument 342 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head() 343 kmem_cache_free(btrfs_delayed_ref_head_cachep, head); in btrfs_put_delayed_ref_head() 357 struct btrfs_delayed_ref_head *head); 363 struct btrfs_delayed_ref_head *head); 364 static inline void btrfs_delayed_ref_unlock(struct btrfs_delayed_ref_head *head) in btrfs_delayed_ref_unlock() argument 366 mutex_unlock(&head->mutex); in btrfs_delayed_ref_unlock() 369 struct btrfs_delayed_ref_head *head);
|
D | extent-tree.c | 119 struct btrfs_delayed_ref_head *head; in btrfs_lookup_extent_info() local 203 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); in btrfs_lookup_extent_info() 204 if (head) { in btrfs_lookup_extent_info() 205 if (!mutex_trylock(&head->mutex)) { in btrfs_lookup_extent_info() 206 refcount_inc(&head->refs); in btrfs_lookup_extent_info() 215 mutex_lock(&head->mutex); in btrfs_lookup_extent_info() 216 mutex_unlock(&head->mutex); in btrfs_lookup_extent_info() 217 btrfs_put_delayed_ref_head(head); in btrfs_lookup_extent_info() 220 spin_lock(&head->lock); in btrfs_lookup_extent_info() 221 if (head->extent_op && head->extent_op->update_flags) in btrfs_lookup_extent_info() [all …]
|
/fs/befs/ |
D | btree.c | 82 befs_host_btree_nodehead head; /* head of node converted to cpu byteorder */ member 214 node->head.left = fs64_to_cpu(sb, node->od_node->left); in befs_bt_read_node() 215 node->head.right = fs64_to_cpu(sb, node->od_node->right); in befs_bt_read_node() 216 node->head.overflow = fs64_to_cpu(sb, node->od_node->overflow); in befs_bt_read_node() 217 node->head.all_key_count = in befs_bt_read_node() 219 node->head.all_key_length = in befs_bt_read_node() 283 node_off = this_node->head.overflow; in befs_btree_find() 345 last = node->head.all_key_count - 1; in befs_find_key() 459 while (key_sum + this_node->head.all_key_count <= key_no) { in befs_btree_read() 462 if (this_node->head.right == BEFS_BT_INVAL) { in befs_btree_read() [all …]
|
/fs/erofs/ |
D | namei.c | 50 int head, back; in find_target_dirent() local 55 head = 1; in find_target_dirent() 59 while (head <= back) { in find_target_dirent() 60 const int mid = head + (back - head) / 2; in find_target_dirent() 78 head = mid + 1; in find_target_dirent() 94 int head, back; in find_target_block_classic() local 99 head = 0; in find_target_block_classic() 102 while (head <= back) { in find_target_block_classic() 103 const int mid = head + (back - head) / 2; in find_target_block_classic() 144 head = mid + 1; in find_target_block_classic()
|
/fs/xfs/ |
D | xfs_fsmap.c | 158 struct xfs_fsmap_head *head; member 236 rec = &info->fsmap_recs[info->head->fmh_entries++]; in xfs_getfsmap_format() 271 if (info->head->fmh_count == 0) { in xfs_getfsmap_helper() 272 if (info->head->fmh_entries == UINT_MAX) in xfs_getfsmap_helper() 276 info->head->fmh_entries++; in xfs_getfsmap_helper() 281 info->head->fmh_entries++; in xfs_getfsmap_helper() 295 if (info->head->fmh_entries >= info->head->fmh_count) in xfs_getfsmap_helper() 311 if (info->head->fmh_entries >= info->head->fmh_count) in xfs_getfsmap_helper() 850 struct xfs_fsmap_head *head, in xfs_getfsmap() argument 861 if (head->fmh_iflags & ~FMH_IF_VALID) in xfs_getfsmap() [all …]
|
D | xfs_log.c | 36 atomic64_t *head); 96 atomic64_t *head, in xlog_grant_sub_space() argument 99 int64_t head_val = atomic64_read(head); in xlog_grant_sub_space() 115 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_sub_space() 122 atomic64_t *head, in xlog_grant_add_space() argument 125 int64_t head_val = atomic64_read(head); in xlog_grant_add_space() 144 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_add_space() 150 struct xlog_grant_head *head) in xlog_grant_head_init() argument 152 xlog_assign_grant_head(&head->grant, 1, 0); in xlog_grant_head_init() 153 INIT_LIST_HEAD(&head->waiters); in xlog_grant_head_init() [all …]
|
/fs/ext4/ |
D | page-io.c | 108 struct buffer_head *bh, *head; in ext4_finish_bio() local 123 bh = head = page_buffers(page); in ext4_finish_bio() 128 spin_lock_irqsave(&head->b_uptodate_lock, flags); in ext4_finish_bio() 141 } while ((bh = bh->b_this_page) != head); in ext4_finish_bio() 142 spin_unlock_irqrestore(&head->b_uptodate_lock, flags); in ext4_finish_bio() 198 static void dump_completed_IO(struct inode *inode, struct list_head *head) in dump_completed_IO() argument 204 if (list_empty(head)) in dump_completed_IO() 208 list_for_each_entry(io_end, head, list) { in dump_completed_IO() 241 struct list_head *head) in ext4_do_flush_completed_IO() argument 250 dump_completed_IO(inode, head); in ext4_do_flush_completed_IO() [all …]
|
D | fsmap.c | 629 int ext4_getfsmap(struct super_block *sb, struct ext4_fsmap_head *head, in ext4_getfsmap() argument 638 if (head->fmh_iflags & ~FMH_IF_VALID) in ext4_getfsmap() 640 if (!ext4_getfsmap_is_valid_device(sb, &head->fmh_keys[0]) || in ext4_getfsmap() 641 !ext4_getfsmap_is_valid_device(sb, &head->fmh_keys[1])) in ext4_getfsmap() 644 head->fmh_entries = 0; in ext4_getfsmap() 670 dkeys[0] = head->fmh_keys[0]; in ext4_getfsmap() 676 if (!ext4_getfsmap_check_keys(dkeys, &head->fmh_keys[1])) in ext4_getfsmap() 679 info.gfi_next_fsblk = head->fmh_keys[0].fmr_physical + in ext4_getfsmap() 680 head->fmh_keys[0].fmr_length; in ext4_getfsmap() 683 info.gfi_head = head; in ext4_getfsmap() [all …]
|