diff options
Diffstat (limited to 'include/linux/list.h')
-rw-r--r-- | include/linux/list.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 9a5f8a71810c..3a54266a1e85 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -96,6 +96,11 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
96 | * in an undefined state. | 96 | * in an undefined state. |
97 | */ | 97 | */ |
98 | #ifndef CONFIG_DEBUG_LIST | 98 | #ifndef CONFIG_DEBUG_LIST |
99 | static inline void __list_del_entry(struct list_head *entry) | ||
100 | { | ||
101 | __list_del(entry->prev, entry->next); | ||
102 | } | ||
103 | |||
99 | static inline void list_del(struct list_head *entry) | 104 | static inline void list_del(struct list_head *entry) |
100 | { | 105 | { |
101 | __list_del(entry->prev, entry->next); | 106 | __list_del(entry->prev, entry->next); |
@@ -103,6 +108,7 @@ static inline void list_del(struct list_head *entry) | |||
103 | entry->prev = LIST_POISON2; | 108 | entry->prev = LIST_POISON2; |
104 | } | 109 | } |
105 | #else | 110 | #else |
111 | extern void __list_del_entry(struct list_head *entry); | ||
106 | extern void list_del(struct list_head *entry); | 112 | extern void list_del(struct list_head *entry); |
107 | #endif | 113 | #endif |
108 | 114 | ||
@@ -135,7 +141,7 @@ static inline void list_replace_init(struct list_head *old, | |||
135 | */ | 141 | */ |
136 | static inline void list_del_init(struct list_head *entry) | 142 | static inline void list_del_init(struct list_head *entry) |
137 | { | 143 | { |
138 | __list_del(entry->prev, entry->next); | 144 | __list_del_entry(entry); |
139 | INIT_LIST_HEAD(entry); | 145 | INIT_LIST_HEAD(entry); |
140 | } | 146 | } |
141 | 147 | ||
@@ -146,7 +152,7 @@ static inline void list_del_init(struct list_head *entry) | |||
146 | */ | 152 | */ |
147 | static inline void list_move(struct list_head *list, struct list_head *head) | 153 | static inline void list_move(struct list_head *list, struct list_head *head) |
148 | { | 154 | { |
149 | __list_del(list->prev, list->next); | 155 | __list_del_entry(list); |
150 | list_add(list, head); | 156 | list_add(list, head); |
151 | } | 157 | } |
152 | 158 | ||
@@ -158,7 +164,7 @@ static inline void list_move(struct list_head *list, struct list_head *head) | |||
158 | static inline void list_move_tail(struct list_head *list, | 164 | static inline void list_move_tail(struct list_head *list, |
159 | struct list_head *head) | 165 | struct list_head *head) |
160 | { | 166 | { |
161 | __list_del(list->prev, list->next); | 167 | __list_del_entry(list); |
162 | list_add_tail(list, head); | 168 | list_add_tail(list, head); |
163 | } | 169 | } |
164 | 170 | ||