Re: wrong hardlink count for /proc/PID directories

From: Egmont Koblinger
Date: Wed Dec 22 2004 - 18:20:15 EST


On Wed, Dec 22, 2004 at 11:42:33PM +0100, Jan Engelhardt wrote:

> Hm, I have 2.6.8+.9-rc2, and /proc/1 for example has a link count of 3 which
> seems reasonable: ".", "fd" and "task".

No, it'd have to be 4 in this case: "1" from "/proc", "." from "/proc/1",
".." from "/proc/1/fd" and ".." from "/proc/1/task" all point to "/proc/1".
It should always be the number of real subdirectories plus two.

Just copy this directory recursively to a real filesystem and check the
hardlink count there.



--
Egmont
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/