core: Don't checkout symbolic links via hardlink

Doing so can easily get us up to the maximum ext4 hardlink count.
This commit is contained in:
Colin Walters 2012-05-26 11:55:12 -04:00
parent 1ef6bb0ef6
commit 9582effb8d

View File

@ -4179,6 +4179,17 @@ find_loose_for_checkout (OstreeRepo *self,
}
self = self->parent_repo;
}
else if (S_ISLNK (stbuf.st_mode))
{
/* Don't check out symbolic links via hardlink; it's very easy
* to hit the maximum number of hardlinks to an inode this way,
* especially since right now we have a lot of symbolic links to
* busybox.
*
* fs/ext4/ext4.h:#define EXT4_LINK_MAX 65000
*/
self = self->parent_repo;
}
else
break;