bdi: fix wrong error return value in cgwb_create()
On wb_congested_get_create() failure, cgwb_create() forgot to set @ret to -ENOMEM ending up returning 0. Fix it so that it returns -ENOMEM. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
d2e73fcceb
commit
5857cd637b
|
@ -554,8 +554,10 @@ static int cgwb_create(struct backing_dev_info *bdi,
|
|||
goto err_ref_exit;
|
||||
|
||||
wb->congested = wb_congested_get_create(bdi, blkcg_css->id, gfp);
|
||||
if (!wb->congested)
|
||||
if (!wb->congested) {
|
||||
ret = -ENOMEM;
|
||||
goto err_fprop_exit;
|
||||
}
|
||||
|
||||
wb->memcg_css = memcg_css;
|
||||
wb->blkcg_css = blkcg_css;
|
||||
|
|
Loading…
Reference in New Issue