diff --git a/[refs] b/[refs] index 16485c3861ba..0fe8916ee67e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3d8d996e0ca5b4093203d3f050b0f70b5c949ae8 +refs/heads/master: 99602572812442d47403d85f376ad51298dd82a6 diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index dac16f99c701..b4a939b6b625 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -319,6 +319,15 @@ static inline int list_empty_careful(const struct list_head *head) return (next == head) && (next == head->prev); } +/** + * list_is_singular - tests whether a list has just one entry. + * @head: the list to test. + */ +static inline int list_is_singular(const struct list_head *head) +{ + return !list_empty(head) && (head->next == head->prev); +} + static inline void __list_splice(struct list_head *list, struct list_head *head) {