linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VFS: BUG_ON() rehash of an already hashed dentry
@ 2010-02-22 20:42 Valerie Aurora
  0 siblings, 0 replies; only message in thread
From: Valerie Aurora @ 2010-02-22 20:42 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-kernel, linux-fsdevel, Jan Blunck

This is a one-line debugging patch which is invaluable when working on
the dcache.  Can I get a yea or a nay on this so I can drop it if it
will never go in?  Thanks,

-VAL

From: Jan Blunck <jblunck@suse.de>
Date: Sun, 17 May 2009 17:29:47 -0700

BUG_ON() rehash of an already hashed dentry.  For debugging of
dcache-related development.

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Valerie Aurora <vaurora@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
---
 fs/dcache.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 74da947..3d656ab 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1568,6 +1568,7 @@ void d_rehash(struct dentry * entry)
 {
 	spin_lock(&dcache_lock);
 	spin_lock(&entry->d_lock);
+	BUG_ON(!d_unhashed(entry));
 	_d_rehash(entry);
 	spin_unlock(&entry->d_lock);
 	spin_unlock(&dcache_lock);
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-22 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22 20:42 [PATCH] VFS: BUG_ON() rehash of an already hashed dentry Valerie Aurora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).