[PATCH 02/14] nvmet: for pt I/O commands use likely for ns check
Chaitanya Kulkarni
chaitanya.kulkarni at wdc.com
Mon Aug 10 14:54:44 EDT 2020
I/O commands (nvme_cmd_read, nvme_cmd_write) are most common commands
when accessing passthru controller. For I/O commands ns is always
present. Annotate post request submission ns check with likely.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
drivers/nvme/target/passthru.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index fd1f754de5b4..b675662654ae 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -268,7 +268,7 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req)
nvmet_passthru_req_done);
}
- if (ns)
+ if (likely(ns))
nvme_put_ns(ns);
return;
--
2.22.1
More information about the Linux-nvme
mailing list