blkcg: avoid free blkcg_root when failed to alloc blkcg policy
authorweiping zhang <zhangweiping@didichuxing.com>
Fri, 25 Aug 2017 15:49:32 +0000 (23:49 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Aug 2017 19:51:07 +0000 (13:51 -0600)
commit4c18c9e962eb02e23731e5b40d4474fb04fdcb23
tree2428fbbf84cf04811edcbf3baebc127711b45d20
parent231b3db18d4be74e8b199916911c2c16db1790de
blkcg: avoid free blkcg_root when failed to alloc blkcg policy

this patch fix two errors, firstly avoid kfree blk_root, secondly not
free(blkcg) ,if blkcg alloc fail(blkcg == NULL), just unlock that mutex;

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c