diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index a9e8633388f40985a0a49246a1e95c37def3cc8f..58c6efa9f9a99970e7599b673df3f65f5f4a9810 100644 --- a/block/bfq-cgroup.c +++ b/block/bfq-cgroup.c @@ -913,7 +913,8 @@ static ssize_t bfq_io_set_weight(struct kernfs_open_file *of, if (ret) return ret; - return bfq_io_set_weight_legacy(of_css(of), NULL, weight); + ret = bfq_io_set_weight_legacy(of_css(of), NULL, weight); + return ret ?: nbytes; } #ifdef CONFIG_DEBUG_BLK_CGROUP