Lines Matching full:path

137 				struct ext4_ext_path *path)  in ext4_ext_get_access()  argument
139 if (path->p_bh) { in ext4_ext_get_access()
140 /* path points to block */ in ext4_ext_get_access()
141 BUFFER_TRACE(path->p_bh, "get_write_access"); in ext4_ext_get_access()
142 return ext4_journal_get_write_access(handle, path->p_bh); in ext4_ext_get_access()
144 /* path points to leaf/index in inode body */ in ext4_ext_get_access()
157 struct ext4_ext_path *path) in __ext4_ext_dirty() argument
162 if (path->p_bh) { in __ext4_ext_dirty()
163 ext4_extent_block_csum_set(inode, ext_block_hdr(path->p_bh)); in __ext4_ext_dirty()
164 /* path points to block */ in __ext4_ext_dirty()
166 inode, path->p_bh); in __ext4_ext_dirty()
168 /* path points to leaf/index in inode body */ in __ext4_ext_dirty()
174 #define ext4_ext_dirty(handle, inode, path) \ argument
175 __ext4_ext_dirty(__func__, __LINE__, (handle), (inode), (path))
178 struct ext4_ext_path *path, in ext4_ext_find_goal() argument
181 if (path) { in ext4_ext_find_goal()
182 int depth = path->p_depth; in ext4_ext_find_goal()
202 ex = path[depth].p_ext; in ext4_ext_find_goal()
215 if (path[depth].p_bh) in ext4_ext_find_goal()
216 return path[depth].p_bh->b_blocknr; in ext4_ext_find_goal()
228 struct ext4_ext_path *path, in ext4_ext_new_meta_block() argument
233 goal = ext4_ext_find_goal(inode, path, le32_to_cpu(ex->ee_block)); in ext4_ext_new_meta_block()
298 struct ext4_ext_path *path = *ppath; in ext4_force_split_extent_at() local
299 int unwritten = ext4_ext_is_unwritten(path[path->p_depth].p_ext); in ext4_force_split_extent_at()
540 struct ext4_ext_path *path = NULL; in ext4_ext_precache() local
556 path = kcalloc(depth + 1, sizeof(struct ext4_ext_path), in ext4_ext_precache()
558 if (path == NULL) { in ext4_ext_precache()
563 path[0].p_hdr = ext_inode_hdr(inode); in ext4_ext_precache()
564 ret = ext4_ext_check(inode, path[0].p_hdr, depth, 0); in ext4_ext_precache()
567 path[0].p_idx = EXT_FIRST_INDEX(path[0].p_hdr); in ext4_ext_precache()
574 path[i].p_idx > EXT_LAST_INDEX(path[i].p_hdr)) { in ext4_ext_precache()
575 brelse(path[i].p_bh); in ext4_ext_precache()
576 path[i].p_bh = NULL; in ext4_ext_precache()
581 ext4_idx_pblock(path[i].p_idx++), in ext4_ext_precache()
589 path[i].p_bh = bh; in ext4_ext_precache()
590 path[i].p_hdr = ext_block_hdr(bh); in ext4_ext_precache()
591 path[i].p_idx = EXT_FIRST_INDEX(path[i].p_hdr); in ext4_ext_precache()
596 ext4_ext_drop_refs(path); in ext4_ext_precache()
597 kfree(path); in ext4_ext_precache()
602 static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path) in ext4_ext_show_path() argument
604 int k, l = path->p_depth; in ext4_ext_show_path()
606 ext_debug(inode, "path:"); in ext4_ext_show_path()
607 for (k = 0; k <= l; k++, path++) { in ext4_ext_show_path()
608 if (path->p_idx) { in ext4_ext_show_path()
610 le32_to_cpu(path->p_idx->ei_block), in ext4_ext_show_path()
611 ext4_idx_pblock(path->p_idx)); in ext4_ext_show_path()
612 } else if (path->p_ext) { in ext4_ext_show_path()
614 le32_to_cpu(path->p_ext->ee_block), in ext4_ext_show_path()
615 ext4_ext_is_unwritten(path->p_ext), in ext4_ext_show_path()
616 ext4_ext_get_actual_len(path->p_ext), in ext4_ext_show_path()
617 ext4_ext_pblock(path->p_ext)); in ext4_ext_show_path()
624 static void ext4_ext_show_leaf(struct inode *inode, struct ext4_ext_path *path) in ext4_ext_show_leaf() argument
631 if (!path) in ext4_ext_show_leaf()
634 eh = path[depth].p_hdr; in ext4_ext_show_leaf()
647 static void ext4_ext_show_move(struct inode *inode, struct ext4_ext_path *path, in ext4_ext_show_move() argument
655 idx = path[level].p_idx; in ext4_ext_show_move()
656 while (idx <= EXT_MAX_INDEX(path[level].p_hdr)) { in ext4_ext_show_move()
666 ex = path[depth].p_ext; in ext4_ext_show_move()
667 while (ex <= EXT_MAX_EXTENT(path[depth].p_hdr)) { in ext4_ext_show_move()
679 #define ext4_ext_show_path(inode, path) argument
680 #define ext4_ext_show_leaf(inode, path) argument
681 #define ext4_ext_show_move(inode, path, newblock, level) argument
684 void ext4_ext_drop_refs(struct ext4_ext_path *path) in ext4_ext_drop_refs() argument
688 if (!path) in ext4_ext_drop_refs()
690 depth = path->p_depth; in ext4_ext_drop_refs()
691 for (i = 0; i <= depth; i++, path++) { in ext4_ext_drop_refs()
692 brelse(path->p_bh); in ext4_ext_drop_refs()
693 path->p_bh = NULL; in ext4_ext_drop_refs()
704 struct ext4_ext_path *path, ext4_lblk_t block) in ext4_ext_binsearch_idx() argument
706 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch_idx()
725 path->p_idx = l - 1; in ext4_ext_binsearch_idx()
726 ext_debug(inode, " -> %u->%lld ", le32_to_cpu(path->p_idx->ei_block), in ext4_ext_binsearch_idx()
727 ext4_idx_pblock(path->p_idx)); in ext4_ext_binsearch_idx()
751 BUG_ON(chix != path->p_idx); in ext4_ext_binsearch_idx()
764 struct ext4_ext_path *path, ext4_lblk_t block) in ext4_ext_binsearch() argument
766 struct ext4_extent_header *eh = path->p_hdr; in ext4_ext_binsearch()
793 path->p_ext = l - 1; in ext4_ext_binsearch()
795 le32_to_cpu(path->p_ext->ee_block), in ext4_ext_binsearch()
796 ext4_ext_pblock(path->p_ext), in ext4_ext_binsearch()
797 ext4_ext_is_unwritten(path->p_ext), in ext4_ext_binsearch()
798 ext4_ext_get_actual_len(path->p_ext)); in ext4_ext_binsearch()
813 BUG_ON(chex != path->p_ext); in ext4_ext_binsearch()
837 struct ext4_ext_path *path = orig_path ? *orig_path : NULL; in ext4_find_extent() local
854 if (path) { in ext4_find_extent()
855 ext4_ext_drop_refs(path); in ext4_find_extent()
856 if (depth > path[0].p_maxdepth) { in ext4_find_extent()
857 kfree(path); in ext4_find_extent()
858 *orig_path = path = NULL; in ext4_find_extent()
861 if (!path) { in ext4_find_extent()
863 path = kcalloc(depth + 2, sizeof(struct ext4_ext_path), in ext4_find_extent()
865 if (unlikely(!path)) in ext4_find_extent()
867 path[0].p_maxdepth = depth + 1; in ext4_find_extent()
869 path[0].p_hdr = eh; in ext4_find_extent()
870 path[0].p_bh = NULL; in ext4_find_extent()
880 ext4_ext_binsearch_idx(inode, path + ppos, block); in ext4_find_extent()
881 path[ppos].p_block = ext4_idx_pblock(path[ppos].p_idx); in ext4_find_extent()
882 path[ppos].p_depth = i; in ext4_find_extent()
883 path[ppos].p_ext = NULL; in ext4_find_extent()
885 bh = read_extent_tree_block(inode, path[ppos].p_block, --i, in ext4_find_extent()
894 path[ppos].p_bh = bh; in ext4_find_extent()
895 path[ppos].p_hdr = eh; in ext4_find_extent()
898 path[ppos].p_depth = i; in ext4_find_extent()
899 path[ppos].p_ext = NULL; in ext4_find_extent()
900 path[ppos].p_idx = NULL; in ext4_find_extent()
903 ext4_ext_binsearch(inode, path + ppos, block); in ext4_find_extent()
905 if (path[ppos].p_ext) in ext4_find_extent()
906 path[ppos].p_block = ext4_ext_pblock(path[ppos].p_ext); in ext4_find_extent()
908 ext4_ext_show_path(inode, path); in ext4_find_extent()
910 return path; in ext4_find_extent()
913 ext4_ext_drop_refs(path); in ext4_find_extent()
914 kfree(path); in ext4_find_extent()
995 * inserts new subtree into the path, using free index entry
1005 struct ext4_ext_path *path, in ext4_ext_split() argument
1028 if (unlikely(path[depth].p_ext > EXT_MAX_EXTENT(path[depth].p_hdr))) { in ext4_ext_split()
1032 if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) { in ext4_ext_split()
1033 border = path[depth].p_ext[1].ee_block; in ext4_ext_split()
1063 newblock = ext4_ext_new_meta_block(handle, inode, path, in ext4_ext_split()
1094 /* move remainder of path[depth] to the new leaf */ in ext4_ext_split()
1095 if (unlikely(path[depth].p_hdr->eh_entries != in ext4_ext_split()
1096 path[depth].p_hdr->eh_max)) { in ext4_ext_split()
1098 path[depth].p_hdr->eh_entries, in ext4_ext_split()
1099 path[depth].p_hdr->eh_max); in ext4_ext_split()
1104 m = EXT_MAX_EXTENT(path[depth].p_hdr) - path[depth].p_ext++; in ext4_ext_split()
1105 ext4_ext_show_move(inode, path, newblock, depth); in ext4_ext_split()
1109 memmove(ex, path[depth].p_ext, sizeof(struct ext4_extent) * m); in ext4_ext_split()
1129 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_split()
1132 le16_add_cpu(&path[depth].p_hdr->eh_entries, -m); in ext4_ext_split()
1133 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_split()
1177 /* move remainder of path[i] to the new index block */ in ext4_ext_split()
1178 if (unlikely(EXT_MAX_INDEX(path[i].p_hdr) != in ext4_ext_split()
1179 EXT_LAST_INDEX(path[i].p_hdr))) { in ext4_ext_split()
1182 le32_to_cpu(path[i].p_ext->ee_block)); in ext4_ext_split()
1187 m = EXT_MAX_INDEX(path[i].p_hdr) - path[i].p_idx++; in ext4_ext_split()
1188 ext_debug(inode, "cur 0x%p, last 0x%p\n", path[i].p_idx, in ext4_ext_split()
1189 EXT_MAX_INDEX(path[i].p_hdr)); in ext4_ext_split()
1190 ext4_ext_show_move(inode, path, newblock, i); in ext4_ext_split()
1192 memmove(++fidx, path[i].p_idx, in ext4_ext_split()
1213 err = ext4_ext_get_access(handle, inode, path + i); in ext4_ext_split()
1216 le16_add_cpu(&path[i].p_hdr->eh_entries, -m); in ext4_ext_split()
1217 err = ext4_ext_dirty(handle, inode, path + i); in ext4_ext_split()
1226 err = ext4_ext_insert_index(handle, inode, path + at, in ext4_ext_split()
1349 struct ext4_ext_path *path = *ppath; in ext4_ext_create_new_leaf() local
1357 curp = path + depth; in ext4_ext_create_new_leaf()
1368 err = ext4_ext_split(handle, inode, mb_flags, path, newext, i); in ext4_ext_create_new_leaf()
1372 /* refill path */ in ext4_ext_create_new_leaf()
1373 path = ext4_find_extent(inode, in ext4_ext_create_new_leaf()
1376 if (IS_ERR(path)) in ext4_ext_create_new_leaf()
1377 err = PTR_ERR(path); in ext4_ext_create_new_leaf()
1384 /* refill path */ in ext4_ext_create_new_leaf()
1385 path = ext4_find_extent(inode, in ext4_ext_create_new_leaf()
1388 if (IS_ERR(path)) { in ext4_ext_create_new_leaf()
1389 err = PTR_ERR(path); in ext4_ext_create_new_leaf()
1398 if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) { in ext4_ext_create_new_leaf()
1416 struct ext4_ext_path *path, in ext4_ext_search_left() argument
1423 if (unlikely(path == NULL)) { in ext4_ext_search_left()
1424 EXT4_ERROR_INODE(inode, "path == NULL *logical %d!", *logical); in ext4_ext_search_left()
1427 depth = path->p_depth; in ext4_ext_search_left()
1430 if (depth == 0 && path->p_ext == NULL) in ext4_ext_search_left()
1433 /* usually extent in the path covers blocks smaller in ext4_ext_search_left()
1437 ex = path[depth].p_ext; in ext4_ext_search_left()
1440 if (unlikely(EXT_FIRST_EXTENT(path[depth].p_hdr) != ex)) { in ext4_ext_search_left()
1447 ix = path[depth].p_idx; in ext4_ext_search_left()
1448 if (unlikely(ix != EXT_FIRST_INDEX(path[depth].p_hdr))) { in ext4_ext_search_left()
1452 EXT_FIRST_INDEX(path[depth].p_hdr) != NULL ? in ext4_ext_search_left()
1453 le32_to_cpu(EXT_FIRST_INDEX(path[depth].p_hdr)->ei_block) : 0, in ext4_ext_search_left()
1481 struct ext4_ext_path *path, in ext4_ext_search_right() argument
1493 if (unlikely(path == NULL)) { in ext4_ext_search_right()
1494 EXT4_ERROR_INODE(inode, "path == NULL *logical %d!", *logical); in ext4_ext_search_right()
1497 depth = path->p_depth; in ext4_ext_search_right()
1500 if (depth == 0 && path->p_ext == NULL) in ext4_ext_search_right()
1503 /* usually extent in the path covers blocks smaller in ext4_ext_search_right()
1507 ex = path[depth].p_ext; in ext4_ext_search_right()
1510 if (unlikely(EXT_FIRST_EXTENT(path[depth].p_hdr) != ex)) { in ext4_ext_search_right()
1512 "first_extent(path[%d].p_hdr) != ex", in ext4_ext_search_right()
1517 ix = path[depth].p_idx; in ext4_ext_search_right()
1518 if (unlikely(ix != EXT_FIRST_INDEX(path[depth].p_hdr))) { in ext4_ext_search_right()
1535 if (ex != EXT_LAST_EXTENT(path[depth].p_hdr)) { in ext4_ext_search_right()
1543 ix = path[depth].p_idx; in ext4_ext_search_right()
1544 if (ix != EXT_LAST_INDEX(path[depth].p_hdr)) in ext4_ext_search_right()
1557 while (++depth < path->p_depth) { in ext4_ext_search_right()
1560 path->p_depth - depth, 0); in ext4_ext_search_right()
1569 bh = read_extent_tree_block(inode, block, path->p_depth - depth, 0); in ext4_ext_search_right()
1592 ext4_ext_next_allocated_block(struct ext4_ext_path *path) in ext4_ext_next_allocated_block() argument
1596 BUG_ON(path == NULL); in ext4_ext_next_allocated_block()
1597 depth = path->p_depth; in ext4_ext_next_allocated_block()
1599 if (depth == 0 && path->p_ext == NULL) in ext4_ext_next_allocated_block()
1603 struct ext4_ext_path *p = &path[depth]; in ext4_ext_next_allocated_block()
1605 if (depth == path->p_depth) { in ext4_ext_next_allocated_block()
1624 static ext4_lblk_t ext4_ext_next_leaf_block(struct ext4_ext_path *path) in ext4_ext_next_leaf_block() argument
1628 BUG_ON(path == NULL); in ext4_ext_next_leaf_block()
1629 depth = path->p_depth; in ext4_ext_next_leaf_block()
1639 if (path[depth].p_idx != in ext4_ext_next_leaf_block()
1640 EXT_LAST_INDEX(path[depth].p_hdr)) in ext4_ext_next_leaf_block()
1642 le32_to_cpu(path[depth].p_idx[1].ei_block); in ext4_ext_next_leaf_block()
1656 struct ext4_ext_path *path) in ext4_ext_correct_indexes() argument
1664 eh = path[depth].p_hdr; in ext4_ext_correct_indexes()
1665 ex = path[depth].p_ext; in ext4_ext_correct_indexes()
1687 border = path[depth].p_ext->ee_block; in ext4_ext_correct_indexes()
1688 err = ext4_ext_get_access(handle, inode, path + k); in ext4_ext_correct_indexes()
1691 path[k].p_idx->ei_block = border; in ext4_ext_correct_indexes()
1692 err = ext4_ext_dirty(handle, inode, path + k); in ext4_ext_correct_indexes()
1698 if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr)) in ext4_ext_correct_indexes()
1700 err = ext4_ext_get_access(handle, inode, path + k); in ext4_ext_correct_indexes()
1703 path[k].p_idx->ei_block = border; in ext4_ext_correct_indexes()
1704 err = ext4_ext_dirty(handle, inode, path + k); in ext4_ext_correct_indexes()
1752 struct ext4_ext_path *path, in ext4_ext_try_to_merge_right() argument
1760 BUG_ON(path[depth].p_hdr == NULL); in ext4_ext_try_to_merge_right()
1761 eh = path[depth].p_hdr; in ext4_ext_try_to_merge_right()
1794 struct ext4_ext_path *path) in ext4_ext_try_to_merge_up() argument
1800 if ((path[0].p_depth != 1) || in ext4_ext_try_to_merge_up()
1801 (le16_to_cpu(path[0].p_hdr->eh_entries) != 1) || in ext4_ext_try_to_merge_up()
1802 (le16_to_cpu(path[1].p_hdr->eh_entries) > max_root)) in ext4_ext_try_to_merge_up()
1817 blk = ext4_idx_pblock(path[0].p_idx); in ext4_ext_try_to_merge_up()
1818 s = le16_to_cpu(path[1].p_hdr->eh_entries) * in ext4_ext_try_to_merge_up()
1822 path[1].p_maxdepth = path[0].p_maxdepth; in ext4_ext_try_to_merge_up()
1823 memcpy(path[0].p_hdr, path[1].p_hdr, s); in ext4_ext_try_to_merge_up()
1824 path[0].p_depth = 0; in ext4_ext_try_to_merge_up()
1825 path[0].p_ext = EXT_FIRST_EXTENT(path[0].p_hdr) + in ext4_ext_try_to_merge_up()
1826 (path[1].p_ext - EXT_FIRST_EXTENT(path[1].p_hdr)); in ext4_ext_try_to_merge_up()
1827 path[0].p_hdr->eh_max = cpu_to_le16(max_root); in ext4_ext_try_to_merge_up()
1829 brelse(path[1].p_bh); in ext4_ext_try_to_merge_up()
1840 struct ext4_ext_path *path, in ext4_ext_try_to_merge() argument
1848 BUG_ON(path[depth].p_hdr == NULL); in ext4_ext_try_to_merge()
1849 eh = path[depth].p_hdr; in ext4_ext_try_to_merge()
1852 merge_done = ext4_ext_try_to_merge_right(inode, path, ex - 1); in ext4_ext_try_to_merge()
1855 (void) ext4_ext_try_to_merge_right(inode, path, ex); in ext4_ext_try_to_merge()
1857 ext4_ext_try_to_merge_up(handle, inode, path); in ext4_ext_try_to_merge()
1871 struct ext4_ext_path *path) in ext4_ext_check_overlap() argument
1880 if (!path[depth].p_ext) in ext4_ext_check_overlap()
1882 b2 = EXT4_LBLK_CMASK(sbi, le32_to_cpu(path[depth].p_ext->ee_block)); in ext4_ext_check_overlap()
1885 * get the next allocated block if the extent in the path in ext4_ext_check_overlap()
1889 b2 = ext4_ext_next_allocated_block(path); in ext4_ext_check_overlap()
1921 struct ext4_ext_path *path = *ppath; in ext4_ext_insert_extent() local
1937 ex = path[depth].p_ext; in ext4_ext_insert_extent()
1938 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
1939 if (unlikely(path[depth].p_hdr == NULL)) { in ext4_ext_insert_extent()
1940 EXT4_ERROR_INODE(inode, "path[%d].p_hdr == NULL", depth); in ext4_ext_insert_extent()
1977 path + depth); in ext4_ext_insert_extent()
1985 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2003 path + depth); in ext4_ext_insert_extent()
2014 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2021 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2029 next = ext4_ext_next_leaf_block(path); in ext4_ext_insert_extent()
2036 BUG_ON(npath->p_depth != path->p_depth); in ext4_ext_insert_extent()
2041 path = npath; in ext4_ext_insert_extent()
2059 eh = path[depth].p_hdr; in ext4_ext_insert_extent()
2062 nearex = path[depth].p_ext; in ext4_ext_insert_extent()
2064 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_insert_extent()
2114 path[depth].p_ext = nearex; in ext4_ext_insert_extent()
2122 ext4_ext_try_to_merge(handle, inode, path, nearex); in ext4_ext_insert_extent()
2126 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_insert_extent()
2130 err = ext4_ext_dirty(handle, inode, path + path->p_depth); in ext4_ext_insert_extent()
2187 * @path: path in extent tree to @lblk
2191 * block. We don't try too hard to find the beginning of the hole but @path
2198 struct ext4_ext_path *path, in ext4_ext_determine_hole() argument
2205 ex = path[depth].p_ext; in ext4_ext_determine_hole()
2217 next = ext4_ext_next_allocated_block(path); in ext4_ext_determine_hole()
2255 struct ext4_ext_path *path, int depth) in ext4_ext_rm_idx() argument
2262 path = path + depth; in ext4_ext_rm_idx()
2263 leaf = ext4_idx_pblock(path->p_idx); in ext4_ext_rm_idx()
2264 if (unlikely(path->p_hdr->eh_entries == 0)) { in ext4_ext_rm_idx()
2265 EXT4_ERROR_INODE(inode, "path->p_hdr->eh_entries == 0"); in ext4_ext_rm_idx()
2268 err = ext4_ext_get_access(handle, inode, path); in ext4_ext_rm_idx()
2272 if (path->p_idx != EXT_LAST_INDEX(path->p_hdr)) { in ext4_ext_rm_idx()
2273 int len = EXT_LAST_INDEX(path->p_hdr) - path->p_idx; in ext4_ext_rm_idx()
2275 memmove(path->p_idx, path->p_idx + 1, len); in ext4_ext_rm_idx()
2278 le16_add_cpu(&path->p_hdr->eh_entries, -1); in ext4_ext_rm_idx()
2279 err = ext4_ext_dirty(handle, inode, path); in ext4_ext_rm_idx()
2289 if (path->p_idx != EXT_FIRST_INDEX(path->p_hdr)) in ext4_ext_rm_idx()
2291 path--; in ext4_ext_rm_idx()
2292 err = ext4_ext_get_access(handle, inode, path); in ext4_ext_rm_idx()
2295 path->p_idx->ei_block = (path+1)->p_idx->ei_block; in ext4_ext_rm_idx()
2296 err = ext4_ext_dirty(handle, inode, path); in ext4_ext_rm_idx()
2307 * When pass the actual path, the caller should calculate credits
2311 struct ext4_ext_path *path) in ext4_ext_calc_credits_for_single_extent() argument
2313 if (path) { in ext4_ext_calc_credits_for_single_extent()
2318 if (le16_to_cpu(path[depth].p_hdr->eh_entries) in ext4_ext_calc_credits_for_single_extent()
2319 < le16_to_cpu(path[depth].p_hdr->eh_max)) { in ext4_ext_calc_credits_for_single_extent()
2534 * @path: The path to the leaf
2544 struct ext4_ext_path *path, in ext4_ext_rm_leaf() argument
2562 if (!path[depth].p_hdr) in ext4_ext_rm_leaf()
2563 path[depth].p_hdr = ext_block_hdr(path[depth].p_bh); in ext4_ext_rm_leaf()
2564 eh = path[depth].p_hdr; in ext4_ext_rm_leaf()
2565 if (unlikely(path[depth].p_hdr == NULL)) { in ext4_ext_rm_leaf()
2566 EXT4_ERROR_INODE(inode, "path[%d].p_hdr == NULL", depth); in ext4_ext_rm_leaf()
2570 ex = path[depth].p_ext; in ext4_ext_rm_leaf()
2589 path[depth].p_ext = ex; in ext4_ext_rm_leaf()
2660 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_rm_leaf()
2700 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_rm_leaf()
2712 err = ext4_ext_correct_indexes(handle, inode, path); in ext4_ext_rm_leaf()
2739 if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL) in ext4_ext_rm_leaf()
2740 err = ext4_ext_rm_idx(handle, inode, path, depth); in ext4_ext_rm_leaf()
2751 ext4_ext_more_to_rm(struct ext4_ext_path *path) in ext4_ext_more_to_rm() argument
2753 BUG_ON(path->p_idx == NULL); in ext4_ext_more_to_rm()
2755 if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr)) in ext4_ext_more_to_rm()
2762 if (le16_to_cpu(path->p_hdr->eh_entries) == path->p_block) in ext4_ext_more_to_rm()
2772 struct ext4_ext_path *path = NULL; in ext4_ext_remove_space() local
2806 path = ext4_find_extent(inode, end, NULL, in ext4_ext_remove_space()
2808 if (IS_ERR(path)) { in ext4_ext_remove_space()
2810 return PTR_ERR(path); in ext4_ext_remove_space()
2814 ex = path[depth].p_ext; in ext4_ext_remove_space()
2818 "path[%d].p_hdr == NULL", in ext4_ext_remove_space()
2853 err = ext4_force_split_extent_at(handle, inode, &path, in ext4_ext_remove_space()
2871 err = ext4_ext_search_right(inode, path, &lblk, &pblk, in ext4_ext_remove_space()
2886 if (path) { in ext4_ext_remove_space()
2889 path[k].p_block = in ext4_ext_remove_space()
2890 le16_to_cpu(path[k].p_hdr->eh_entries)+1; in ext4_ext_remove_space()
2892 path = kcalloc(depth + 1, sizeof(struct ext4_ext_path), in ext4_ext_remove_space()
2894 if (path == NULL) { in ext4_ext_remove_space()
2898 path[0].p_maxdepth = path[0].p_depth = depth; in ext4_ext_remove_space()
2899 path[0].p_hdr = ext_inode_hdr(inode); in ext4_ext_remove_space()
2902 if (ext4_ext_check(inode, path[0].p_hdr, depth, 0)) { in ext4_ext_remove_space()
2912 err = ext4_ext_rm_leaf(handle, inode, path, in ext4_ext_remove_space()
2915 brelse(path[i].p_bh); in ext4_ext_remove_space()
2916 path[i].p_bh = NULL; in ext4_ext_remove_space()
2922 if (!path[i].p_hdr) { in ext4_ext_remove_space()
2924 path[i].p_hdr = ext_block_hdr(path[i].p_bh); in ext4_ext_remove_space()
2927 if (!path[i].p_idx) { in ext4_ext_remove_space()
2929 path[i].p_idx = EXT_LAST_INDEX(path[i].p_hdr); in ext4_ext_remove_space()
2930 path[i].p_block = le16_to_cpu(path[i].p_hdr->eh_entries)+1; in ext4_ext_remove_space()
2932 path[i].p_hdr, in ext4_ext_remove_space()
2933 le16_to_cpu(path[i].p_hdr->eh_entries)); in ext4_ext_remove_space()
2936 path[i].p_idx--; in ext4_ext_remove_space()
2940 i, EXT_FIRST_INDEX(path[i].p_hdr), in ext4_ext_remove_space()
2941 path[i].p_idx); in ext4_ext_remove_space()
2942 if (ext4_ext_more_to_rm(path + i)) { in ext4_ext_remove_space()
2946 i + 1, ext4_idx_pblock(path[i].p_idx)); in ext4_ext_remove_space()
2947 memset(path + i + 1, 0, sizeof(*path)); in ext4_ext_remove_space()
2949 ext4_idx_pblock(path[i].p_idx), depth - i - 1, in ext4_ext_remove_space()
2963 path[i + 1].p_bh = bh; in ext4_ext_remove_space()
2967 path[i].p_block = le16_to_cpu(path[i].p_hdr->eh_entries); in ext4_ext_remove_space()
2971 if (path[i].p_hdr->eh_entries == 0 && i > 0) { in ext4_ext_remove_space()
2975 err = ext4_ext_rm_idx(handle, inode, path, i); in ext4_ext_remove_space()
2978 brelse(path[i].p_bh); in ext4_ext_remove_space()
2979 path[i].p_bh = NULL; in ext4_ext_remove_space()
2986 path->p_hdr->eh_entries); in ext4_ext_remove_space()
3006 if (path->p_hdr->eh_entries == 0) { in ext4_ext_remove_space()
3011 err = ext4_ext_get_access(handle, inode, path); in ext4_ext_remove_space()
3016 err = ext4_ext_dirty(handle, inode, path); in ext4_ext_remove_space()
3020 ext4_ext_drop_refs(path); in ext4_ext_remove_space()
3021 kfree(path); in ext4_ext_remove_space()
3022 path = NULL; in ext4_ext_remove_space()
3115 * @path: the path to the extent
3138 struct ext4_ext_path *path = *ppath; in ext4_split_extent_at() local
3151 ext4_ext_show_leaf(inode, path); in ext4_split_extent_at()
3154 ex = path[depth].p_ext; in ext4_split_extent_at()
3165 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_split_extent_at()
3181 ext4_ext_try_to_merge(handle, inode, path, ex); in ext4_split_extent_at()
3183 err = ext4_ext_dirty(handle, inode, path + path->p_depth); in ext4_split_extent_at()
3194 * path may lead to new leaf, not to original leaf any more in ext4_split_extent_at()
3197 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_split_extent_at()
3239 ext4_ext_try_to_merge(handle, inode, path, ex); in ext4_split_extent_at()
3240 err = ext4_ext_dirty(handle, inode, path + path->p_depth); in ext4_split_extent_at()
3252 ext4_ext_show_leaf(inode, path); in ext4_split_extent_at()
3258 * Ignore ext4_ext_dirty return value since we are already in error path in ext4_split_extent_at()
3261 ext4_ext_dirty(handle, inode, path + path->p_depth); in ext4_split_extent_at()
3283 struct ext4_ext_path *path = *ppath; in ext4_split_extent() local
3293 ex = path[depth].p_ext; in ext4_split_extent()
3314 * Update path is required because previous ext4_split_extent_at() may in ext4_split_extent()
3317 path = ext4_find_extent(inode, map->m_lblk, ppath, flags); in ext4_split_extent()
3318 if (IS_ERR(path)) in ext4_split_extent()
3319 return PTR_ERR(path); in ext4_split_extent()
3321 ex = path[depth].p_ext; in ext4_split_extent()
3343 ext4_ext_show_leaf(inode, path); in ext4_split_extent()
3359 * - The extent pointed to by 'path' is unwritten.
3360 * - The extent pointed to by 'path' contains a superset
3374 struct ext4_ext_path *path = *ppath; in ext4_ext_convert_to_initialized() local
3396 eh = path[depth].p_hdr; in ext4_ext_convert_to_initialized()
3397 ex = path[depth].p_ext; in ext4_ext_convert_to_initialized()
3451 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
3497 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
3519 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_convert_to_initialized()
3521 /* Update path to point to the right extent */ in ext4_ext_convert_to_initialized()
3522 path[depth].p_ext = abut_ex; in ext4_ext_convert_to_initialized()
3632 struct ext4_ext_path *path = *ppath; in ext4_split_convert_extents() local
3651 ex = path[depth].p_ext; in ext4_split_convert_extents()
3673 struct ext4_ext_path *path = *ppath; in ext4_convert_unwritten_extents_endio() local
3681 ex = path[depth].p_ext; in ext4_convert_unwritten_extents_endio()
3705 path = ext4_find_extent(inode, map->m_lblk, ppath, 0); in ext4_convert_unwritten_extents_endio()
3706 if (IS_ERR(path)) in ext4_convert_unwritten_extents_endio()
3707 return PTR_ERR(path); in ext4_convert_unwritten_extents_endio()
3709 ex = path[depth].p_ext; in ext4_convert_unwritten_extents_endio()
3712 err = ext4_ext_get_access(handle, inode, path + depth); in ext4_convert_unwritten_extents_endio()
3721 ext4_ext_try_to_merge(handle, inode, path, ex); in ext4_convert_unwritten_extents_endio()
3724 err = ext4_ext_dirty(handle, inode, path + path->p_depth); in ext4_convert_unwritten_extents_endio()
3726 ext4_ext_show_leaf(inode, path); in ext4_convert_unwritten_extents_endio()
3736 struct ext4_ext_path *path = *ppath; in convert_initialized_extent() local
3751 ex = path[depth].p_ext; in convert_initialized_extent()
3763 path = ext4_find_extent(inode, map->m_lblk, ppath, 0); in convert_initialized_extent()
3764 if (IS_ERR(path)) in convert_initialized_extent()
3765 return PTR_ERR(path); in convert_initialized_extent()
3767 ex = path[depth].p_ext; in convert_initialized_extent()
3775 err = ext4_ext_get_access(handle, inode, path + depth); in convert_initialized_extent()
3784 ext4_ext_try_to_merge(handle, inode, path, ex); in convert_initialized_extent()
3787 err = ext4_ext_dirty(handle, inode, path + path->p_depth); in convert_initialized_extent()
3790 ext4_ext_show_leaf(inode, path); in convert_initialized_extent()
3807 struct ext4_ext_path __maybe_unused *path = *ppath; in ext4_ext_handle_unwritten_extents() local
3814 ext4_ext_show_leaf(inode, path); in ext4_ext_handle_unwritten_extents()
3911 ext4_ext_show_leaf(inode, path); in ext4_ext_handle_unwritten_extents()
3960 struct ext4_ext_path *path) in get_implied_cluster_alloc() argument
4006 ext4_lblk_t next = ext4_ext_next_allocated_block(path); in get_implied_cluster_alloc()
4040 struct ext4_ext_path *path = NULL; in ext4_ext_map_blocks() local
4054 path = ext4_find_extent(inode, map->m_lblk, NULL, 0); in ext4_ext_map_blocks()
4055 if (IS_ERR(path)) { in ext4_ext_map_blocks()
4056 err = PTR_ERR(path); in ext4_ext_map_blocks()
4057 path = NULL; in ext4_ext_map_blocks()
4068 if (unlikely(path[depth].p_ext == NULL && depth != 0)) { in ext4_ext_map_blocks()
4072 path[depth].p_block); in ext4_ext_map_blocks()
4077 ex = path[depth].p_ext; in ext4_ext_map_blocks()
4107 inode, map, &path, &allocated); in ext4_ext_map_blocks()
4115 ext4_ext_show_leaf(inode, path); in ext4_ext_map_blocks()
4120 handle, inode, map, &path, flags, in ext4_ext_map_blocks()
4138 hole_len = ext4_ext_determine_hole(inode, path, &hole_start); in ext4_ext_map_blocks()
4165 get_implied_cluster_alloc(inode->i_sb, map, ex, path)) { in ext4_ext_map_blocks()
4173 err = ext4_ext_search_left(inode, path, &ar.lleft, &ar.pleft); in ext4_ext_map_blocks()
4177 err = ext4_ext_search_right(inode, path, &ar.lright, &ar.pright, &ex2); in ext4_ext_map_blocks()
4184 get_implied_cluster_alloc(inode->i_sb, map, &ex2, path)) { in ext4_ext_map_blocks()
4205 err = ext4_ext_check_overlap(sbi, inode, &newex, path); in ext4_ext_map_blocks()
4213 ar.goal = ext4_ext_find_goal(inode, path, map->m_lblk); in ext4_ext_map_blocks()
4259 err = ext4_ext_insert_extent(handle, inode, &path, &newex, flags); in ext4_ext_map_blocks()
4329 ext4_ext_show_leaf(inode, path); in ext4_ext_map_blocks()
4331 ext4_ext_drop_refs(path); in ext4_ext_map_blocks()
4332 kfree(path); in ext4_ext_map_blocks()
4969 * Function to access the path buffer for marking it dirty.
4971 * to update path.
4975 struct ext4_ext_path *path) in ext4_access_path() argument
4993 err = ext4_ext_get_access(handle, inode, path); in ext4_access_path()
4999 * Shift the extents of a path structure lying between path[depth].p_ext
5000 * and EXT_LAST_EXTENT(path[depth].p_hdr), by @shift blocks. @SHIFT tells
5004 ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift, in ext4_ext_shift_path_extents() argument
5011 depth = path->p_depth; in ext4_ext_shift_path_extents()
5014 if (depth == path->p_depth) { in ext4_ext_shift_path_extents()
5015 ex_start = path[depth].p_ext; in ext4_ext_shift_path_extents()
5019 ex_last = EXT_LAST_EXTENT(path[depth].p_hdr); in ext4_ext_shift_path_extents()
5021 err = ext4_access_path(handle, inode, path + depth); in ext4_ext_shift_path_extents()
5025 if (ex_start == EXT_FIRST_EXTENT(path[depth].p_hdr)) in ext4_ext_shift_path_extents()
5034 EXT_FIRST_EXTENT(path[depth].p_hdr)) in ext4_ext_shift_path_extents()
5037 path, ex_start - 1)) in ext4_ext_shift_path_extents()
5043 ext4_ext_try_to_merge_right(inode, path, in ext4_ext_shift_path_extents()
5048 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_shift_path_extents()
5057 err = ext4_access_path(handle, inode, path + depth); in ext4_ext_shift_path_extents()
5062 le32_add_cpu(&path[depth].p_idx->ei_block, -shift); in ext4_ext_shift_path_extents()
5064 le32_add_cpu(&path[depth].p_idx->ei_block, shift); in ext4_ext_shift_path_extents()
5065 err = ext4_ext_dirty(handle, inode, path + depth); in ext4_ext_shift_path_extents()
5070 if (path[depth].p_idx != EXT_FIRST_INDEX(path[depth].p_hdr)) in ext4_ext_shift_path_extents()
5092 struct ext4_ext_path *path; in ext4_ext_shift_extents() local
5097 /* Let path point to the last extent */ in ext4_ext_shift_extents()
5098 path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, in ext4_ext_shift_extents()
5100 if (IS_ERR(path)) in ext4_ext_shift_extents()
5101 return PTR_ERR(path); in ext4_ext_shift_extents()
5103 depth = path->p_depth; in ext4_ext_shift_extents()
5104 extent = path[depth].p_ext; in ext4_ext_shift_extents()
5116 path = ext4_find_extent(inode, start - 1, &path, in ext4_ext_shift_extents()
5118 if (IS_ERR(path)) in ext4_ext_shift_extents()
5119 return PTR_ERR(path); in ext4_ext_shift_extents()
5120 depth = path->p_depth; in ext4_ext_shift_extents()
5121 extent = path[depth].p_ext; in ext4_ext_shift_extents()
5160 path = ext4_find_extent(inode, *iterator, &path, in ext4_ext_shift_extents()
5162 if (IS_ERR(path)) in ext4_ext_shift_extents()
5163 return PTR_ERR(path); in ext4_ext_shift_extents()
5164 depth = path->p_depth; in ext4_ext_shift_extents()
5165 extent = path[depth].p_ext; in ext4_ext_shift_extents()
5174 if (extent < EXT_LAST_EXTENT(path[depth].p_hdr)) { in ext4_ext_shift_extents()
5175 path[depth].p_ext++; in ext4_ext_shift_extents()
5177 *iterator = ext4_ext_next_allocated_block(path); in ext4_ext_shift_extents()
5183 extent = EXT_LAST_EXTENT(path[depth].p_hdr); in ext4_ext_shift_extents()
5187 extent = EXT_FIRST_EXTENT(path[depth].p_hdr); in ext4_ext_shift_extents()
5193 /* Update path extent in case we need to stop */ in ext4_ext_shift_extents()
5196 path[depth].p_ext = extent; in ext4_ext_shift_extents()
5198 ret = ext4_ext_shift_path_extents(path, shift, inode, in ext4_ext_shift_extents()
5204 ext4_ext_drop_refs(path); in ext4_ext_shift_extents()
5205 kfree(path); in ext4_ext_shift_extents()
5364 struct ext4_ext_path *path; in ext4_insert_range() local
5458 path = ext4_find_extent(inode, offset_lblk, NULL, 0); in ext4_insert_range()
5459 if (IS_ERR(path)) { in ext4_insert_range()
5465 extent = path[depth].p_ext; in ext4_insert_range()
5479 ret = ext4_split_extent_at(handle, inode, &path, in ext4_insert_range()
5486 ext4_ext_drop_refs(path); in ext4_insert_range()
5487 kfree(path); in ext4_insert_range()
5493 ext4_ext_drop_refs(path); in ext4_insert_range()
5494 kfree(path); in ext4_insert_range()
5644 * path must to be revalidated. */ in ext4_swap_extents()
5670 * path must to be revalidated. */ in ext4_swap_extents()
5739 struct ext4_ext_path *path; in ext4_clu_mapped() local
5745 path = ext4_find_extent(inode, EXT4_C2B(sbi, lclu), NULL, 0); in ext4_clu_mapped()
5746 if (IS_ERR(path)) { in ext4_clu_mapped()
5747 err = PTR_ERR(path); in ext4_clu_mapped()
5748 path = NULL; in ext4_clu_mapped()
5759 if (unlikely(path[depth].p_ext == NULL && depth != 0)) { in ext4_clu_mapped()
5763 depth, path[depth].p_block); in ext4_clu_mapped()
5768 extent = path[depth].p_ext; in ext4_clu_mapped()
5789 first_lblk = ext4_ext_next_allocated_block(path); in ext4_clu_mapped()
5797 ext4_ext_drop_refs(path); in ext4_clu_mapped()
5798 kfree(path); in ext4_clu_mapped()
5808 * replay path. Returns 0 on success and error on failure.
5813 struct ext4_ext_path *path = NULL, *ppath; in ext4_ext_replay_update_ex() local
5817 path = ext4_find_extent(inode, start, NULL, 0); in ext4_ext_replay_update_ex()
5818 if (!path) in ext4_ext_replay_update_ex()
5820 ex = path[path->p_depth].p_ext; in ext4_ext_replay_update_ex()
5829 ppath = path; in ext4_ext_replay_update_ex()
5835 kfree(path); in ext4_ext_replay_update_ex()
5836 path = ext4_find_extent(inode, start, NULL, 0); in ext4_ext_replay_update_ex()
5837 if (IS_ERR(path)) in ext4_ext_replay_update_ex()
5839 ppath = path; in ext4_ext_replay_update_ex()
5840 ex = path[path->p_depth].p_ext; in ext4_ext_replay_update_ex()
5849 kfree(path); in ext4_ext_replay_update_ex()
5850 path = ext4_find_extent(inode, start, NULL, 0); in ext4_ext_replay_update_ex()
5851 if (IS_ERR(path)) in ext4_ext_replay_update_ex()
5853 ex = path[path->p_depth].p_ext; in ext4_ext_replay_update_ex()
5862 ret = ext4_ext_dirty(NULL, inode, &path[path->p_depth]); in ext4_ext_replay_update_ex()
5865 ext4_ext_drop_refs(path); in ext4_ext_replay_update_ex()
5866 kfree(path); in ext4_ext_replay_update_ex()
5874 struct ext4_ext_path *path = NULL; in ext4_ext_replay_shrink_inode() local
5879 path = ext4_find_extent(inode, cur, NULL, 0); in ext4_ext_replay_shrink_inode()
5880 if (IS_ERR(path)) in ext4_ext_replay_shrink_inode()
5882 ex = path[path->p_depth].p_ext; in ext4_ext_replay_shrink_inode()
5884 ext4_ext_drop_refs(path); in ext4_ext_replay_shrink_inode()
5885 kfree(path); in ext4_ext_replay_shrink_inode()
5893 ext4_ext_try_to_merge(NULL, inode, path, ex); in ext4_ext_replay_shrink_inode()
5895 ext4_ext_dirty(NULL, inode, &path[path->p_depth]); in ext4_ext_replay_shrink_inode()
5898 ext4_ext_drop_refs(path); in ext4_ext_replay_shrink_inode()
5899 kfree(path); in ext4_ext_replay_shrink_inode()
5921 struct ext4_ext_path *path = NULL, *path2 = NULL; in ext4_ext_replay_set_iblocks() local
5929 path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, in ext4_ext_replay_set_iblocks()
5931 if (IS_ERR(path)) in ext4_ext_replay_set_iblocks()
5932 return PTR_ERR(path); in ext4_ext_replay_set_iblocks()
5933 ex = path[path->p_depth].p_ext; in ext4_ext_replay_set_iblocks()
5935 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
5936 kfree(path); in ext4_ext_replay_set_iblocks()
5940 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
5941 kfree(path); in ext4_ext_replay_set_iblocks()
5959 * their paths. When path is different for 2 successive extents in ext4_ext_replay_set_iblocks()
5960 * we compare the blocks in the path at each level and increment in ext4_ext_replay_set_iblocks()
5965 path = ext4_find_extent(inode, cur, NULL, 0); in ext4_ext_replay_set_iblocks()
5966 if (IS_ERR(path)) in ext4_ext_replay_set_iblocks()
5968 numblks += path->p_depth; in ext4_ext_replay_set_iblocks()
5969 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
5970 kfree(path); in ext4_ext_replay_set_iblocks()
5972 path = ext4_find_extent(inode, cur, NULL, 0); in ext4_ext_replay_set_iblocks()
5973 if (IS_ERR(path)) in ext4_ext_replay_set_iblocks()
5975 ex = path[path->p_depth].p_ext; in ext4_ext_replay_set_iblocks()
5977 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
5978 kfree(path); in ext4_ext_replay_set_iblocks()
5987 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
5988 kfree(path); in ext4_ext_replay_set_iblocks()
5992 for (i = 0; i <= max(path->p_depth, path2->p_depth); i++) { in ext4_ext_replay_set_iblocks()
5994 if (i <= path->p_depth) in ext4_ext_replay_set_iblocks()
5995 cmp1 = path[i].p_bh ? in ext4_ext_replay_set_iblocks()
5996 path[i].p_bh->b_blocknr : 0; in ext4_ext_replay_set_iblocks()
6003 ext4_ext_drop_refs(path); in ext4_ext_replay_set_iblocks()
6005 kfree(path); in ext4_ext_replay_set_iblocks()
6017 struct ext4_ext_path *path = NULL; in ext4_ext_clear_bb() local
6024 path = ext4_find_extent(inode, EXT_MAX_BLOCKS - 1, NULL, in ext4_ext_clear_bb()
6026 if (IS_ERR(path)) in ext4_ext_clear_bb()
6027 return PTR_ERR(path); in ext4_ext_clear_bb()
6028 ex = path[path->p_depth].p_ext; in ext4_ext_clear_bb()
6030 ext4_ext_drop_refs(path); in ext4_ext_clear_bb()
6031 kfree(path); in ext4_ext_clear_bb()
6035 ext4_ext_drop_refs(path); in ext4_ext_clear_bb()
6036 kfree(path); in ext4_ext_clear_bb()
6046 path = ext4_find_extent(inode, map.m_lblk, NULL, 0); in ext4_ext_clear_bb()
6047 if (!IS_ERR_OR_NULL(path)) { in ext4_ext_clear_bb()
6048 for (j = 0; j < path->p_depth; j++) { in ext4_ext_clear_bb()
6051 path[j].p_block, 1, 0); in ext4_ext_clear_bb()
6053 ext4_ext_drop_refs(path); in ext4_ext_clear_bb()
6054 kfree(path); in ext4_ext_clear_bb()