summaryrefslogtreecommitdiff
path: root/drivers/ipack
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-03-12 15:24:58 -0500
committerDavid Sterba <dsterba@suse.com>2021-04-19 17:25:19 +0200
commitcbdc2ebc7c42a744d2f52a8a4adb0b725798469e (patch)
tree83fba10d1821918995af1556aa1447aa34c3911d /drivers/ipack
parent1c7bfa159fe796f0f6d310b02215d765f066b9c2 (diff)
btrfs: handle errors from select_reloc_root()
Currently select_reloc_root() doesn't return an error, but followup patches will make it possible for it to return an error. We do have proper error recovery in do_relocation however, so handle the possibility of select_reloc_root() having an error properly instead of BUG_ON(!root). I've also adjusted select_reloc_root() to return ERR_PTR(-ENOENT) if we don't find a root, instead of NULL, to make the error case easier to deal with. I've replaced the BUG_ON(!root) with an ASSERT(0) for this case as it indicates we messed up the backref walking code, but it could also indicate corruption. 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 'drivers/ipack')
0 files changed, 0 insertions, 0 deletions