diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-03-04 11:18:24 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-03-23 17:01:57 +0100 |
commit | 2abc726ab4b83db774e315c660ab8da21477092f (patch) | |
tree | 026a25254b297d0b984a33940c6475b1d1e7447c /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 6217b0fadd4473a16fabc6aecd7527a9f71af534 (diff) |
btrfs: do not init a reloc root if we aren't relocating
We previously were checking if the root had a dead root before accessing
root->reloc_root in order to avoid a use-after-free type bug. However
this scenario happens after we've unset the reloc control, so we would
have been saved if we'd simply checked for fs_info->reloc_control. At
this point during relocation we no longer need to be creating new reloc
roots, so simply move this check above the reloc_root checks to avoid
any future races and confusion.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions