From: Eric Biggers Date: Fri, 21 Dec 2012 17:58:47 +0000 (-0600) Subject: fix_true_inode(): Fix bug X-Git-Tag: v1.2.2~3 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=266d03613339dbe9a433c9849b6b4c47e0090dc8;ds=sidebyside fix_true_inode(): Fix bug --- diff --git a/NEWS b/NEWS index 1145194a..baafabaa 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ Version 1.2.2: and should now be even faster. (Although, they were already pretty fast--- much faster than typical I/O speeds.) + Fixed a bug introduced in v1.2.1 that would cause a directory tree + containing hard links to be captured incorrectly in some cases. + Version 1.2.1: By default, unmounting a read-write mounted WIM with 'imagex unmount --commit' will now change the WIM in-place without needing to write the diff --git a/src/hardlink.c b/src/hardlink.c index 7603670d..93030d8f 100644 --- a/src/hardlink.c +++ b/src/hardlink.c @@ -278,6 +278,8 @@ static int fix_true_inode(struct inode *inode, struct hlist_head *inode_list) return WIMLIB_ERR_INVALID_DENTRY; } /* Free the unneeded `struct inode'. */ + dentry->d_inode->hlist.next = NULL; + dentry->d_inode->hlist.pprev = NULL; free_inode(dentry->d_inode); dentry->d_inode = ref_inode; ref_inode->link_count++;