#define ISCSI_CONN_ATTRS 13
#define ISCSI_HOST_ATTRS 4
-#define ISCSI_TRANSPORT_VERSION "2.0-869"
+#define ISCSI_TRANSPORT_VERSION "2.0-870"
struct iscsi_internal {
int daemon_pid;
struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle)
{
+ struct iscsi_endpoint *ep;
struct device *dev;
dev = class_find_device(&iscsi_endpoint_class, &handle,
if (!dev)
return NULL;
- return iscsi_dev_to_endpoint(dev);
+ ep = iscsi_dev_to_endpoint(dev);
+ /*
+ * we can drop this now because the interface will prevent
+ * removals and lookups from racing.
+ */
+ put_device(dev);
+ return ep;
}
EXPORT_SYMBOL_GPL(iscsi_lookup_endpoint);