nbd: add missing config put
authorMike Christie <mchristi@redhat.com>
Tue, 13 Aug 2019 16:39:51 +0000 (11:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:09:45 +0000 (13:09 +0200)
commitd093d3183ca2fdfade6bdd3067b7c674b614f8ad
tree7e8a87808eae1c8202afd0b9d76fef5307b2599c
parente497ec26cc4394624ee90607e7497ad9665c2d86
nbd: add missing config put

[ Upstream commit 887e975c4172d0d5670c39ead2f18ba1e4ec8133 ]

Fix bug added with the patch:

commit 8f3ea35929a0806ad1397db99a89ffee0140822a
Author: Josef Bacik <josef@toxicpanda.com>
Date:   Mon Jul 16 12:11:35 2018 -0400

    nbd: handle unexpected replies better

where if the timeout handler runs when the completion path is and we fail
to grab the mutex in the timeout handler we will leave a config reference
and cannot free the config later.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/nbd.c