diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-07-08 17:08:34 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-08-19 18:45:35 +0200 |
commit | a9536fe9d0d2a01bf2b168e742736b014723c99b (patch) | |
tree | bd8b1d85c096ed67a84ea75a566eefff31497ca9 /lib/fstree/hardlink.c | |
parent | a9989093d0a8832df326f543940560431e884338 (diff) |
Fix: libfstree: actually use a full 32 bit hard link counter
The squashfs on-disk format uses 32 bit link counters, but the fstree
used 16 bit ones. Because the link count also includes child nodes,
this artificially limited the number of entries in a directory to ~64k
files.
This patch removes the limit by switching libfstree to 32 bit counters.
Reported-by: Marvin Renich <mrvn@renich.org>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstree/hardlink.c')
-rw-r--r-- | lib/fstree/hardlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fstree/hardlink.c b/lib/fstree/hardlink.c index 11ab566..f45acf7 100644 --- a/lib/fstree/hardlink.c +++ b/lib/fstree/hardlink.c @@ -62,7 +62,7 @@ int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node) return -1; } - if (node->link_count == 0x0FFFF) { + if (node->link_count == 0xFFFFFFFF) { errno = EMLINK; return -1; } |