diff options
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r-- | drivers/block/skd_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index a69dd93d1bd5..c48d9084c965 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c | |||
@@ -563,7 +563,6 @@ skd_prep_discard_cdb(struct skd_scsi_request *scsi_req, | |||
563 | 563 | ||
564 | req = skreq->req; | 564 | req = skreq->req; |
565 | blk_add_request_payload(req, page, len); | 565 | blk_add_request_payload(req, page, len); |
566 | req->buffer = buf; | ||
567 | } | 566 | } |
568 | 567 | ||
569 | static void skd_request_fn_not_online(struct request_queue *q); | 568 | static void skd_request_fn_not_online(struct request_queue *q); |
@@ -744,6 +743,7 @@ static void skd_request_fn(struct request_queue *q) | |||
744 | break; | 743 | break; |
745 | } | 744 | } |
746 | skreq->discard_page = 1; | 745 | skreq->discard_page = 1; |
746 | req->completion_data = page; | ||
747 | skd_prep_discard_cdb(scsi_req, skreq, page, lba, count); | 747 | skd_prep_discard_cdb(scsi_req, skreq, page, lba, count); |
748 | 748 | ||
749 | } else if (flush == SKD_FLUSH_ZERO_SIZE_FIRST) { | 749 | } else if (flush == SKD_FLUSH_ZERO_SIZE_FIRST) { |
@@ -858,8 +858,7 @@ static void skd_end_request(struct skd_device *skdev, | |||
858 | (skreq->discard_page == 1)) { | 858 | (skreq->discard_page == 1)) { |
859 | pr_debug("%s:%s:%d, free the page!", | 859 | pr_debug("%s:%s:%d, free the page!", |
860 | skdev->name, __func__, __LINE__); | 860 | skdev->name, __func__, __LINE__); |
861 | free_page((unsigned long)req->buffer); | 861 | __free_page(req->completion_data); |
862 | req->buffer = NULL; | ||
863 | } | 862 | } |
864 | 863 | ||
865 | if (unlikely(error)) { | 864 | if (unlikely(error)) { |