|
@@ -264,6 +264,17 @@ static inline void list_move_tail(struct list_head *list,
|
|
|
list_add_tail(list, head);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * list_is_last - tests whether @list is the last entry in list @head
|
|
|
+ * @list: the entry to test
|
|
|
+ * @head: the head of the list
|
|
|
+ */
|
|
|
+static inline int list_is_last(const struct list_head *list,
|
|
|
+ const struct list_head *head)
|
|
|
+{
|
|
|
+ return list->next == head;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* list_empty - tests whether a list is empty
|
|
|
* @head: the list to test.
|