]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
btrfs/219: fix _cleanup() to successful release the loop-device
authorAnand Jain <anand.jain@oracle.com>
Thu, 2 Nov 2023 11:28:20 +0000 (19:28 +0800)
committerZorro Lang <zlang@kernel.org>
Thu, 16 Nov 2023 02:42:39 +0000 (10:42 +0800)
commit7139a0600084b2b8e42cc46743bade5444bd1ba8
treefcb20a0ff79d921cb64879a6d19005bab509fb6e
parent24c58f2d973c855cc0af0a12e225fd2f07b342d4
btrfs/219: fix _cleanup() to successful release the loop-device

When we fail with the message 'We were allowed to mount when we should
have failed,' it will fail to clean up the loop devices, making it
difficult to run further test cases or the same test case again.

So we need a 2nd loop device local variable to release it. Let's
reorganize the local variables to clean them up in the _cleanup() function.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/219