Lines Matching refs:n
64 struct hlist_bl_node *n) in hlist_bl_set_first() argument
66 LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); in hlist_bl_set_first()
69 h->first = (struct hlist_bl_node *)((unsigned long)n | LIST_BL_LOCKMASK); in hlist_bl_set_first()
77 static inline void hlist_bl_add_head(struct hlist_bl_node *n, in hlist_bl_add_head() argument
82 n->next = first; in hlist_bl_add_head()
84 first->pprev = &n->next; in hlist_bl_add_head()
85 n->pprev = &h->first; in hlist_bl_add_head()
86 hlist_bl_set_first(h, n); in hlist_bl_add_head()
89 static inline void hlist_bl_add_before(struct hlist_bl_node *n, in hlist_bl_add_before() argument
94 n->pprev = pprev; in hlist_bl_add_before()
95 n->next = next; in hlist_bl_add_before()
96 next->pprev = &n->next; in hlist_bl_add_before()
101 ((uintptr_t)n | ((uintptr_t)*pprev & LIST_BL_LOCKMASK))); in hlist_bl_add_before()
104 static inline void hlist_bl_add_behind(struct hlist_bl_node *n, in hlist_bl_add_behind() argument
107 n->next = prev->next; in hlist_bl_add_behind()
108 n->pprev = &prev->next; in hlist_bl_add_behind()
109 prev->next = n; in hlist_bl_add_behind()
111 if (n->next) in hlist_bl_add_behind()
112 n->next->pprev = &n->next; in hlist_bl_add_behind()
115 static inline void __hlist_bl_del(struct hlist_bl_node *n) in __hlist_bl_del() argument
117 struct hlist_bl_node *next = n->next; in __hlist_bl_del()
118 struct hlist_bl_node **pprev = n->pprev; in __hlist_bl_del()
120 LIST_BL_BUG_ON((unsigned long)n & LIST_BL_LOCKMASK); in __hlist_bl_del()
131 static inline void hlist_bl_del(struct hlist_bl_node *n) in hlist_bl_del() argument
133 __hlist_bl_del(n); in hlist_bl_del()
134 n->next = LIST_POISON1; in hlist_bl_del()
135 n->pprev = LIST_POISON2; in hlist_bl_del()
138 static inline void hlist_bl_del_init(struct hlist_bl_node *n) in hlist_bl_del_init() argument
140 if (!hlist_bl_unhashed(n)) { in hlist_bl_del_init()
141 __hlist_bl_del(n); in hlist_bl_del_init()
142 INIT_HLIST_BL_NODE(n); in hlist_bl_del_init()
183 #define hlist_bl_for_each_entry_safe(tpos, pos, n, head, member) \ argument
185 pos && ({ n = pos->next; 1; }) && \
187 pos = n)