From a3aec358e9c04a6e9e74317471fb5c3db9f70a95 Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Sat, 9 Jan 2010 20:53:14 +0100 Subject: [PATCH] --- yaml --- r: 182379 b: refs/heads/master c: 5908cdc85eb30f8d07f2cb11d4a62334d7229048 h: refs/heads/master i: 182377: 9f435e3d4a754fbf4d7dfff6bb11a89f5552ae2a 182375: 0d0f205891c4a7d93918f78c483897aaa493a79e v: v3 --- [refs] | 2 +- trunk/include/linux/list.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c1aba75577bd..fc9b71cacad5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 889ff0150661512d79484219612b7e2e024b6c07 +refs/heads/master: 5908cdc85eb30f8d07f2cb11d4a62334d7229048 diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index 969f6e92d089..5d9c6558e8ab 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -205,6 +205,20 @@ static inline int list_empty_careful(const struct list_head *head) return (next == head) && (next == head->prev); } +/** + * list_rotate_left - rotate the list to the left + * @head: the head of the list + */ +static inline void list_rotate_left(struct list_head *head) +{ + struct list_head *first; + + if (!list_empty(head)) { + first = head->next; + list_move_tail(first, head); + } +} + /** * list_is_singular - tests whether a list has just one entry. * @head: the list to test.