+static struct __prelim_ref *list_first_pref(struct list_head *head)
+{
+ return list_first_entry(head, struct __prelim_ref, list);
+}
+
+struct pref_state {
+ struct list_head pending;
+ struct list_head pending_missing_keys;
+ struct list_head pending_indirect_refs;
+};
+
+static void init_pref_state(struct pref_state *prefstate)
+{
+ INIT_LIST_HEAD(&prefstate->pending);
+ INIT_LIST_HEAD(&prefstate->pending_missing_keys);
+ INIT_LIST_HEAD(&prefstate->pending_indirect_refs);
+}
+