blocklayoutdriver: Fix reference leak of pnfs_device_node
authorBenjamin Coddington <bcodding@redhat.com>
Tue, 5 Dec 2023 15:05:01 +0000 (10:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:18 +0000 (15:35 -0800)
commitb4b7dd1cb6083f88ea16fabca46baf317afbba99
tree76653a1931008415be3eeb539c592297726008dc
parent060d799775f6bafbb877a517370fd4a778ec687a
blocklayoutdriver: Fix reference leak of pnfs_device_node

[ Upstream commit 1530827b90025cdf80c9b0d07a166d045a0a7b81 ]

The error path for blocklayout's device lookup is missing a reference drop
for the case where a lookup finds the device, but the device is marked with
NFS_DEVICEID_UNAVAILABLE.

Fixes: b3dce6a2f060 ("pnfs/blocklayout: handle transient devices")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/blocklayout/blocklayout.c