If, in a level N dump, the file with the inode number X is a

non-directory file with more than one link to it, but in a level M > N
dump, the file with the inode number X is a plain file, "restore", when
restoring the level M dump, won't remove all the hard links to the old
file.

Submitted by:	guy@netapp.com (Guy Harris)
This commit is contained in:
Joerg Wunsch 1997-08-10 14:19:13 +00:00
parent ac77b4810d
commit edb398d7d9

View File

@ -428,8 +428,12 @@ nodeupdates(name, ino, type)
}
if (ip->e_type == LEAF) {
/* changing from leaf to node */
removeleaf(ip);
freeentry(ip);
for (ip = lookupino(ino); ip != NULL; ip = ip->e_links) {
if (ip->e_type != LEAF)
badentry(ip, "NODE and LEAF links to same inode");
removeleaf(ip);
freeentry(ip);
}
ip = addentry(name, ino, type);
newnode(ip);
} else {