diff options
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 631a11e15b7c..114b92873894 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -182,6 +182,12 @@ static inline unsigned nvme_map_len(struct request *rq) return blk_rq_bytes(rq); } +static inline void nvme_cleanup_cmd(struct request *req) +{ + if (req->cmd_flags & REQ_DISCARD) + kfree(req->completion_data); +} + static inline int nvme_error_status(u16 status) { switch (status & 0x7ff) { |