From: Dan Williams Date: Wed, 6 Jan 2016 20:19:22 +0000 (-0800) Subject: badblocks: rename badblocks_free to badblocks_exit X-Git-Tag: v4.1.12-92~18^2^2~31 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f788175b124aabe06a5f6d95183d45bed18675eb;p=users%2Fjedix%2Flinux-maple.git badblocks: rename badblocks_free to badblocks_exit Orabug: 22913653 For symmetry with badblocks_init() make it clear that this path only destroys incremental allocations of a badblocks instance, and does not free the badblocks instance itself. Signed-off-by: Dan Williams (cherry picked from commit d3b407fb3f782bd915db64e266010ea30a2d381e) Signed-off-by: Dan Duval --- diff --git a/block/badblocks.c b/block/badblocks.c index 96aeb9194a2ef..fabf6b64c2d17 100644 --- a/block/badblocks.c +++ b/block/badblocks.c @@ -550,12 +550,12 @@ int badblocks_init(struct badblocks *bb, int enable) EXPORT_SYMBOL_GPL(badblocks_init); /** - * badblocks_free() - free the badblocks structure + * badblocks_exit() - free the badblocks structure * @bb: the badblocks structure that holds all badblock information */ -void badblocks_free(struct badblocks *bb) +void badblocks_exit(struct badblocks *bb) { kfree(bb->page); bb->page = NULL; } -EXPORT_SYMBOL_GPL(badblocks_free); +EXPORT_SYMBOL_GPL(badblocks_exit); diff --git a/block/genhd.c b/block/genhd.c index 648144e992a60..37d8f4ab360c7 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -668,7 +668,7 @@ void del_gendisk(struct gendisk *disk) blk_unregister_region(disk_devt(disk), disk->minors); if (disk->bb) { - badblocks_free(disk->bb); + badblocks_exit(disk->bb); kfree(disk->bb); } diff --git a/drivers/md/md.c b/drivers/md/md.c index 0c71912d7f4c1..dec838ad96266 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -724,7 +724,7 @@ void md_rdev_clear(struct md_rdev *rdev) put_page(rdev->bb_page); rdev->bb_page = NULL; } - badblocks_free(&rdev->badblocks); + badblocks_exit(&rdev->badblocks); } EXPORT_SYMBOL_GPL(md_rdev_clear); diff --git a/include/linux/badblocks.h b/include/linux/badblocks.h index 929344630b51c..2d98c026c57f6 100644 --- a/include/linux/badblocks.h +++ b/include/linux/badblocks.h @@ -48,6 +48,6 @@ ssize_t badblocks_show(struct badblocks *bb, char *page, int unack); ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len, int unack); int badblocks_init(struct badblocks *bb, int enable); -void badblocks_free(struct badblocks *bb); +void badblocks_exit(struct badblocks *bb); #endif