Commit c5a9abfa authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

nvmet: remove nvmet_req_cns_error_complete



Just fold it into the only caller.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
parent 93263535
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -721,7 +721,10 @@ static void nvmet_execute_identify(struct nvmet_req *req)
		break;
	}

	nvmet_req_cns_error_complete(req);
	pr_debug("unhandled identify cns %d on qid %d\n",
	       req->cmd->identify.cns, req->sq->qid);
	req->error_loc = offsetof(struct nvme_identify, cns);
	nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
}

/*
+0 −8
Original line number Diff line number Diff line
@@ -687,14 +687,6 @@ static inline bool nvmet_use_inline_bvec(struct nvmet_req *req)
	       req->sg_cnt <= NVMET_MAX_INLINE_BIOVEC;
}

static inline void nvmet_req_cns_error_complete(struct nvmet_req *req)
{
	pr_debug("unhandled identify cns %d on qid %d\n",
	       req->cmd->identify.cns, req->sq->qid);
	req->error_loc = offsetof(struct nvme_identify, cns);
	nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
}

static inline void nvmet_req_bio_put(struct nvmet_req *req, struct bio *bio)
{
	if (bio != &req->b.inline_bio)