]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - block/cfq-iosched.c
blkcg: refine error codes returned during blkcg configuration
[mirror_ubuntu-hirsute-kernel.git] / block / cfq-iosched.c
index bcf40266bd0a617dbc4c3c3d550b2829defe6d40..38277e3ce28611fcb849db5e1649fa7851ca99ec 100644 (file)
@@ -1755,7 +1755,7 @@ static ssize_t __cfqg_set_weight_device(struct kernfs_open_file *of,
        cfqg = blkg_to_cfqg(ctx.blkg);
        cfqgd = blkcg_to_cfqgd(blkcg);
 
-       ret = -EINVAL;
+       ret = -ERANGE;
        if (!ctx.v || (ctx.v >= CFQ_WEIGHT_MIN && ctx.v <= CFQ_WEIGHT_MAX)) {
                if (!is_leaf_weight) {
                        cfqg->dev_weight = ctx.v;