diff options
| author | Christoph Hellwig <hch@lst.de> | 2022-07-19 11:18:15 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2022-08-02 17:22:43 -0600 |
| commit | ca39f7502425d437cbf83d29d99b43bd61342858 (patch) | |
| tree | 9ae0fbade1d262b2ecb5639f14a97bf580815dbe /tools/perf/scripts/python/stackcollapse.py | |
| parent | md/raid5: Convert prepare_to_wait() to wait_woken() api (diff) | |
| download | linux-ca39f7502425d437cbf83d29d99b43bd61342858.tar.gz linux-ca39f7502425d437cbf83d29d99b43bd61342858.zip | |
md: fix mddev->kobj lifetime
Once a kobject is initialized, the containing object should not be
directly freed. So delay initialization until it is added. Also
remove the kobject_del call as the last put will remove the kobject as
well. The explicitly delete isn't needed here, and dropping it will
simplify further fixes.
With this md_free now does not need to check that ->gendisk is non-NULL
as it is always set by the time that kobject_init is called on
mddev->kobj.
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/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
