diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e9bdb8b783e5..05446f77f99b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -1333,6 +1333,12 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, | |||
1333 | goto out; | 1333 | goto out; |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | if (name[0] == '.' && | ||
1337 | (namelen == 1 || (name[1] == '.' && namelen == 2))) { | ||
1338 | ret = -EEXIST; | ||
1339 | goto out; | ||
1340 | } | ||
1341 | |||
1336 | if (subvol) { | 1342 | if (subvol) { |
1337 | ret = btrfs_mksubvol(&file->f_path, name, namelen, | 1343 | ret = btrfs_mksubvol(&file->f_path, name, namelen, |
1338 | NULL, transid, readonly); | 1344 | NULL, transid, readonly); |