linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvmet: Remove unnecessary assignment to ret in nvmet_ns_enable()
@ 2025-07-25 23:06 Mohamed Khalfella
  2025-07-28  3:50 ` Nilay Shroff
  2025-07-30 15:53 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Mohamed Khalfella @ 2025-07-25 23:06 UTC (permalink / raw)
  To: Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni, Keith Busch
  Cc: Mohamed Khalfella, Hannes Reinecke, Nilay Shroff, Randy Jennings,
	linux-nvme, linux-kernel

Commit 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath")
moved checking maximum number of namespaces in subsystem from
nvmet_ns_enable() to nvmet_ns_alloc(). The assignment to ret in
nvmet_ns_enable() is no longer needed, remove it.

Fixex: 74d16965d7ac ("nvmet-loop: avoid using mutex in IO hotpath")
Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
---
 drivers/nvme/target/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index b6247e4afc9c..83f3d2f8ef2d 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -581,8 +581,6 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
 	if (ns->enabled)
 		goto out_unlock;
 
-	ret = -EMFILE;
-
 	ret = nvmet_bdev_ns_enable(ns);
 	if (ret == -ENOTBLK)
 		ret = nvmet_file_ns_enable(ns);
-- 
2.49.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-30 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 23:06 [PATCH] nvmet: Remove unnecessary assignment to ret in nvmet_ns_enable() Mohamed Khalfella
2025-07-28  3:50 ` Nilay Shroff
2025-07-30 15:53 ` Christoph Hellwig
2025-07-30 16:17   ` Mohamed Khalfella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).