block: Fix double put in blk_integrity_unregister
- kobject_del already puts the parent. - Set integrity profile to NULL to prevent stale data. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
74aa8c2cc0
commit
0c032ab889
1 changed files with 1 additions and 1 deletions
|
@ -376,7 +376,7 @@ void blk_integrity_unregister(struct gendisk *disk)
|
|||
|
||||
kobject_uevent(&bi->kobj, KOBJ_REMOVE);
|
||||
kobject_del(&bi->kobj);
|
||||
kobject_put(&disk_to_dev(disk)->kobj);
|
||||
kmem_cache_free(integrity_cachep, bi);
|
||||
disk->integrity = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(blk_integrity_unregister);
|
||||
|
|
Loading…
Reference in a new issue