diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2008-10-01 03:38:38 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 08:56:21 +0200 |
commit | 0c032ab889e7b20b8a5a7d09313e4aca214a15f7 (patch) | |
tree | 921d41ff5a31f9b538b43bea6fb56a6e2467530d /block/blk-integrity.c | |
parent | 74aa8c2cc010035a7eef2b4ca4d6430e0dae206a (diff) | |
download | linux-0c032ab889e7b20b8a5a7d09313e4aca214a15f7.tar.gz linux-0c032ab889e7b20b8a5a7d09313e4aca214a15f7.tar.bz2 linux-0c032ab889e7b20b8a5a7d09313e4aca214a15f7.zip |
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>
Diffstat (limited to 'block/blk-integrity.c')
-rw-r--r-- | block/blk-integrity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 69023da63151..e3817a016a12 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); |