aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2008-02-15 17:38:01 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-19 00:29:28 -0400
commitad775f5a8faa5845377f093ca11caf577404add9 (patch)
treef124ff1038672b8d2ef004d75c844f740d8fe52b /lib
parent2e4b7fcd926006531935a4c79a5e9349fe51125b (diff)
[PATCH] r/o bind mounts: debugging for missed calls
There have been a few oopses caused by 'struct file's with NULL f_vfsmnts. There was also a set of potentially missed mnt_want_write()s from dentry_open() calls. This patch provides a very simple debugging framework to catch these kinds of bugs. It will WARN_ON() them, but should stop us from having any oopses or mnt_writer count imbalances. I'm quite convinced that this is a good thing because it found bugs in the stuff I was working on as soon as I wrote it. [hch: made it conditional on a debug option. But it's still a little bit too ugly] [hch: merged forced remount r/o fix from Dave and akpm's fix for the fix] Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 95de3102bc8..623ef24c238 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -427,6 +427,16 @@ config DEBUG_VM
427 427
428 If unsure, say N. 428 If unsure, say N.
429 429
430config DEBUG_WRITECOUNT
431 bool "Debug filesystem writers count"
432 depends on DEBUG_KERNEL
433 help
434 Enable this to catch wrong use of the writers count in struct
435 vfsmount. This will increase the size of each file struct by
436 32 bits.
437
438 If unsure, say N.
439
430config DEBUG_LIST 440config DEBUG_LIST
431 bool "Debug linked list manipulation" 441 bool "Debug linked list manipulation"
432 depends on DEBUG_KERNEL 442 depends on DEBUG_KERNEL