From: Martin K. Petersen Date: Wed, 1 Oct 2008 07:38:38 +0000 (-0400) Subject: block: Fix double put in blk_integrity_unregister X-Git-Tag: v2.6.28-rc1~733^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0c032ab889e7b20b8a5a7d09313e4aca214a15f7;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jens Axboe --- diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 69023da6315..e3817a016a1 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c @@ -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);