swim: fix cleanup on setup error
authorOmar Sandoval <osandov@fb.com>
Thu, 11 Oct 2018 19:20:41 +0000 (12:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:14:52 +0000 (11:14 -0800)
commit8ac8e0fecd5e36caf0bdb34ccb9e6dc4853c62b3
treefb16915a22912716dd4774d9fa52f892bd4ae1f5
parent7084b74ffc246e781c77a963321f34b661ea49cc
swim: fix cleanup on setup error

[ Upstream commit 1448a2a5360ae06f25e2edc61ae070dff5c0beb4 ]

If we fail to allocate the request queue for a disk, we still need to
free that disk, not just the previous ones. Additionally, we need to
cleanup the previous request queues.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/swim.c