extract.c: add missing will_extract_dentry() check
authorEric Biggers <ebiggers3@gmail.com>
Sun, 31 May 2015 21:33:04 +0000 (16:33 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 5 Jun 2015 03:45:35 +0000 (22:45 -0500)
When skipping a dentry tree, not all dentries in that tree will
necessarily be in the extraction list.

src/extract.c

index 417300b769903f6f7ac86eb7d80abd0fcdf7f7b2..625224b34924d4eae6068f15b891402261cdf323 100644 (file)
@@ -580,8 +580,10 @@ dentry_reset_extraction_list_node(struct wim_dentry *dentry)
 static int
 dentry_delete_from_list(struct wim_dentry *dentry, void *_ignore)
 {
-       list_del(&dentry->d_extraction_list_node);
-       dentry_reset_extraction_list_node(dentry);
+       if (will_extract_dentry(dentry)) {
+               list_del(&dentry->d_extraction_list_node);
+               dentry_reset_extraction_list_node(dentry);
+       }
        return 0;
 }