]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: return error pointer from alloc_test_extent_buffer
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Dec 2019 11:24:58 +0000 (14:24 +0300)
committerDavid Sterba <dsterba@suse.com>
Fri, 13 Dec 2019 13:09:24 +0000 (14:09 +0100)
commit257dd5b2ac8f93e39669b601763aece6a1c6d7b1
tree840530ae59948efe66243b6b212f2a3ba90104ae
parentd29495652c2bb0954b2b9a95d3bceaa517d07577
btrfs: return error pointer from alloc_test_extent_buffer

Callers of alloc_test_extent_buffer have not correctly interpreted the
return value as error pointer, as alloc_test_extent_buffer should behave
as alloc_extent_buffer. The self-tests were unaffected but
btrfs_find_create_tree_block could call both functions and that would
cause problems up in the call chain.

Fixes: 2e48860fa2d2 ("Btrfs: add sanity tests for new qgroup accounting code")
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/qgroup-tests.c