diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-01-06 15:03:41 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-01-09 11:39:04 -0500 |
commit | 20a308f09e0d29ce6f5a4114cc476a998d569bfb (patch) | |
tree | 9a367827e11bb0960c975421a2579cb88db09e33 /block/genhd.c | |
parent | d3b407fb3f782bd915db64e266010ea30a2d381e (diff) |
block: clarify badblocks lifetime
The badblocks list attached to a gendisk is allocated by the driver
which equates to the driver owning the lifetime of the object. Do not
automatically free it in del_gendisk(). This is in preparation for
expanding the use of badblocks in libnvdimm drivers and introducing
devm_init_badblocks().
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/block/genhd.c b/block/genhd.c index f463c67e6ba2..aa38cd0a66c7 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -670,11 +670,6 @@ void del_gendisk(struct gendisk *disk) | |||
670 | blk_unregister_queue(disk); | 670 | blk_unregister_queue(disk); |
671 | blk_unregister_region(disk_devt(disk), disk->minors); | 671 | blk_unregister_region(disk_devt(disk), disk->minors); |
672 | 672 | ||
673 | if (disk->bb) { | ||
674 | badblocks_exit(disk->bb); | ||
675 | kfree(disk->bb); | ||
676 | } | ||
677 | |||
678 | part_stat_set_all(&disk->part0, 0); | 673 | part_stat_set_all(&disk->part0, 0); |
679 | disk->part0.stamp = 0; | 674 | disk->part0.stamp = 0; |
680 | 675 | ||