inode: add hlist_fake to avoid the inode hash lock in evict
[cascardo/linux.git] / include / linux / list.h
index feb773c..3e3e64a 100644 (file)
@@ -672,6 +672,11 @@ static inline void hlist_add_fake(struct hlist_node *n)
        n->pprev = &n->next;
 }
 
+static inline bool hlist_fake(struct hlist_node *h)
+{
+       return h->pprev == &h->next;
+}
+
 /*
  * Move a list from one list head to another. Fixup the pprev
  * reference of the first entry if it exists.