diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-19 11:18:16 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-02 17:22:43 -0600 |
commit | c57094a6e1ed5dd2d6401f79b8e6da34dd28f959 (patch) | |
tree | 0eacbc3f0680e8f4d8dab230af8b4ab74634e09a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ca39f7502425d437cbf83d29d99b43bd61342858 (diff) |
md: fix error handling in md_alloc
Error handling in md_alloc is a mess. Untangle it to just free the mddev
directly before add_disk is called and thus the gendisk is globally
visible. After that clear the hold flag and let the mddev_put take care
of cleaning up the mddev through the usual mechanisms.
Fixes: 5e55e2f5fc95 ("[PATCH] md: convert compile time warnings into runtime warnings")
Fixes: 9be68dd7ac0e ("md: add error handling support for add_disk()")
Fixes: 7ad1069166c0 ("md: properly unwind when failing to add the kobject in md_alloc")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions