mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-02 07:13:31 +01:00
perf maps: Set the kmaps for newly created/added kernel maps
When using __maps__insert_sorted() the map kmaps field needs to be initialized, as we need kernel maps to work with map__kmap(). Fix it by using the newly introduced map__set_kmap() method. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Namhyung Kim <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/lkml/Z74V0hZXrTLM6VIJ@x1 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
This commit is contained in:
1 parent
99deaf5578
commit
25d9c0301d
1 file changed
+3
@@ -798,6 +798,9 @@ static int __maps__insert_sorted(struct maps *maps, unsigned int first_after_ind
|
||||
}
|
||||
RC_CHK_ACCESS(maps)->nr_maps = nr_maps + to_add;
|
||||
maps__set_maps_by_name_sorted(maps, false);
|
||||
map__set_kmap_maps(new1, maps);
|
||||
map__set_kmap_maps(new2, maps);
|
||||
|
||||
check_invariants(maps);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user