diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-09 02:54:55 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-09 02:54:55 +0000 |
commit | 493c987f7a352ca64fdb4dc03a21e24cbaf46f55 (patch) | |
tree | 184cddc0925e082c0500afd042f92e9f340fe890 /include/linux/dcache.h | |
parent | 2d25612a92c62b5708d6d43f38d28c6141173328 (diff) |
Merge with Linux 2.4.0-pre3-test6.
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index bae5641fd..7c0acf4bb 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -198,8 +198,8 @@ extern void d_rehash(struct dentry *); static __inline__ void d_add(struct dentry * entry, struct inode * inode) { - d_rehash(entry); d_instantiate(entry, inode); + d_rehash(entry); } /* used for rename() and baskets */ @@ -227,6 +227,8 @@ extern char * __d_path(struct dentry *, struct vfsmount *, struct dentry *, static __inline__ struct dentry * dget(struct dentry *dentry) { + if (!atomic_read(&dentry->d_count)) + BUG(); if (dentry) atomic_inc(&dentry->d_count); return dentry; @@ -244,12 +246,7 @@ static __inline__ int d_unhashed(struct dentry *dentry) return list_empty(&dentry->d_hash); } -extern void __dput(struct dentry *); -static __inline__ void dput(struct dentry *dentry) -{ - if (dentry && atomic_dec_and_test(&dentry->d_count)) - __dput(dentry); -} +extern void dput(struct dentry *); static __inline__ int d_mountpoint(struct dentry *dentry) { |