aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2022-07-19 11:18:15 +0200
committerJens Axboe <[email protected]>2022-08-02 17:22:43 -0600
commitca39f7502425d437cbf83d29d99b43bd61342858 (patch)
tree9ae0fbade1d262b2ecb5639f14a97bf580815dbe /net/lapb/lapb_timer.c
parentee1aa06ba3258686452dab2db2a458310a83d07a (diff)
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 <[email protected]> Reviewed-by: Logan Gunthorpe <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Song Liu <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions