diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 84abdde4e301..2972aaa9eb7e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1853,13 +1853,13 @@ static int btrfs_ioctl(struct inode *inode, struct file *filp, unsigned int | |||
1853 | path = btrfs_alloc_path(); | 1853 | path = btrfs_alloc_path(); |
1854 | if (!path) | 1854 | if (!path) |
1855 | return -ENOMEM; | 1855 | return -ENOMEM; |
1856 | root_dirid = btrfs_root_dirid( | 1856 | root_dirid = root->fs_info->sb->s_root->d_inode->i_ino, |
1857 | &root->fs_info->tree_root->root_item); | ||
1858 | mutex_lock(&root->fs_info->fs_mutex); | 1857 | mutex_lock(&root->fs_info->fs_mutex); |
1859 | ret = btrfs_lookup_dir_item(NULL, root->fs_info->tree_root, | 1858 | ret = btrfs_lookup_dir_item(NULL, root->fs_info->tree_root, |
1860 | path, root_dirid, | 1859 | path, root_dirid, |
1861 | vol_args.name, namelen, 0); | 1860 | vol_args.name, namelen, 0); |
1862 | mutex_unlock(&root->fs_info->fs_mutex); | 1861 | mutex_unlock(&root->fs_info->fs_mutex); |
1862 | btrfs_free_path(path); | ||
1863 | if (ret == 0) | 1863 | if (ret == 0) |
1864 | return -EEXIST; | 1864 | return -EEXIST; |
1865 | 1865 | ||