]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blkcg: fix gendisk reference leak in blkg_conf_prep()
authorTejun Heo <tj@kernel.org>
Wed, 22 Jul 2015 22:05:53 +0000 (18:05 -0400)
committerSasha Levin <sasha.levin@oracle.com>
Thu, 27 Aug 2015 17:25:46 +0000 (13:25 -0400)
commit595422856699eec52732e03d3711c7045ab96f08
tree72042b53fdc7f882daae17410ab5bb2ed2119997
parent1d9103f6387b1174d769e2f87802af1bd8a7563a
blkcg: fix gendisk reference leak in blkg_conf_prep()

[ Upstream commit 5f6c2d2b7dbb541c1e922538c49fa04c494ae3d7 ]

When a blkcg configuration is targeted to a partition rather than a
whole device, blkg_conf_prep fails with -EINVAL; unfortunately, it
forgets to put the gendisk ref in that case.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
block/blk-cgroup.c