Lines Matching refs:p
71 struct ovl_cache_entry *p = ovl_cache_entry_from_node(node); in ovl_cache_entry_find() local
73 cmp = strncmp(name, p->name, len); in ovl_cache_entry_find()
75 node = p->node.rb_right; in ovl_cache_entry_find()
76 else if (cmp < 0 || len < p->len) in ovl_cache_entry_find()
77 node = p->node.rb_left; in ovl_cache_entry_find()
79 return p; in ovl_cache_entry_find()
89 struct ovl_cache_entry *p; in ovl_cache_entry_new() local
92 p = kmalloc(size, GFP_KERNEL); in ovl_cache_entry_new()
93 if (!p) in ovl_cache_entry_new()
96 memcpy(p->name, name, len); in ovl_cache_entry_new()
97 p->name[len] = '\0'; in ovl_cache_entry_new()
98 p->len = len; in ovl_cache_entry_new()
99 p->type = d_type; in ovl_cache_entry_new()
100 p->ino = ino; in ovl_cache_entry_new()
101 p->is_whiteout = false; in ovl_cache_entry_new()
104 p->next_maybe_whiteout = rdd->first_maybe_whiteout; in ovl_cache_entry_new()
105 rdd->first_maybe_whiteout = p; in ovl_cache_entry_new()
107 return p; in ovl_cache_entry_new()
116 struct ovl_cache_entry *p; in ovl_cache_entry_add_rb() local
133 p = ovl_cache_entry_new(rdd, name, len, ino, d_type); in ovl_cache_entry_add_rb()
134 if (p == NULL) in ovl_cache_entry_add_rb()
137 list_add_tail(&p->l_node, rdd->list); in ovl_cache_entry_add_rb()
138 rb_link_node(&p->node, parent, newp); in ovl_cache_entry_add_rb()
139 rb_insert_color(&p->node, &rdd->root); in ovl_cache_entry_add_rb()
148 struct ovl_cache_entry *p; in ovl_fill_lowest() local
150 p = ovl_cache_entry_find(&rdd->root, name, namelen); in ovl_fill_lowest()
151 if (p) { in ovl_fill_lowest()
152 list_move_tail(&p->l_node, &rdd->middle); in ovl_fill_lowest()
154 p = ovl_cache_entry_new(rdd, name, namelen, ino, d_type); in ovl_fill_lowest()
155 if (p == NULL) in ovl_fill_lowest()
158 list_add_tail(&p->l_node, &rdd->middle); in ovl_fill_lowest()
166 struct ovl_cache_entry *p; in ovl_cache_free() local
169 list_for_each_entry_safe(p, n, list, l_node) in ovl_cache_free()
170 kfree(p); in ovl_cache_free()
207 struct ovl_cache_entry *p; in ovl_check_whiteouts() local
216 p = rdd->first_maybe_whiteout; in ovl_check_whiteouts()
217 rdd->first_maybe_whiteout = p->next_maybe_whiteout; in ovl_check_whiteouts()
218 dentry = lookup_one_len(p->name, dir, p->len); in ovl_check_whiteouts()
220 p->is_whiteout = ovl_is_whiteout(dentry); in ovl_check_whiteouts()
312 struct list_head *p; in ovl_seek_cursor() local
315 list_for_each(p, &od->cache->entries) { in ovl_seek_cursor()
321 od->cursor = p; in ovl_seek_cursor()
360 struct ovl_cache_entry *p; in ovl_iterate() local
380 p = list_entry(od->cursor, struct ovl_cache_entry, l_node); in ovl_iterate()
381 if (!p->is_whiteout) in ovl_iterate()
382 if (!dir_emit(ctx, p->name, p->len, p->ino, p->type)) in ovl_iterate()
384 od->cursor = p->l_node.next; in ovl_iterate()
528 struct ovl_cache_entry *p; in ovl_check_empty_dir() local
536 list_for_each_entry(p, list, l_node) { in ovl_check_empty_dir()
537 if (p->is_whiteout) in ovl_check_empty_dir()
540 if (p->name[0] == '.') { in ovl_check_empty_dir()
541 if (p->len == 1) in ovl_check_empty_dir()
543 if (p->len == 2 && p->name[1] == '.') in ovl_check_empty_dir()
555 struct ovl_cache_entry *p; in ovl_cleanup_whiteouts() local
558 list_for_each_entry(p, list, l_node) { in ovl_cleanup_whiteouts()
561 if (!p->is_whiteout) in ovl_cleanup_whiteouts()
564 dentry = lookup_one_len(p->name, upper, p->len); in ovl_cleanup_whiteouts()
567 upper->d_name.name, p->len, p->name, in ovl_cleanup_whiteouts()
619 struct ovl_cache_entry *p; in ovl_workdir_cleanup_recurse() local
633 list_for_each_entry(p, &list, l_node) { in ovl_workdir_cleanup_recurse()
636 if (p->name[0] == '.') { in ovl_workdir_cleanup_recurse()
637 if (p->len == 1) in ovl_workdir_cleanup_recurse()
639 if (p->len == 2 && p->name[1] == '.') in ovl_workdir_cleanup_recurse()
642 dentry = lookup_one_len(p->name, path->dentry, p->len); in ovl_workdir_cleanup_recurse()