mutex_lock(&d_inode(dir)->i_mutex);
        list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) {
                spin_lock(&dentry->d_lock);
-               if (!(d_unhashed(dentry)) && d_really_is_positive(dentry)) {
+               if (simple_positive(dentry)) {
                        dget_dlock(dentry);
                        __d_drop(dentry);
                        spin_unlock(&dentry->d_lock);
 
        hypfs_last_dentry = dentry;
 }
 
-static inline int hypfs_positive(struct dentry *dentry)
-{
-       return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 static void hypfs_remove(struct dentry *dentry)
 {
        struct dentry *parent;
 
        parent = dentry->d_parent;
        mutex_lock(&d_inode(parent)->i_mutex);
-       if (hypfs_positive(dentry)) {
+       if (simple_positive(dentry)) {
                if (d_is_dir(dentry))
                        simple_rmdir(d_inode(parent), dentry);
                else
 
        return 0;
 }
 
-/* simple_positive(file->f_path.dentry) respectively debugfs_positive(),
- * but neither is "reachable" from here.
- * So we have our own inline version of it above.  :-( */
-static inline int debugfs_positive(struct dentry *dentry)
-{
-        return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 /* make sure at *open* time that the respective object won't go away. */
 static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, void *),
                                void *data, struct kref *kref,
        /* serialize with d_delete() */
        mutex_lock(&d_inode(parent)->i_mutex);
        /* Make sure the object is still alive */
-       if (debugfs_positive(file->f_path.dentry)
+       if (simple_positive(file->f_path.dentry)
        && kref_get_unless_zero(kref))
                ret = 0;
        mutex_unlock(&d_inode(parent)->i_mutex);
 
        }
 
        spin_lock(&tmp->d_lock);
-       if (!d_unhashed(tmp) && d_really_is_positive(tmp)) {
+       if (simple_positive(tmp)) {
                dget_dlock(tmp);
                __d_drop(tmp);
                spin_unlock(&tmp->d_lock);
 
        }
 
        spin_lock(&tmp->d_lock);
-       if (!d_unhashed(tmp) && d_really_is_positive(tmp)) {
+       if (simple_positive(tmp)) {
                __d_drop(tmp);
                spin_unlock(&tmp->d_lock);
                simple_unlink(d_inode(parent), tmp);
 
        return d_inode(sbi->sb->s_root)->i_ino;
 }
 
-static inline int simple_positive(struct dentry *dentry)
-{
-       return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 static inline void __autofs4_add_expiring(struct dentry *dentry)
 {
        struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
 
                }
                spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
                if (di->lease_shared_gen == shared_gen &&
-                   !d_unhashed(dentry) && d_really_is_positive(dentry) &&
+                   simple_positive(dentry) &&
                    ceph_snap(d_inode(dentry)) != CEPH_SNAPDIR &&
                    ceph_ino(d_inode(dentry)) != CEPH_INO_CEPH &&
                    fpos_cmp(ctx->pos, di->offset) <= 0)
 
 
        if (dentry) {
                spin_lock(&dentry->d_lock);
-               if (!d_unhashed(dentry) && d_really_is_positive(dentry)) {
+               if (simple_positive(dentry)) {
                        dget_dlock(dentry);
                        __d_drop(dentry);
                        spin_unlock(&dentry->d_lock);
 
        return inode;
 }
 
-static inline int debugfs_positive(struct dentry *dentry)
-{
-       return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 struct debugfs_mount_opts {
        kuid_t uid;
        kgid_t gid;
 {
        int ret = 0;
 
-       if (debugfs_positive(dentry)) {
+       if (simple_positive(dentry)) {
                dget(dentry);
                if (d_is_dir(dentry))
                        ret = simple_rmdir(d_inode(parent), dentry);
         */
        spin_lock(&parent->d_lock);
        list_for_each_entry(child, &parent->d_subdirs, d_child) {
-               if (!debugfs_positive(child))
+               if (!simple_positive(child))
                        continue;
 
                /* perhaps simple_empty(child) makes more sense */
                 * from d_subdirs. When releasing the parent->d_lock we can
                 * no longer trust that the next pointer is valid.
                 * Restart the loop. We'll skip this one with the
-                * debugfs_positive() check.
+                * simple_positive() check.
                 */
                goto loop;
        }
 
 
 #include "internal.h"
 
-static inline int simple_positive(struct dentry *dentry)
-{
-       return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 int simple_getattr(struct vfsmount *mnt, struct dentry *dentry,
                   struct kstat *stat)
 {
 
 
 static void nfs_dentry_handle_enoent(struct dentry *dentry)
 {
-       if (d_really_is_positive(dentry) && !d_unhashed(dentry))
+       if (simple_positive(dentry))
                d_delete(dentry);
 }
 
 
        return dentry;
 }
 
-static inline int tracefs_positive(struct dentry *dentry)
-{
-       return dentry->d_inode && !d_unhashed(dentry);
-}
-
 static int __tracefs_remove(struct dentry *dentry, struct dentry *parent)
 {
        int ret = 0;
 
-       if (tracefs_positive(dentry)) {
+       if (simple_positive(dentry)) {
                if (dentry->d_inode) {
                        dget(dentry);
                        switch (dentry->d_inode->i_mode & S_IFMT) {
         */
        spin_lock(&parent->d_lock);
        list_for_each_entry(child, &parent->d_subdirs, d_child) {
-               if (!tracefs_positive(child))
+               if (!simple_positive(child))
                        continue;
 
                /* perhaps simple_empty(child) makes more sense */
                 * from d_subdirs. When releasing the parent->d_lock we can
                 * no longer trust that the next pointer is valid.
                 * Restart the loop. We'll skip this one with the
-                * tracefs_positive() check.
+                * simple_positive() check.
                 */
                goto loop;
        }
 
        return dentry->d_inode != NULL;
 }
 
+static inline int simple_positive(struct dentry *dentry)
+{
+       return d_really_is_positive(dentry) && !d_unhashed(dentry);
+}
+
 extern void d_set_fallthru(struct dentry *dentry);
 
 static inline bool d_is_fallthru(const struct dentry *dentry)
 
 static struct vfsmount *mount;
 static int mount_count;
 
-static inline int positive(struct dentry *dentry)
-{
-       return d_really_is_positive(dentry) && !d_unhashed(dentry);
-}
-
 static int fill_super(struct super_block *sb, void *data, int silent)
 {
        static struct tree_descr files[] = {{""}};
                return;
 
        mutex_lock(&d_inode(parent)->i_mutex);
-       if (positive(dentry)) {
-               if (d_really_is_positive(dentry)) {
-                       if (d_is_dir(dentry))
-                               simple_rmdir(d_inode(parent), dentry);
-                       else
-                               simple_unlink(d_inode(parent), dentry);
-                       dput(dentry);
-               }
+       if (simple_positive(dentry)) {
+               if (d_is_dir(dentry))
+                       simple_rmdir(d_inode(parent), dentry);
+               else
+                       simple_unlink(d_inode(parent), dentry);
+               dput(dentry);
        }
        mutex_unlock(&d_inode(parent)->i_mutex);
        simple_release_fs(&mount, &mount_count);