On Thu, May 17, 2012 at 08:08:08PM +0800, Liu Bo wrote:
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -1303,6 +1303,13 @@ static noinline int btrfs_ioctl_resize(struct 
> btrfs_root *root,
>               ret = -EINVAL;
>               goto out_free;
>       }
> +     if (device->fs_devices && device->fs_devices->seeding) {
> +             printk(KERN_INFO "btrfs: resizer unable to apply on "
> +                    "seeding device %s\n", device->name);
> +             ret = -EACCES;

I think EINVAL would be more appropriate. EACCESS is about permissions
which do not make much sense in context of resizing devices, besides
that CAP_SYS_ADMIN is required anyway (and checked a few lines above).


david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to