Skip to content

Commit

Permalink
block: Fix double put in blk_integrity_unregister
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
martinkpetersen authored and Jens Axboe committed Oct 9, 2008
1 parent 74aa8c2 commit 0c032ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 0c032ab

Please sign in to comment.