]> www.infradead.org Git - users/jedix/linux-maple.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>
Tue, 6 Apr 2021 19:07:07 +0000 (21:07 +0200)
commite858cb8fb313731eadae891d6573b6a2e74829d8
treea8ee3f7c3381b2292c913fe4f6754d18747e9997
parentafdc3b06b892e2956238acfb39550d132f39ff80
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