Skip to content

Commit dcfad4a

Browse files
igawkeithbusch
authored andcommitted
nvmet-fcloop: swap the list_add_tail arguments
The first argument of list_add_tail function is the new element which should be added to the list which is the second argument. Swap the arguments to allow processing more than one element at a time. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 70fbfc4 commit dcfad4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/nvme/target/fcloop.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ fcloop_h2t_ls_req(struct nvme_fc_local_port *localport,
358358
if (!rport->targetport) {
359359
tls_req->status = -ECONNREFUSED;
360360
spin_lock(&rport->lock);
361-
list_add_tail(&rport->ls_list, &tls_req->ls_list);
361+
list_add_tail(&tls_req->ls_list, &rport->ls_list);
362362
spin_unlock(&rport->lock);
363363
queue_work(nvmet_wq, &rport->ls_work);
364364
return ret;
@@ -391,7 +391,7 @@ fcloop_h2t_xmt_ls_rsp(struct nvmet_fc_target_port *targetport,
391391
if (remoteport) {
392392
rport = remoteport->private;
393393
spin_lock(&rport->lock);
394-
list_add_tail(&rport->ls_list, &tls_req->ls_list);
394+
list_add_tail(&tls_req->ls_list, &rport->ls_list);
395395
spin_unlock(&rport->lock);
396396
queue_work(nvmet_wq, &rport->ls_work);
397397
}
@@ -446,7 +446,7 @@ fcloop_t2h_ls_req(struct nvmet_fc_target_port *targetport, void *hosthandle,
446446
if (!tport->remoteport) {
447447
tls_req->status = -ECONNREFUSED;
448448
spin_lock(&tport->lock);
449-
list_add_tail(&tport->ls_list, &tls_req->ls_list);
449+
list_add_tail(&tls_req->ls_list, &tport->ls_list);
450450
spin_unlock(&tport->lock);
451451
queue_work(nvmet_wq, &tport->ls_work);
452452
return ret;

0 commit comments

Comments
 (0)