search for: find_first_cache_ext

Displaying 1 result from an estimated 1 matches for "find_first_cache_ext".

2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...ice->label); + kfree(device); } + kfree(fs_info->fs_devices); return 0; } +static void free_mapping_cache(struct btrfs_fs_info *fs_info) +{ + struct cache_tree *cache_tree = &fs_info->mapping_tree.cache_tree; + struct cache_extent *ce; + struct map_lookup *map; + + while ((ce = find_first_cache_extent(cache_tree, 0))) { + map = container_of(ce, struct map_lookup, ce); + remove_cache_extent(cache_tree, ce); + kfree(map); + } +} + int close_ctree(struct btrfs_root *root) { int ret; @@ -1326,6 +1341,7 @@ int close_ctree(struct btrfs_root *root) } close_all_devices(fs_info); + free_m...