Add a BUG_ON() 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> --- fs/dcache.c | 1 + 1 file changed, 1 insertion(+) Index: container-2.6.23-rc3-mm1/fs/dcache.c =================================================================== --- container-2.6.23-rc3-mm1.orig/fs/dcache.c +++ container-2.6.23-rc3-mm1/fs/dcache.c @@ -176,6 +176,7 @@ void dput(struct dentry *dentry) if (!dentry) return; + BUG_ON(!atomic_read(&dentry->d_count)); repeat: if (atomic_read(&dentry->d_count) == 1) might_sleep(); -
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 002/196] Chinese: rephrase English introduction in HOWTO |
| Linus Torvalds | Re: Long delay in resume from RAM (Was Re: [patch 00/69] -stablereview) |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
git: | |
| Andi Kleen | [PATCH RFC] [4/9] modpost: Fix format string warnings |
| Rick Jones | Re: Network latency regressions from 2.6.22 to 2.6.29 |
| Antonio Almeida | HTB accuracy for high speed |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
