From: Benjamin Coddington Date: Tue, 5 Dec 2023 15:05:01 +0000 (-0500) Subject: blocklayoutdriver: Fix reference leak of pnfs_device_node X-Git-Tag: v5.15.148~259 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0e09a7ba33f03914af4432f002fcf87744e4044;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index fe860c5387476..dc657b12822dd 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -599,6 +599,8 @@ retry: nfs4_delete_deviceid(node->ld, node->nfs_client, id); goto retry; } + + nfs4_put_deviceid_node(node); return ERR_PTR(-ENODEV); }