]> git.baikalelectronics.ru Git - kernel.git/commit
md: properly unwind when failing to add the kobject in md_alloc
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Sep 2021 11:38:33 +0000 (13:38 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:50:23 +0000 (14:50 -0600)
commitfee490e12a536a2b8ba2727f80143d53d6dfcee4
tree0d1aca1a632d10208555d4212f5af9d30fef4ef7
parent41af4ade88f502ecbb6a3f06dfc216ef1aa0ff80
md: properly unwind when failing to add the kobject in md_alloc

Add proper error handling to delete the gendisk when failing to add
the md kobject and clean up the error unwinding in general.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/md.c