diff --git a/[refs] b/[refs] index 6cc47958e1da..3242b59f74b8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f690efb1aa2a961dd6655529c1797fcac60ad6d9 +refs/heads/master: 6f88a4403def422bd8e276ddf6863d6ac71435d2 diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index e8be478178aa..f2d2f4ccc738 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "compat.h" #include "ctree.h" @@ -2024,6 +2025,9 @@ int btrfs_balance(struct btrfs_root *dev_root) if (dev_root->fs_info->sb->s_flags & MS_RDONLY) return -EROFS; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + mutex_lock(&dev_root->fs_info->volume_mutex); dev_root = dev_root->fs_info->dev_root;