skb_queue_splice_tail() is able to do the same thing as a loop with
__skb_dequeue() and __skb_queue_tail() like we have it now.

Cc: Vasu Dev <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
 drivers/scsi/fcoe/fcoe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index a065b31a7a02..15826094cc65 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1311,8 +1311,8 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu)
                        FCOE_DBG("Moving frames from CPU %d to CPU %d\n",
                                 cpu, targ_cpu);
 
-                       while ((skb = __skb_dequeue(&p->fcoe_rx_list)) != NULL)
-                               __skb_queue_tail(&p_target->fcoe_rx_list, skb);
+                       skb_queue_splice_tail(&p->fcoe_rx_list,
+                                             &p_target->fcoe_rx_list);
                        spin_unlock_bh(&p_target->fcoe_rx_list.lock);
                } else {
                        /*
-- 
2.7.0

_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to