提交 0c032ab8 编写于 作者: M Martin K. Petersen 提交者: Jens Axboe

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: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 74aa8c2c
...@@ -376,7 +376,7 @@ void blk_integrity_unregister(struct gendisk *disk) ...@@ -376,7 +376,7 @@ void blk_integrity_unregister(struct gendisk *disk)
kobject_uevent(&bi->kobj, KOBJ_REMOVE); kobject_uevent(&bi->kobj, KOBJ_REMOVE);
kobject_del(&bi->kobj); kobject_del(&bi->kobj);
kobject_put(&disk_to_dev(disk)->kobj);
kmem_cache_free(integrity_cachep, bi); kmem_cache_free(integrity_cachep, bi);
disk->integrity = NULL;
} }
EXPORT_SYMBOL(blk_integrity_unregister); EXPORT_SYMBOL(blk_integrity_unregister);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册