Just pointing out that these lists are circular. Back in the old days we used to call them “rings”.
From list.h:
183 /**
184 * list_empty - tests whether a list is empty
185 * @head: the list to test.
186 */
187 static inline int list_empty(const struct list_head *head)
188 {
189 return head->next == head;
190 }
Jeff Haran