]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] procfs: Fix hardlink counts
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)
commitbcf88e1163623e8e8ef2ba7feface9c826a890c9
treeb385deef7d18d781d8f9e02af40c7bce3f43885d
parent7f261b5f0dccd53ed3a9a95b55c36e24a698a92a
[PATCH] procfs: Fix hardlink counts

The pid directories in /proc/ currently return the wrong hardlink count - 3,
when there are actually 4 : ".", "..", "fd", and "task".

This is easy to notice using find(1):
cd /proc/<pid>
find

In the output, you'll see a message similar to:

find: WARNING: Hard link count is wrong for .: this may be a bug in your
filesystem driver.  Automatically turning on find's -noleaf option.
Earlier results may have failed to include directories that should have
been searched.

http://bugs.gentoo.org/show_bug.cgi?id=86031

I also noticed that CONFIG_SECURITY can add a 5th: attr, and performed a
similar fix on the task directories too.

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