vfs: push dentry_unhash on rmdir into file systems
[deliverable/linux.git] / fs / hostfs / hostfs_kern.c
index d3244d949a4ea140a2a838b8f683a59d029028eb..73ea3ba3e6581c6e4eba65cf9770a8c59ec84b7c 100644 (file)
@@ -612,7 +612,6 @@ struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
                goto out_put;
 
        d_add(dentry, inode);
-       d_set_d_op(dentry, &hostfs_dentry_ops);
        return NULL;
 
  out_put:
@@ -684,6 +683,8 @@ int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
        char *file;
        int err;
 
+       dentry_unhash(dentry);
+
        if ((file = dentry_name(dentry)) == NULL)
                return -ENOMEM;
        err = do_rmdir(file);
@@ -922,6 +923,7 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
        sb->s_blocksize_bits = 10;
        sb->s_magic = HOSTFS_SUPER_MAGIC;
        sb->s_op = &hostfs_sbops;
+       sb->s_d_op = &hostfs_dentry_ops;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
 
        /* NULL is printed as <NULL> by sprintf: avoid that. */
This page took 0.030772 seconds and 5 git commands to generate.