]> www.infradead.org Git - users/hch/block.git/commit
blk-cgroup: improve error unwinding in blkg_alloc
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Feb 2023 07:23:19 +0000 (08:23 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 3 Feb 2023 08:02:00 +0000 (09:02 +0100)
commitfbf34815fe70c9f9878f9f862bded10a867066a3
treef3af6f21fa7ef66764f8fb9d9d69ecdf42bef90a
parentb3733b2a4ff62cdf1700412b8e83dc7840155be9
blk-cgroup: improve error unwinding in blkg_alloc

Unwind only the previous initialization steps that happened in blkg_alloc
using goto based unwinding.  This avoids the need for the !queue special
case in blkg_free and thus ensures that any blkg seens outside of
blkg_alloc is always fully constructed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
block/blk-cgroup.c