* [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
* Re: [PATCH] nvmet: Remove unnecessary assignment to ret in nvmet_ns_enable()
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
1 sibling, 0 replies; 4+ messages in thread
From: Nilay Shroff @ 2025-07-28 3:50 UTC (permalink / raw)
To: Mohamed Khalfella, Christoph Hellwig, Sagi Grimberg,
Chaitanya Kulkarni, Keith Busch
Cc: Hannes Reinecke, Randy Jennings, linux-nvme, linux-kernel
On 7/26/25 4:36 AM, Mohamed Khalfella wrote:
> 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>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: Remove unnecessary assignment to ret in nvmet_ns_enable()
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
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2025-07-30 15:53 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni, Keith Busch,
Hannes Reinecke, Nilay Shroff, Randy Jennings, linux-nvme,
linux-kernel
On Fri, Jul 25, 2025 at 04:06:39PM -0700, Mohamed Khalfella wrote:
> 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.
This assignment already is gone in the current tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: Remove unnecessary assignment to ret in nvmet_ns_enable()
2025-07-30 15:53 ` Christoph Hellwig
@ 2025-07-30 16:17 ` Mohamed Khalfella
0 siblings, 0 replies; 4+ messages in thread
From: Mohamed Khalfella @ 2025-07-30 16:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Sagi Grimberg, Chaitanya Kulkarni, Keith Busch, Hannes Reinecke,
Nilay Shroff, Randy Jennings, linux-nvme, linux-kernel
On 2025-07-30 17:53:35 +0200, Christoph Hellwig wrote:
> On Fri, Jul 25, 2025 at 04:06:39PM -0700, Mohamed Khalfella wrote:
> > 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.
>
> This assignment already is gone in the current tree.
>
Yep, it looks like it has been removed in commit 2e7dd5c1a8ae ("nvmet: remove
redundant assignment of error code in nvmet_ns_enable()").
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-30 16:18 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).