search for: remove_cache_extent

Displaying 2 results from an estimated 2 matches for "remove_cache_extent".

2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...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_mapping_cache(fs_info); extent_io_tree_cleanup(&fs_info->extent_cache); extent_io_tre...
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
Memory leaks found by the tool--valgrind along with static reviewing. Based on Daivd''s branch ''integration-20130903''. Gui Hecheng (5): btrfs-progs:free local variable buf upon unsuccessful returns btrfs-progs:local variable memory freed btrfs-progs: missing tree-freeing statements added btrfs-progs:free the local list pending_list in btrfs_scan_one_dir