On Thu, 2025-02-13 at 10:47 -0500, Olga Kornievskaia wrote: > Don't ignore return code of adding rdma listener. If nfs.conf has asked > for "rdma=y" but adding the listener fails, don't ignore the failure. > Note in soft-rdma-provider environment (such as soft iwarp, soft roce), > when no address-constraints are used, an "any" listener is created and > rdma-enabling is done independently. > > Fixes: e3b72007ab31 ("nfs-utils: nfsdctl: cleanup listeners if some failed") > Signed-off-by: Olga Kornievskaia <okorniev@xxxxxxxxxx> > --- > utils/nfsdctl/nfsdctl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/utils/nfsdctl/nfsdctl.c b/utils/nfsdctl/nfsdctl.c > index 05fecc71..244910ef 100644 > --- a/utils/nfsdctl/nfsdctl.c > +++ b/utils/nfsdctl/nfsdctl.c > @@ -1388,7 +1388,7 @@ static int configure_listeners(void) > if (tcp) > ret = add_listener("tcp", n->field, port); > if (rdma) > - add_listener("rdma", n->field, rdma_port); > + ret = add_listener("rdma", n->field, rdma_port); > if (ret) > return ret; > } > @@ -1398,7 +1398,7 @@ static int configure_listeners(void) > if (tcp) > ret = add_listener("tcp", "", port); > if (rdma) > - add_listener("rdma", "", rdma_port); > + ret = add_listener("rdma", "", rdma_port); > } > return ret; > } add_listener() is just adding the given listener to the nfsd_sockets array in memory. It's not consulting the kernel at that point. That won't happen until set_listeners() is called. It does make sense to check the return code though, just in case we pass it some bogus arguments somehow. So... Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>