Commit 40a06e75 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] libiscsi: pass session failure a session struct

The api for conn and session failures is akward because
one takes a conn from the lib and one takes a session
from the class. This syncs up the interfaces to use
structs from the lib.
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 4d108350
...@@ -1069,10 +1069,9 @@ struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *conn, itt_t itt) ...@@ -1069,10 +1069,9 @@ struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *conn, itt_t itt)
} }
EXPORT_SYMBOL_GPL(iscsi_itt_to_ctask); EXPORT_SYMBOL_GPL(iscsi_itt_to_ctask);
void iscsi_session_failure(struct iscsi_cls_session *cls_session, void iscsi_session_failure(struct iscsi_session *session,
enum iscsi_err err) enum iscsi_err err)
{ {
struct iscsi_session *session = cls_session->dd_data;
struct iscsi_conn *conn; struct iscsi_conn *conn;
struct device *dev; struct device *dev;
unsigned long flags; unsigned long flags;
...@@ -2097,7 +2096,7 @@ EXPORT_SYMBOL_GPL(iscsi_host_alloc); ...@@ -2097,7 +2096,7 @@ EXPORT_SYMBOL_GPL(iscsi_host_alloc);
static void iscsi_notify_host_removed(struct iscsi_cls_session *cls_session) static void iscsi_notify_host_removed(struct iscsi_cls_session *cls_session)
{ {
iscsi_session_failure(cls_session, ISCSI_ERR_INVALID_HOST); iscsi_session_failure(cls_session->dd_data, ISCSI_ERR_INVALID_HOST);
} }
/** /**
......
...@@ -378,7 +378,7 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); ...@@ -378,7 +378,7 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int);
extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
int); int);
extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
extern void iscsi_session_failure(struct iscsi_cls_session *cls_session, extern void iscsi_session_failure(struct iscsi_session *session,
enum iscsi_err err); enum iscsi_err err);
extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
enum iscsi_param param, char *buf); enum iscsi_param param, char *buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment