diff options
author | Tejun Heo <tj@kernel.org> | 2015-06-05 06:20:51 +0900 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-06-04 15:21:43 -0600 |
commit | 5857cd637bc0d60dc7e37af396b01324f199d89b (patch) | |
tree | 7bb918bb9eebec7a03250d5fa74fa5814d1a9a83 /mm | |
parent | d2e73fcceb18570e82cf3f4725b9e4dbd6cb3c31 (diff) | |
download | op-kernel-dev-5857cd637bc0d60dc7e37af396b01324f199d89b.zip op-kernel-dev-5857cd637bc0d60dc7e37af396b01324f199d89b.tar.gz |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 887d72a8..436bb53 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -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; |