Add a WARN_ON_ONCE() to check for passing an unreferenced dentry to dput().
commitecd58a22074aba9b66a066bb8b8f91363612c369
authorPaul Menage <menage@google.com>
Thu, 17 Sep 2009 20:55:12 +0000 (17 22:55 +0200)
committerjames toy <toyj@union.edu>
Thu, 17 Sep 2009 20:55:12 +0000 (17 22:55 +0200)
tree9bcd51011b08d2d405dba727444dcba07161f237
parent5c8ad1b3e164ce59cee7611744c8c92baf783d29
Add a WARN_ON_ONCE() to check for passing an unreferenced dentry to dput().

This is analogous to the similar check in dget(), and will make
reference-counting bugs in filesystems more immediately obvious. (I
just spent a while debugging an oops that turned out to be due to
broken fs reference counting.)

Signed-off-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/dcache.c