]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: Don't panic when we can't find a root key
authorQu Wenruo <wqu@suse.com>
Tue, 26 Feb 2019 08:33:56 +0000 (16:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:20 +0000 (06:43 -0700)
commit40b111b4170c3ebfeb8e078848905960f3a27aa5
tree22c501b5c792403bf9c940881e805d55f988726a
parent2d39b32c2f1448a423c5f7cd724bb3c7750dcea0
btrfs: Don't panic when we can't find a root key

[ Upstream commit 7ac1e464c4d473b517bb784f30d40da1f842482e ]

When we failed to find a root key in btrfs_update_root(), we just panic.

That's definitely not cool, fix it by outputting an unique error
message, aborting current transaction and return -EUCLEAN. This should
not normally happen as the root has been used by the callers in some
way.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/root-tree.c