• Home
  • Raw
  • Download

Lines Matching refs:p

99 		struct ovl_cache_entry *p = ovl_cache_entry_from_node(node);  in ovl_cache_entry_find()  local
101 cmp = strncmp(name, p->name, len); in ovl_cache_entry_find()
103 node = p->node.rb_right; in ovl_cache_entry_find()
104 else if (cmp < 0 || len < p->len) in ovl_cache_entry_find()
105 node = p->node.rb_left; in ovl_cache_entry_find()
107 return p; in ovl_cache_entry_find()
114 struct ovl_cache_entry *p) in ovl_calc_d_ino() argument
125 if (strcmp(p->name, "..") == 0) in ovl_calc_d_ino()
136 if ((p->name[0] == '.' && p->len == 1) || in ovl_calc_d_ino()
147 struct ovl_cache_entry *p; in ovl_cache_entry_new() local
150 p = kmalloc(size, GFP_KERNEL); in ovl_cache_entry_new()
151 if (!p) in ovl_cache_entry_new()
154 memcpy(p->name, name, len); in ovl_cache_entry_new()
155 p->name[len] = '\0'; in ovl_cache_entry_new()
156 p->len = len; in ovl_cache_entry_new()
157 p->type = d_type; in ovl_cache_entry_new()
158 p->real_ino = ino; in ovl_cache_entry_new()
159 p->ino = ino; in ovl_cache_entry_new()
161 if (ovl_calc_d_ino(rdd, p)) in ovl_cache_entry_new()
162 p->ino = 0; in ovl_cache_entry_new()
163 p->is_upper = rdd->is_upper; in ovl_cache_entry_new()
164 p->is_whiteout = false; in ovl_cache_entry_new()
167 p->next_maybe_whiteout = rdd->first_maybe_whiteout; in ovl_cache_entry_new()
168 rdd->first_maybe_whiteout = p; in ovl_cache_entry_new()
170 return p; in ovl_cache_entry_new()
179 struct ovl_cache_entry *p; in ovl_cache_entry_add_rb() local
184 p = ovl_cache_entry_new(rdd, name, len, ino, d_type); in ovl_cache_entry_add_rb()
185 if (p == NULL) { in ovl_cache_entry_add_rb()
190 list_add_tail(&p->l_node, rdd->list); in ovl_cache_entry_add_rb()
191 rb_link_node(&p->node, parent, newp); in ovl_cache_entry_add_rb()
192 rb_insert_color(&p->node, rdd->root); in ovl_cache_entry_add_rb()
201 struct ovl_cache_entry *p; in ovl_fill_lowest() local
203 p = ovl_cache_entry_find(rdd->root, name, namelen); in ovl_fill_lowest()
204 if (p) { in ovl_fill_lowest()
205 list_move_tail(&p->l_node, &rdd->middle); in ovl_fill_lowest()
207 p = ovl_cache_entry_new(rdd, name, namelen, ino, d_type); in ovl_fill_lowest()
208 if (p == NULL) in ovl_fill_lowest()
211 list_add_tail(&p->l_node, &rdd->middle); in ovl_fill_lowest()
219 struct ovl_cache_entry *p; in ovl_cache_free() local
222 list_for_each_entry_safe(p, n, list, l_node) in ovl_cache_free()
223 kfree(p); in ovl_cache_free()
270 struct ovl_cache_entry *p; in ovl_check_whiteouts() local
279 p = rdd->first_maybe_whiteout; in ovl_check_whiteouts()
280 rdd->first_maybe_whiteout = p->next_maybe_whiteout; in ovl_check_whiteouts()
281 dentry = lookup_one_len(p->name, dir, p->len); in ovl_check_whiteouts()
283 p->is_whiteout = ovl_is_whiteout(dentry); in ovl_check_whiteouts()
381 struct list_head *p; in ovl_seek_cursor() local
384 list_for_each(p, &od->cache->entries) { in ovl_seek_cursor()
390 od->cursor = p; in ovl_seek_cursor()
458 static int ovl_cache_update_ino(struct path *path, struct ovl_cache_entry *p) in ovl_cache_update_ino() argument
464 u64 ino = p->real_ino; in ovl_cache_update_ino()
471 if (p->name[0] == '.') { in ovl_cache_update_ino()
472 if (p->len == 1) { in ovl_cache_update_ino()
476 if (p->len == 2 && p->name[1] == '.') { in ovl_cache_update_ino()
482 this = lookup_one_len(p->name, dir, p->len); in ovl_cache_update_ino()
485 p->is_whiteout = true; in ovl_cache_update_ino()
516 p->name, p->len, in ovl_cache_update_ino()
521 p->ino = ino; in ovl_cache_update_ino()
527 p->name, err); in ovl_cache_update_ino()
535 struct ovl_cache_entry *p; in ovl_fill_plain() local
540 p = ovl_cache_entry_new(rdd, name, namelen, ino, d_type); in ovl_fill_plain()
541 if (p == NULL) { in ovl_fill_plain()
545 list_add_tail(&p->l_node, rdd->list); in ovl_fill_plain()
555 struct ovl_cache_entry *p, *n; in ovl_dir_read_impure() local
570 list_for_each_entry_safe(p, n, list, l_node) { in ovl_dir_read_impure()
571 if (strcmp(p->name, ".") != 0 && in ovl_dir_read_impure()
572 strcmp(p->name, "..") != 0) { in ovl_dir_read_impure()
573 err = ovl_cache_update_ino(path, p); in ovl_dir_read_impure()
577 if (p->ino == p->real_ino) { in ovl_dir_read_impure()
578 list_del(&p->l_node); in ovl_dir_read_impure()
579 kfree(p); in ovl_dir_read_impure()
584 if (WARN_ON(ovl_cache_entry_find_link(p->name, p->len, in ovl_dir_read_impure()
588 rb_link_node(&p->node, parent, newp); in ovl_dir_read_impure()
589 rb_insert_color(&p->node, root); in ovl_dir_read_impure()
662 struct ovl_cache_entry *p; in ovl_fill_real() local
664 p = ovl_cache_entry_find(&rdt->cache->root, name, namelen); in ovl_fill_real()
665 if (p) in ovl_fill_real()
666 ino = p->ino; in ovl_fill_real()
736 struct ovl_cache_entry *p; in ovl_iterate() local
774 p = list_entry(od->cursor, struct ovl_cache_entry, l_node); in ovl_iterate()
775 if (!p->is_whiteout) { in ovl_iterate()
776 if (!p->ino) { in ovl_iterate()
777 err = ovl_cache_update_ino(&file->f_path, p); in ovl_iterate()
783 if (!p->is_whiteout) { in ovl_iterate()
784 if (!dir_emit(ctx, p->name, p->len, p->ino, p->type)) in ovl_iterate()
787 od->cursor = p->l_node.next; in ovl_iterate()
964 struct ovl_cache_entry *p, *n; in ovl_check_empty_dir() local
976 list_for_each_entry_safe(p, n, list, l_node) { in ovl_check_empty_dir()
981 if (p->is_whiteout) { in ovl_check_empty_dir()
982 if (p->is_upper) in ovl_check_empty_dir()
987 if (p->name[0] == '.') { in ovl_check_empty_dir()
988 if (p->len == 1) in ovl_check_empty_dir()
990 if (p->len == 2 && p->name[1] == '.') in ovl_check_empty_dir()
997 list_del(&p->l_node); in ovl_check_empty_dir()
998 kfree(p); in ovl_check_empty_dir()
1006 struct ovl_cache_entry *p; in ovl_cleanup_whiteouts() local
1009 list_for_each_entry(p, list, l_node) { in ovl_cleanup_whiteouts()
1012 if (WARN_ON(!p->is_whiteout || !p->is_upper)) in ovl_cleanup_whiteouts()
1015 dentry = lookup_one_len(p->name, upper, p->len); in ovl_cleanup_whiteouts()
1018 upper->d_name.name, p->len, p->name, in ovl_cleanup_whiteouts()
1073 struct ovl_cache_entry *p; in ovl_workdir_cleanup_recurse() local
1100 list_for_each_entry(p, &list, l_node) { in ovl_workdir_cleanup_recurse()
1103 if (p->name[0] == '.') { in ovl_workdir_cleanup_recurse()
1104 if (p->len == 1) in ovl_workdir_cleanup_recurse()
1106 if (p->len == 2 && p->name[1] == '.') in ovl_workdir_cleanup_recurse()
1110 p->name); in ovl_workdir_cleanup_recurse()
1114 dentry = lookup_one_len(p->name, path->dentry, p->len); in ovl_workdir_cleanup_recurse()
1161 struct ovl_cache_entry *p; in ovl_indexdir_cleanup() local
1175 list_for_each_entry(p, &list, l_node) { in ovl_indexdir_cleanup()
1176 if (p->name[0] == '.') { in ovl_indexdir_cleanup()
1177 if (p->len == 1) in ovl_indexdir_cleanup()
1179 if (p->len == 2 && p->name[1] == '.') in ovl_indexdir_cleanup()
1182 index = lookup_one_len(p->name, indexdir, p->len); in ovl_indexdir_cleanup()