Message ID | 1452581379-18162-5-git-send-email-m@bjorling.me (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Jens Axboe |
Headers | show |
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index f4bc986..748cab49 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -845,6 +845,12 @@ static int rrpc_submit_io(struct rrpc *rrpc, struct bio *bio, if (err) { pr_err("rrpc: I/O submission failed: %d\n", err); bio_put(bio); + if (!(flags & NVM_IOTYPE_GC)) { + rrpc_unlock_rq(rrpc, rqd); + if (rqd->nr_pages > 1) + nvm_dev_dma_free(rrpc->dev, + rqd->ppa_list, rqd->dma_ppa_list); + } return NVM_IO_ERR; }