nvme: fix kernel paging oops

free the controller discard_page correctly.

Fixes: cb5b7262b0 ("nvme: provide fallback for discard alloc failure")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Sagi Grimberg 2018-12-13 12:34:07 -08:00 committed by Jens Axboe
parent 2d9a058e3f
commit 092ff05200

View File

@ -3596,7 +3596,7 @@ static void nvme_free_ctrl(struct device *dev)
ida_simple_remove(&nvme_instance_ida, ctrl->instance);
kfree(ctrl->effects);
nvme_mpath_uninit(ctrl);
kfree(ctrl->discard_page);
__free_page(ctrl->discard_page);
if (subsys) {
mutex_lock(&subsys->lock);