summaryrefslogtreecommitdiff
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-02-26 21:49:57 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2003-02-26 21:49:57 -0800
commitfffd915522cb703e95381fc52c0ac3843f013f18 (patch)
tree7efd17b1bd1a584a7fa10633d26b4b5e99283deb /include/linux/dcache.h
parenta6cc5237a1f189c30cd06d05e2955e5bc63d8913 (diff)
parentbe8013e867207d570f33cc1c66bd06797f1eed6b (diff)
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/pci-2.5
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 339a770eedbd..bb9e6b8b15c2 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -262,6 +262,8 @@ extern char * d_path(struct dentry *, struct vfsmount *, char *, int);
static __inline__ struct dentry * dget(struct dentry *dentry)
{
if (dentry) {
+ if (!atomic_read(&dentry->d_count))
+ BUG();
atomic_inc(&dentry->d_count);
dentry->d_vfs_flags |= DCACHE_REFERENCED;
}