Selaa lähdekoodia

badblocks: rename badblocks_free to badblocks_exit

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 <dan.j.williams@intel.com>
Dan Williams 9 vuotta sitten
vanhempi
commit
d3b407fb3f
4 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 3 3
      block/badblocks.c
  2. 1 1
      block/genhd.c
  3. 1 1
      drivers/md/md.c
  4. 1 1
      include/linux/badblocks.h

+ 3 - 3
block/badblocks.c

@@ -550,12 +550,12 @@ int badblocks_init(struct badblocks *bb, int enable)
 EXPORT_SYMBOL_GPL(badblocks_init);
 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
  * @bb:		the badblocks structure that holds all badblock information
  */
  */
-void badblocks_free(struct badblocks *bb)
+void badblocks_exit(struct badblocks *bb)
 {
 {
 	kfree(bb->page);
 	kfree(bb->page);
 	bb->page = NULL;
 	bb->page = NULL;
 }
 }
-EXPORT_SYMBOL_GPL(badblocks_free);
+EXPORT_SYMBOL_GPL(badblocks_exit);

+ 1 - 1
block/genhd.c

@@ -671,7 +671,7 @@ void del_gendisk(struct gendisk *disk)
 	blk_unregister_region(disk_devt(disk), disk->minors);
 	blk_unregister_region(disk_devt(disk), disk->minors);
 
 
 	if (disk->bb) {
 	if (disk->bb) {
-		badblocks_free(disk->bb);
+		badblocks_exit(disk->bb);
 		kfree(disk->bb);
 		kfree(disk->bb);
 	}
 	}
 
 

+ 1 - 1
drivers/md/md.c

@@ -710,7 +710,7 @@ void md_rdev_clear(struct md_rdev *rdev)
 		put_page(rdev->bb_page);
 		put_page(rdev->bb_page);
 		rdev->bb_page = NULL;
 		rdev->bb_page = NULL;
 	}
 	}
-	badblocks_free(&rdev->badblocks);
+	badblocks_exit(&rdev->badblocks);
 }
 }
 EXPORT_SYMBOL_GPL(md_rdev_clear);
 EXPORT_SYMBOL_GPL(md_rdev_clear);
 
 

+ 1 - 1
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,
 ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len,
 			int unack);
 			int unack);
 int badblocks_init(struct badblocks *bb, int enable);
 int badblocks_init(struct badblocks *bb, int enable);
-void badblocks_free(struct badblocks *bb);
+void badblocks_exit(struct badblocks *bb);
 
 
 #endif
 #endif