Btrfs: no slashes in subvolume names

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason 2007-06-12 08:21:35 -04:00 committed by David Woodhouse
parent 5af3981c18
commit 8a712645c3
1 changed files with 2 additions and 0 deletions

View 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;