diff options
author | 2017-05-08 16:38:35 -0700 | |
---|---|---|
committer | 2017-05-20 10:11:34 -0600 | |
commit | 549f01ae7b913355bea76100d3f17694bc9ec769 (patch) | |
tree | b94a9dc76ab613e79ee59549afc22100e203362d /drivers/nvme/target/core.c | |
parent | nvmet-fc: remove target cpu scheduling flag (diff) | |
download | linux-549f01ae7b913355bea76100d3f17694bc9ec769.tar.gz linux-549f01ae7b913355bea76100d3f17694bc9ec769.tar.bz2 linux-549f01ae7b913355bea76100d3f17694bc9ec769.zip |
nvmet: release the sq ref on rdma read errors
On rdma read errors, release the sq ref that was taken
when the req was initialized. This avoids a hang in
nvmet_sq_destroy() when the queue is being freed.
Signed-off-by: Vijay Immanuel <vijayi@attalasystems.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r-- | drivers/nvme/target/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index cf90713043da..eb9399ac97cf 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -529,6 +529,12 @@ fail: } EXPORT_SYMBOL_GPL(nvmet_req_init); +void nvmet_req_uninit(struct nvmet_req *req) +{ + percpu_ref_put(&req->sq->ref); +} +EXPORT_SYMBOL_GPL(nvmet_req_uninit); + static inline bool nvmet_cc_en(u32 cc) { return cc & 0x1; |