ret->link.next is tested to see if it is NULL unlocked to avoid obtaining taillock when it is not nexessary then retested once the taillock is obtained.
ret->link.next is tested to see if it is NULL unlocked to avoid obtaining taillock when it is not nexessary then retested once the taillock is obtained.