mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]>
This commit is contained in:
parent
d3b407fb3f
commit
20a308f09e
2 changed files with 2 additions and 5 deletions
|
|
@ -555,6 +555,8 @@ EXPORT_SYMBOL_GPL(badblocks_init);
|
|||
*/
|
||||
void badblocks_exit(struct badblocks *bb)
|
||||
{
|
||||
if (!bb)
|
||||
return;
|
||||
kfree(bb->page);
|
||||
bb->page = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue