1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28034

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 {