diff options
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_util.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 69e0cfd9887..7ce350578c8 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -500,8 +500,8 @@ struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsi_conn *c spin_unlock_bh(&conn->immed_queue_lock); return NULL; } - list_for_each_entry(qr, &conn->immed_queue_list, qr_list) - break; + qr = list_first_entry(&conn->immed_queue_list, + struct iscsi_queue_req, qr_list); list_del(&qr->qr_list); if (qr->cmd) @@ -575,8 +575,8 @@ struct iscsi_queue_req *iscsit_get_cmd_from_response_queue(struct iscsi_conn *co return NULL; } - list_for_each_entry(qr, &conn->response_queue_list, qr_list) - break; + qr = list_first_entry(&conn->response_queue_list, + struct iscsi_queue_req, qr_list); list_del(&qr->qr_list); if (qr->cmd) |