From: John L. Hammond Date: Wed, 14 Mar 2018 17:12:06 +0000 (-0500) Subject: LU-10819 o2ib: use splice in kiblnd_peer_connect_failed() X-Git-Tag: 2.11.51~37 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=f3824b978efe810f4cca42e75f09b5a9860178c5;p=fs%2Flustre-release.git LU-10819 o2ib: use splice in kiblnd_peer_connect_failed() In kiblnd_peer_connect_failed() replace a backwards list_add() and list_del() with list_splice_init(). Signed-off-by: John L. Hammond Change-Id: Ib00d5d911d1070b6c8b49f14a2c7fc3552da553c Reviewed-on: https://review.whamcloud.com/31643 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index cf753dd..cd22264 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2168,8 +2168,7 @@ kiblnd_peer_connect_failed(kib_peer_ni_t *peer_ni, int active, int error) peer_ni->ibp_reconnected = 0; if (list_empty(&peer_ni->ibp_conns)) { /* Take peer_ni's blocked transmits to complete with error */ - list_add(&zombies, &peer_ni->ibp_tx_queue); - list_del_init(&peer_ni->ibp_tx_queue); + list_splice_init(&peer_ni->ibp_tx_queue, &zombies); if (kiblnd_peer_active(peer_ni)) kiblnd_unlink_peer_locked(peer_ni);