[SCSI] iscsi: fix iscsi_endpoint leak
When iscsid restarts it does not know the connection's endpoint, so it is getting leaked. This fixes the problem by having the iscsi class force a disconnect before a new connection is bound. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
fdafd4dfc7
commit
22a39fbbfe
@@ -160,6 +160,8 @@ struct iscsi_cls_conn {
|
||||
void *dd_data; /* LLD private data */
|
||||
struct iscsi_transport *transport;
|
||||
uint32_t cid; /* connection id */
|
||||
struct mutex ep_mutex;
|
||||
struct iscsi_endpoint *ep;
|
||||
|
||||
int active; /* must be accessed with the connlock */
|
||||
struct device dev; /* sysfs transport/container device */
|
||||
@@ -222,6 +224,7 @@ struct iscsi_endpoint {
|
||||
void *dd_data; /* LLD private data */
|
||||
struct device dev;
|
||||
uint64_t id;
|
||||
struct iscsi_cls_conn *conn;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user