mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
isert-scst: Rename multiple functions and one structure member
Minimize the diffs with the upstream code base by performing the following renames: isert_conn_free() --> isert_put_conn() isert_conn_free_do_work() --> isert_release_work() isert_kref_free() --> isert_release_kref() isert_conn->free_work --> isert_conn->release_work Signed-off-by: Chesnokov Gleb <Chesnokov.G@raidix.com> [ bvanassche: edited patch description ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -224,7 +224,7 @@ struct isert_conn {
|
||||
struct work_struct close_work;
|
||||
struct work_struct drain_work;
|
||||
struct work_struct discon_work;
|
||||
struct work_struct free_work;
|
||||
struct work_struct release_work;
|
||||
struct isert_wr drain_wr_sq;
|
||||
struct isert_wr drain_wr_rq;
|
||||
struct kref kref;
|
||||
@@ -302,7 +302,7 @@ int isert_post_send(struct isert_conn *isert_conn,
|
||||
|
||||
int isert_alloc_conn_resources(struct isert_conn *isert_conn);
|
||||
void isert_free_conn_resources(struct isert_conn *isert_conn);
|
||||
void isert_conn_free(struct isert_conn *isert_conn);
|
||||
void isert_put_conn(struct isert_conn *isert_conn);
|
||||
void isert_conn_disconnect(struct isert_conn *isert_conn);
|
||||
void isert_post_drain(struct isert_conn *isert_conn);
|
||||
void isert_sched_conn_free(struct isert_conn *isert_conn);
|
||||
|
||||
@@ -110,7 +110,7 @@ void isert_free_connection(struct iscsi_conn *iscsi_conn)
|
||||
struct isert_conn, iscsi);
|
||||
|
||||
isert_post_drain(isert_conn);
|
||||
isert_conn_free(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
}
|
||||
|
||||
struct iscsi_cmnd *isert_alloc_login_rsp_pdu(struct iscsi_conn *iscsi_conn)
|
||||
|
||||
@@ -618,7 +618,7 @@ static void isert_conn_drained_do_work(struct work_struct *work)
|
||||
container_of(work, struct isert_conn, drain_work);
|
||||
#endif
|
||||
|
||||
isert_conn_free(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
}
|
||||
|
||||
static void isert_sched_conn_drained(struct isert_conn *isert_conn)
|
||||
@@ -648,7 +648,7 @@ static void isert_conn_closed_do_work(struct work_struct *work)
|
||||
if (!test_bit(ISERT_CONNECTION_ABORTED, &isert_conn->flags))
|
||||
isert_connection_abort(&isert_conn->iscsi);
|
||||
|
||||
isert_conn_free(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
}
|
||||
|
||||
static void isert_sched_conn_closed(struct isert_conn *isert_conn)
|
||||
@@ -663,30 +663,29 @@ static void isert_sched_conn_closed(struct isert_conn *isert_conn)
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
static void isert_conn_free_do_work(void *ctx)
|
||||
static void isert_release_work(void *ctx)
|
||||
#else
|
||||
static void isert_conn_free_do_work(struct work_struct *work)
|
||||
static void isert_release_work(struct work_struct *work)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
struct isert_conn *isert_conn = ctx;
|
||||
#else
|
||||
struct isert_conn *isert_conn =
|
||||
container_of(work, struct isert_conn, free_work);
|
||||
container_of(work, struct isert_conn, release_work);
|
||||
#endif
|
||||
|
||||
isert_conn_free(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
}
|
||||
|
||||
void isert_sched_conn_free(struct isert_conn *isert_conn)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
|
||||
INIT_WORK(&isert_conn->free_work, isert_conn_free_do_work,
|
||||
isert_conn);
|
||||
INIT_WORK(&isert_conn->release_work, isert_release_work, isert_conn);
|
||||
#else
|
||||
INIT_WORK(&isert_conn->free_work, isert_conn_free_do_work);
|
||||
INIT_WORK(&isert_conn->release_work, isert_release_work);
|
||||
#endif
|
||||
isert_conn_queue_work(&isert_conn->free_work);
|
||||
isert_conn_queue_work(&isert_conn->release_work);
|
||||
}
|
||||
|
||||
static void isert_handle_wc_error(struct ib_wc *wc)
|
||||
@@ -1376,7 +1375,7 @@ static void isert_deref_device(struct isert_device *isert_dev)
|
||||
isert_device_release(isert_dev);
|
||||
}
|
||||
|
||||
static void isert_kref_free(struct kref *kref)
|
||||
static void isert_release_kref(struct kref *kref)
|
||||
{
|
||||
struct isert_conn_dev *dev;
|
||||
struct isert_conn *isert_conn =
|
||||
@@ -1421,10 +1420,10 @@ static void isert_kref_free(struct kref *kref)
|
||||
TRACE_EXIT();
|
||||
}
|
||||
|
||||
void isert_conn_free(struct isert_conn *isert_conn)
|
||||
void isert_put_conn(struct isert_conn *isert_conn)
|
||||
{
|
||||
sBUG_ON(kref_read(&isert_conn->kref) == 0);
|
||||
kref_put(&isert_conn->kref, isert_kref_free);
|
||||
kref_put(&isert_conn->kref, isert_release_kref);
|
||||
}
|
||||
|
||||
static int isert_cm_disconnected_handler(struct rdma_cm_id *cm_id,
|
||||
@@ -1447,8 +1446,8 @@ static void isert_immediate_conn_close(struct isert_conn *isert_conn)
|
||||
* one from the init and two from the connect request,
|
||||
* thus it is safe to deref directly before the sched_conn_free.
|
||||
*/
|
||||
isert_conn_free(isert_conn);
|
||||
isert_conn_free(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
isert_put_conn(isert_conn);
|
||||
isert_sched_conn_free(isert_conn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user