Displaying 1 result from an estimated 1 matches for "free_mapping_cache".
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
...ice->dev_list);
if (device->fd) {
fsync(device->fd);
posix_fadvise(device->fd, 0, 0, POSIX_FADV_DONTNEED);
}
close(device->fd);
+ kfree(device->name);
+ kfree(device->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(cac...