summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2023-12-05 10:05:01 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2024-01-04 10:47:56 -0500
commit1530827b90025cdf80c9b0d07a166d045a0a7b81 (patch)
tree16be08bd085b79f25eae3a1d05e96b25962236e2 /fs/nfs
parent31b62908693c90d4d07db597e685d9f25a120073 (diff)
blocklayoutdriver: Fix reference leak of pnfs_device_node
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/blocklayout/blocklayout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 943aeea1eb16..1d1d7abc3205 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -580,6 +580,8 @@ retry:
nfs4_delete_deviceid(node->ld, node->nfs_client, id);
goto retry;
}
+
+ nfs4_put_deviceid_node(node);
return ERR_PTR(-ENODEV);
}