]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: cleanup error handling in prepare_to_merge
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Mar 2021 20:25:31 +0000 (15:25 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:22 +0000 (17:25 +0200)
commit5ebc32f5ccf2db4577767dfab3cad5621a184d7b
treecffee4da005e3944c06e58b5e855c7365a709296
parent5f5efc62fd538581cd3daea0773f3fcc0cb314ad
btrfs: cleanup error handling in prepare_to_merge

This probably can't happen even with a corrupt file system, because we
would have failed much earlier on than here.  However there's no reason
we can't just check and bail out as appropriate, so do that and convert
the correctness BUG_ON() to an ASSERT().

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c