diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index dd8e3448fe8f..5a72896bd769 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2095,13 +2095,13 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, | |||
2095 | err = inode_permission(inode, MAY_WRITE | MAY_EXEC); | 2095 | err = inode_permission(inode, MAY_WRITE | MAY_EXEC); |
2096 | if (err) | 2096 | if (err) |
2097 | goto out_dput; | 2097 | goto out_dput; |
2098 | |||
2099 | /* check if subvolume may be deleted by a non-root user */ | ||
2100 | err = btrfs_may_delete(dir, dentry, 1); | ||
2101 | if (err) | ||
2102 | goto out_dput; | ||
2103 | } | 2098 | } |
2104 | 2099 | ||
2100 | /* check if subvolume may be deleted by a user */ | ||
2101 | err = btrfs_may_delete(dir, dentry, 1); | ||
2102 | if (err) | ||
2103 | goto out_dput; | ||
2104 | |||
2105 | if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) { | 2105 | if (btrfs_ino(inode) != BTRFS_FIRST_FREE_OBJECTID) { |
2106 | err = -EINVAL; | 2106 | err = -EINVAL; |
2107 | goto out_dput; | 2107 | goto out_dput; |