/fs/proc/ |
D | proc_sysctl.c | 51 static bool is_empty_dir(struct ctl_table_header *head) in is_empty_dir() argument 53 return head->ctl_table[0].child == sysctl_mount_point; in is_empty_dir() 99 static int insert_links(struct ctl_table_header *head); 123 struct ctl_table_header *head; in find_entry() local 134 head = ctl_node->header; in find_entry() 135 entry = &head->ctl_table[ctl_node - head->node]; in find_entry() 144 *phead = head; in find_entry() 151 static int insert_entry(struct ctl_table_header *head, struct ctl_table *entry) in insert_entry() argument 153 struct rb_node *node = &head->node[entry - head->ctl_table].node; in insert_entry() 154 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 60 list_for_each_entry(iter, head, rr_list) { in gfs2_revoke_add() 78 list_add(&rr->rr_list, head); in gfs2_revoke_add() 108 struct list_head *head = &jd->jd_revoke_list; in gfs2_revoke_clean() local 111 while (!list_empty(head)) { in gfs2_revoke_clean() 112 rr = list_first_entry(head, struct gfs2_revoke_replay, rr_list); in gfs2_revoke_clean() 119 unsigned int blkno, struct gfs2_log_header_host *head) in __get_log_header() argument 140 head->lh_sequence = be64_to_cpu(lh->lh_sequence); in __get_log_header() 141 head->lh_flags = be32_to_cpu(lh->lh_flags); in __get_log_header() 142 head->lh_tail = be32_to_cpu(lh->lh_tail); in __get_log_header() [all …]
|
D | lops.c | 425 struct gfs2_log_header_host *head, in gfs2_jhead_pg_srch() argument 436 if (lh.lh_sequence >= head->lh_sequence) in gfs2_jhead_pg_srch() 437 *head = lh; in gfs2_jhead_pg_srch() 469 struct gfs2_log_header_host *head, in gfs2_jhead_process_page() argument 481 *done = gfs2_jhead_pg_srch(jd, head, &folio->page); in gfs2_jhead_process_page() 510 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, in gfs2_find_jhead() argument 527 memset(head, 0, sizeof(*head)); in gfs2_find_jhead() 583 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead() 594 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead() 737 struct list_head *head; in buf_lo_after_commit() local [all …]
|
D | aops.c | 43 struct buffer_head *head = page_buffers(page); in gfs2_page_add_databufs() local 44 unsigned int bsize = head->b_size; in gfs2_page_add_databufs() 49 for (bh = head, start = 0; bh != head || !start; in gfs2_page_add_databufs() 640 struct buffer_head *bh, *head; in gfs2_invalidate_folio() local 646 head = folio_buffers(folio); in gfs2_invalidate_folio() 647 if (!head) in gfs2_invalidate_folio() 650 bh = head; in gfs2_invalidate_folio() 659 } while (bh != head); in gfs2_invalidate_folio() 680 struct buffer_head *bh, *head; in gfs2_release_folio() local 683 head = folio_buffers(folio); in gfs2_release_folio() [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 | pipe.c | 223 unsigned int head = READ_ONCE(pipe->head); in pipe_readable() local 227 return !pipe_empty(head, tail) || !writers; in pipe_readable() 254 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read() 257 unsigned int head = smp_load_acquire(&pipe->head); in pipe_read() local 285 if (!pipe_empty(head, tail)) { in pipe_read() 337 if (!pipe_empty(head, tail)) /* More to do? */ in pipe_read() 382 was_full = pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_read() 385 if (pipe_empty(pipe->head, pipe->tail)) in pipe_read() 407 unsigned int head = READ_ONCE(pipe->head); in pipe_writable() local 411 return !pipe_full(head, tail, max_usage) || in pipe_writable() [all …]
|
D | buffer.c | 90 struct buffer_head *head, *bh; in buffer_check_dirty_writeback() local 96 head = folio_buffers(folio); in buffer_check_dirty_writeback() 97 if (!head) in buffer_check_dirty_writeback() 103 bh = head; in buffer_check_dirty_writeback() 112 } while (bh != head); in buffer_check_dirty_writeback() 197 struct buffer_head *head; in __find_get_block_slow() local 210 head = page_buffers(page); in __find_get_block_slow() 211 bh = head; in __find_get_block_slow() 221 } while (bh != head); in __find_get_block_slow() 661 struct buffer_head *head; in block_dirty_folio() local [all …]
|
D | seq_file.c | 903 struct list_head *seq_list_start(struct list_head *head, loff_t pos) in seq_list_start() argument 907 list_for_each(lh, head) in seq_list_start() 915 struct list_head *seq_list_start_head(struct list_head *head, loff_t pos) in seq_list_start_head() argument 918 return head; in seq_list_start_head() 920 return seq_list_start(head, pos - 1); in seq_list_start_head() 924 struct list_head *seq_list_next(void *v, struct list_head *head, loff_t *ppos) in seq_list_next() argument 930 return lh == head ? NULL : lh; in seq_list_next() 934 struct list_head *seq_list_start_rcu(struct list_head *head, loff_t pos) in seq_list_start_rcu() argument 938 list_for_each_rcu(lh, head) in seq_list_start_rcu() 946 struct list_head *seq_list_start_head_rcu(struct list_head *head, loff_t pos) in seq_list_start_head_rcu() argument [all …]
|
D | splice.c | 186 unsigned int head = pipe->head; in splice_to_pipe() local 199 while (!pipe_full(head, tail, pipe->max_usage)) { in splice_to_pipe() 200 struct pipe_buffer *buf = &pipe->bufs[head & mask]; in splice_to_pipe() 209 head++; in splice_to_pipe() 210 pipe->head = head; in splice_to_pipe() 231 unsigned int head = pipe->head; in add_to_pipe() local 239 } else if (pipe_full(head, tail, pipe->max_usage)) { in add_to_pipe() 242 pipe->bufs[head & mask] = *buf; in add_to_pipe() 243 pipe->head = head + 1; in add_to_pipe() 357 pipe_occupancy(pipe->head, pipe->tail) > 1) in pipe_to_sendpage() [all …]
|
D | aio.c | 59 unsigned head; /* Written to by userland or under ring_lock member 182 struct wait_queue_head *head; member 577 ring->head = ring->tail = 0; in aio_setup_ring() 990 static void refill_reqs_available(struct kioctx *ctx, unsigned head, in refill_reqs_available() argument 996 head %= ctx->nr_events; in refill_reqs_available() 997 if (head <= tail) in refill_reqs_available() 998 events_in_ring = tail - head; in refill_reqs_available() 1000 events_in_ring = ctx->nr_events - (head - tail); in refill_reqs_available() 1024 unsigned head; in user_refill_reqs_available() local 1036 head = ring->head; in user_refill_reqs_available() [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_local_page(page) + in hfs_btree_open() 85 tree->root = be32_to_cpu(head->root); in hfs_btree_open() 86 tree->leaf_count = be32_to_cpu(head->leaf_count); in hfs_btree_open() 87 tree->leaf_head = be32_to_cpu(head->leaf_head); in hfs_btree_open() 88 tree->leaf_tail = be32_to_cpu(head->leaf_tail); in hfs_btree_open() 89 tree->node_count = be32_to_cpu(head->node_count); in hfs_btree_open() 90 tree->free_nodes = be32_to_cpu(head->free_nodes); in hfs_btree_open() 91 tree->attributes = be32_to_cpu(head->attributes); in hfs_btree_open() 92 tree->node_size = be16_to_cpu(head->node_size); in hfs_btree_open() [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_local_page(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/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/9p/ |
D | vfs_dir.c | 39 int head; member 108 if (rdir->tail == rdir->head) { in v9fs_dir_readdir() 120 rdir->head = 0; in v9fs_dir_readdir() 123 while (rdir->head < rdir->tail) { in v9fs_dir_readdir() 124 err = p9stat_read(fid->clnt, rdir->buf + rdir->head, in v9fs_dir_readdir() 125 rdir->tail - rdir->head, &st); in v9fs_dir_readdir() 137 rdir->head += err; in v9fs_dir_readdir() 167 if (rdir->tail == rdir->head) { in v9fs_dir_readdir_dotl() 173 rdir->head = 0; in v9fs_dir_readdir_dotl() 177 while (rdir->head < rdir->tail) { in v9fs_dir_readdir_dotl() [all …]
|
/fs/nfs/ |
D | write.c | 245 struct nfs_page *req, *head; in nfs_find_and_lock_page_request() local 252 head = nfs_page_group_lock_head(req); in nfs_find_and_lock_page_request() 253 if (head != req) in nfs_find_and_lock_page_request() 255 if (IS_ERR(head)) in nfs_find_and_lock_page_request() 256 return head; in nfs_find_and_lock_page_request() 257 ret = nfs_cancel_remove_inode(head, inode); in nfs_find_and_lock_page_request() 259 nfs_unlock_and_release_request(head); in nfs_find_and_lock_page_request() 263 if (head == nfs_page_private_request(page)) in nfs_find_and_lock_page_request() 267 nfs_unlock_and_release_request(head); in nfs_find_and_lock_page_request() 269 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 | 412 struct btrfs_delayed_ref_head *head) in btrfs_delayed_ref_lock() argument 415 if (mutex_trylock(&head->mutex)) in btrfs_delayed_ref_lock() 418 refcount_inc(&head->refs); in btrfs_delayed_ref_lock() 421 mutex_lock(&head->mutex); in btrfs_delayed_ref_lock() 423 if (RB_EMPTY_NODE(&head->href_node)) { in btrfs_delayed_ref_lock() 424 mutex_unlock(&head->mutex); in btrfs_delayed_ref_lock() 425 btrfs_put_delayed_ref_head(head); in btrfs_delayed_ref_lock() 428 btrfs_put_delayed_ref_head(head); in btrfs_delayed_ref_lock() 434 struct btrfs_delayed_ref_head *head, in drop_delayed_ref() argument 437 lockdep_assert_held(&head->lock); in drop_delayed_ref() [all …]
|
D | extent-tree.c | 121 struct btrfs_delayed_ref_head *head; in btrfs_lookup_extent_info() local 206 head = btrfs_find_delayed_ref_head(delayed_refs, bytenr); in btrfs_lookup_extent_info() 207 if (head) { in btrfs_lookup_extent_info() 208 if (!mutex_trylock(&head->mutex)) { in btrfs_lookup_extent_info() 209 refcount_inc(&head->refs); in btrfs_lookup_extent_info() 218 mutex_lock(&head->mutex); in btrfs_lookup_extent_info() 219 mutex_unlock(&head->mutex); in btrfs_lookup_extent_info() 220 btrfs_put_delayed_ref_head(head); in btrfs_lookup_extent_info() 223 spin_lock(&head->lock); in btrfs_lookup_extent_info() 224 if (head->extent_op && head->extent_op->update_flags) in btrfs_lookup_extent_info() [all …]
|
D | delayed-ref.h | 345 static inline void btrfs_put_delayed_ref_head(struct btrfs_delayed_ref_head *head) in btrfs_put_delayed_ref_head() argument 347 if (refcount_dec_and_test(&head->refs)) in btrfs_put_delayed_ref_head() 348 kmem_cache_free(btrfs_delayed_ref_head_cachep, head); in btrfs_put_delayed_ref_head() 362 struct btrfs_delayed_ref_head *head); 368 struct btrfs_delayed_ref_head *head); 369 static inline void btrfs_delayed_ref_unlock(struct btrfs_delayed_ref_head *head) in btrfs_delayed_ref_unlock() argument 371 mutex_unlock(&head->mutex); in btrfs_delayed_ref_unlock() 374 struct btrfs_delayed_ref_head *head);
|
/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() 93 int head = 0, back = erofs_iblks(dir) - 1; in erofs_find_target_block() local 97 while (head <= back) { in erofs_find_target_block() 98 const int mid = head + (back - head) / 2; in erofs_find_target_block() 146 head = mid + 1; in erofs_find_target_block()
|
/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() 849 struct xfs_fsmap_head *head, in xfs_getfsmap() argument 860 if (head->fmh_iflags & ~FMH_IF_VALID) in xfs_getfsmap() [all …]
|
D | xfs_log.c | 36 atomic64_t *head); 147 atomic64_t *head, in xlog_grant_sub_space() argument 150 int64_t head_val = atomic64_read(head); in xlog_grant_sub_space() 166 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_sub_space() 173 atomic64_t *head, in xlog_grant_add_space() argument 176 int64_t head_val = atomic64_read(head); in xlog_grant_add_space() 195 head_val = atomic64_cmpxchg(head, old, new); in xlog_grant_add_space() 201 struct xlog_grant_head *head) in xlog_grant_head_init() argument 203 xlog_assign_grant_head(&head->grant, 1, 0); in xlog_grant_head_init() 204 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 …]
|