While browsing Linux kernel source, I found hlist_bl_for_each_entry_rcu
macro.Below is its definition
for (pos = hlist_bl_first_rcu(head); \
pos && \
({ tpos = hlist_bl_entry(pos, typeof(*tpos), member); 1; }); \
pos = rcu_dereference_raw(pos->next))
This macro is used in __d_lookup()
to get the dentry. What I do not understand is the line
({ tpos = hlist_bl_entry(pos, typeof(*tpos), member); 1; });
It gets the tpos. What is the use of 1 here ? How to understand this condition in the for loop ?