From 266d03613339dbe9a433c9849b6b4c47e0090dc8 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 21 Dec 2012 11:58:47 -0600 Subject: [PATCH] fix_true_inode(): Fix bug --- NEWS | 3 +++ src/hardlink.c | 2 ++ 2 files changed, 5 insertions(+) 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++; -- 2.43.0