Skip to content

Commit 1530827

Browse files
bcodding-rhamschuma-ntap
authored andcommitted
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: b3dce6a ("pnfs/blocklayout: handle transient devices") Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 31b6290 commit 1530827

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/nfs/blocklayout/blocklayout.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ bl_find_get_deviceid(struct nfs_server *server,
580580
nfs4_delete_deviceid(node->ld, node->nfs_client, id);
581581
goto retry;
582582
}
583+
584+
nfs4_put_deviceid_node(node);
583585
return ERR_PTR(-ENODEV);
584586
}
585587

0 commit comments

Comments
 (0)