On 05/18/2012 09:01 PM, David Sterba wrote: > 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). >
That's true, I'll follow your advice. CAP_SYS_ADMIN has already been there. :) And thanks for reviewing this. thanks, liubo > > david > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html