Commit 8bb6cb9b authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig

nvmet: use nvme status value directly

There is no point in keeping the status variable that is used only once
in the function nvmet_async_events_failall().

Remove the variable and use the value directly.
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 245067e3
...@@ -141,14 +141,13 @@ static u32 nvmet_async_event_result(struct nvmet_async_event *aen) ...@@ -141,14 +141,13 @@ static u32 nvmet_async_event_result(struct nvmet_async_event *aen)
static void nvmet_async_events_failall(struct nvmet_ctrl *ctrl) static void nvmet_async_events_failall(struct nvmet_ctrl *ctrl)
{ {
u16 status = NVME_SC_INTERNAL | NVME_SC_DNR;
struct nvmet_req *req; struct nvmet_req *req;
mutex_lock(&ctrl->lock); mutex_lock(&ctrl->lock);
while (ctrl->nr_async_event_cmds) { while (ctrl->nr_async_event_cmds) {
req = ctrl->async_event_cmds[--ctrl->nr_async_event_cmds]; req = ctrl->async_event_cmds[--ctrl->nr_async_event_cmds];
mutex_unlock(&ctrl->lock); mutex_unlock(&ctrl->lock);
nvmet_req_complete(req, status); nvmet_req_complete(req, NVME_SC_INTERNAL | NVME_SC_DNR);
mutex_lock(&ctrl->lock); mutex_lock(&ctrl->lock);
} }
mutex_unlock(&ctrl->lock); mutex_unlock(&ctrl->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment