summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-11 02:07:20 +0200
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-11 02:07:20 +0200
commit2d13d8d065cc7bbee6b1ad6ee3fe965d66badfe6 (patch)
tree63a34bb33e34fb9bfe2e866cdb83058266355f63 /fs/btrfs/super.c
parentBtrfs: subvolumes (diff)
downloadlinux-2d13d8d065cc7bbee6b1ad6ee3fe965d66badfe6.tar.xz
linux-2d13d8d065cc7bbee6b1ad6ee3fe965d66badfe6.zip
Btrfs: detect duplicate subvol names
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c4
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
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;
- root_dirid = btrfs_root_dirid(
- &root->fs_info->tree_root->root_item);
+ root_dirid = root->fs_info->sb->s_root->d_inode->i_ino,
mutex_lock(&root->fs_info->fs_mutex);
ret = btrfs_lookup_dir_item(NULL, root->fs_info->tree_root,
path, root_dirid,
vol_args.name, namelen, 0);
mutex_unlock(&root->fs_info->fs_mutex);
+ btrfs_free_path(path);
if (ret == 0)
return -EEXIST;