diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/list.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 5356f4d661a7..5183138aa932 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -679,6 +679,16 @@ static inline bool hlist_fake(struct hlist_node *h) | |||
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | /* | 681 | /* |
| 682 | * Check whether the node is the only node of the head without | ||
| 683 | * accessing head: | ||
| 684 | */ | ||
| 685 | static inline bool | ||
| 686 | hlist_is_singular_node(struct hlist_node *n, struct hlist_head *h) | ||
| 687 | { | ||
| 688 | return !n->next && n->pprev == &h->first; | ||
| 689 | } | ||
| 690 | |||
| 691 | /* | ||
| 682 | * Move a list from one list head to another. Fixup the pprev | 692 | * Move a list from one list head to another. Fixup the pprev |
| 683 | * reference of the first entry if it exists. | 693 | * reference of the first entry if it exists. |
| 684 | */ | 694 | */ |
