+static uint64_t
+ntfs_3g_count_dentries(const struct list_head *dentry_list)
+{
+ const struct wim_dentry *dentry;
+ uint64_t count = 0;
+
+ list_for_each_entry(dentry, dentry_list, d_extraction_list_node) {
+ count++;
+ if ((dentry->d_inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) &&
+ dentry_has_short_name(dentry))
+ {
+ count++;
+ }
+
+ }
+
+ return count;
+}
+