btrfs: Add a test for leaking root crash at unmount time

Test if canceled balance could lead to root leakage.
If the kernel has CONFIG_BTRFS_DEBUG compiled, unmount time root leakge
check would detect it, and cause NULL pointer dereference as the pages
of the leaked root are already freed.

The fix is titled "btrfs: relocation: Fix reloc root leakage and the NULL
 pointer reference caused by the leakage".

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Qu Wenruo
2020-05-20 19:44:42 +08:00
committed by Eryu Guan
parent 2efe93a3be
commit a297366f56
3 changed files with 88 additions and 0 deletions
+1
View File
@@ -214,3 +214,4 @@
209 auto quick log
210 auto quick qgroup snapshot
211 auto quick log prealloc
212 auto balance dangerous