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

We look up the root for the bytenr that is failing, so we need to hold a
ref on the root for that operation.

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/scrub.c