[PATCH] procfs: Fix hardlink counts for /proc/<PID>/task
authorDaniel Drake <dsd@gentoo.org>
Sun, 1 May 2005 15:59:03 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:03 +0000 (08:59 -0700)
commitf246315e1ab96c40978777d1e159820ecca45aa8
tree32ed8f99da48313838d5aa863f5d3e7ed984213f
parentbcf88e1163623e8e8ef2ba7feface9c826a890c9
[PATCH] procfs: Fix hardlink counts for /proc/<PID>/task

The current logic assumes that a /proc/<PID>/task directory should have a
hardlink count of 3, probably counting ".", "..", and a directory for a
single child task.

It's fairly obvious that this doesn't work out correctly when a PID has
more than one child task, which is quite often the case.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/proc/base.c