Skip to contentSkip to conversation

VFS: BUG_ON() rehash of an already hashed dentry

PATCH New Valerie Aurora 1 participant 1 message Feb 22, 2010 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VFS: BUG_ON() rehash of an already hashed dentry

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 <[email protected]>
Date: Sun, 17 May 2009 17:29:47 -0700

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

---
 fs/dcache.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/dcache.c +1 -0
index 74da947..3d656ab 100644
@@ -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);
Signature · 1 line
1.5.6.5