]> Pileus Git - ~andy/linux/blobdiff - fs/btrfs/super.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[~andy/linux] / fs / btrfs / super.c
index e73c80eec11bb8e94fe8ed0bedf534f7aa4c5328..d04db817be5c8271f531d87d0ee9a4a950f616f8 100644 (file)
@@ -855,6 +855,7 @@ static struct dentry *get_default_root(struct super_block *sb,
        struct btrfs_path *path;
        struct btrfs_key location;
        struct inode *inode;
+       struct dentry *dentry;
        u64 dir_id;
        int new = 0;
 
@@ -925,7 +926,13 @@ setup_root:
                return dget(sb->s_root);
        }
 
-       return d_obtain_alias(inode);
+       dentry = d_obtain_alias(inode);
+       if (!IS_ERR(dentry)) {
+               spin_lock(&dentry->d_lock);
+               dentry->d_flags &= ~DCACHE_DISCONNECTED;
+               spin_unlock(&dentry->d_lock);
+       }
+       return dentry;
 }
 
 static int btrfs_fill_super(struct super_block *sb,