put_page(rdev->bb_page);
rdev->bb_page = NULL;
}
+ kfree(rdev->badblocks.page);
+ rdev->badblocks.page = NULL;
}
EXPORT_SYMBOL_GPL(md_rdev_clear);
sysfs_remove_link(&rdev->kobj, "block");
sysfs_put(rdev->sysfs_state);
rdev->sysfs_state = NULL;
- kfree(rdev->badblocks.page);
rdev->badblocks.count = 0;
- rdev->badblocks.page = NULL;
/* We need to delay this, otherwise we can deadlock when
* writing to 'remove' to "dev/state". We also need
* to delay it due to rcu usage.
if (rdev->bdev)
unlock_rdev(rdev);
md_rdev_clear(rdev);
- kfree(rdev->badblocks.page);
kfree(rdev);
return ERR_PTR(err);
}