summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-06-12 14:21:35 +0200
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-06-12 14:21:35 +0200
commit8a712645c3fbbf43293af8640af337b7cf1fef01 (patch)
treee8293af740994a8bd25524cac3ca038b3a9eb40c /fs
parentBtrfs: printk fixes (diff)
downloadlinux-8a712645c3fbbf43293af8640af337b7cf1fef01.tar.xz
linux-8a712645c3fbbf43293af8640af337b7cf1fef01.zip
Btrfs: no slashes in subvolume names
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 62a3a778d37d..1cabc1951b0e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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;