]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1c4557a005dc9c43939caf066575a1b8f50d2f98
tree2428fbbf84cf04811edcbf3baebc127711b45d20
parentc92bdb3e22c05dadb51fb965796a3f3e922b4a94
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