Btrfs: no slashes in subvolume names
authorChris Mason <chris.mason@oracle.com>
Tue, 12 Jun 2007 12:21:35 +0000 (08:21 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Tue, 12 Jun 2007 12:21:35 +0000 (08:21 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c

index 62a3a77..1cabc19 100644 (file)
@@ -1831,6 +1831,8 @@ int btrfs_ioctl(struct inode *inode, struct file *filp, unsigned int
                namelen = strlen(vol_args.name);
                if (namelen > BTRFS_VOL_NAME_MAX)
                        return -EINVAL;
+               if (strchr(vol_args.name, '/'))
+                       return -EINVAL;
                path = btrfs_alloc_path();
                if (!path)
                        return -ENOMEM;