btrfs: hold a ref on the root in find_data_references
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:42 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:30 +0000 (17:01 +0100)
commit3d7babdcf2cc87367e694f9b67460dde22c48319
tree8dd0d344e51fc369cb5639a6b2acddd497da1e7e
parent442b1ac5244ea2dc09d8aa688b41e0a0c4634b0a
btrfs: hold a ref on the root in find_data_references

We're looking up the data references for the bytenr in a root, we need
to hold a ref on that root while we're doing that.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c