+/* Return hash of the "unnamed" (default) data stream. */
+static inline const u8 *dentry_hash(const struct dentry *dentry)
+{
+ /* If there are alternate data streams, the dentry hash field is zeroed
+ * out, and we need to find the hash in the un-named data stream (should
+ * be the first one, but check them in order just in case, and fall back
+ * to the dentry hash field if we can't find an unnamed data stream). */
+ for (u16 i = 0; i < dentry->num_ads; i++)
+ if (dentry->ads_entries[i].stream_name_len == 0)
+ return dentry->ads_entries[i].hash;
+ return dentry->hash;
+}
+
+static inline size_t dentry_link_group_size(const struct dentry *dentry)
+{
+ const struct list_head *cur = &dentry->link_group_list;
+ size_t size = 0;
+ do {
+ size++;
+ cur = cur->next;
+ } while (cur != &dentry->link_group_list);
+ return size;
+}
+
+extern struct ads_entry *dentry_get_ads_entry(struct dentry *dentry,
+ const char *stream_name);
+
+extern struct ads_entry *dentry_add_ads(struct dentry *dentry,
+ const char *stream_name);
+
+extern void dentry_remove_ads(struct dentry *dentry, struct ads_entry *entry);
+
+extern const char *path_stream_name(const char *path);
+