diff mbox series

[next] nfsd: Fix a WARN_ONCE() message

Message ID 39691ae0-124e-48ea-8a1a-1a7f26423236@stanley.mountain (mailing list archive)
State In Next
Delegated to: Chuck Lever
Headers show
Series [next] nfsd: Fix a WARN_ONCE() message | expand

Commit Message

Dan Carpenter Feb. 17, 2025, 7:33 a.m. UTC
The first parameter of WARN_ONCE() is supposed to be the condition but
it's missing here.  This WARN_ONCE() will only print the "xcl_name".

Fixes: 61b490d48618 ("nfsd: fix management of listener transports")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 fs/nfsd/nfsctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton Feb. 17, 2025, 1:47 p.m. UTC | #1
On Mon, 2025-02-17 at 10:33 +0300, Dan Carpenter wrote:
> The first parameter of WARN_ONCE() is supposed to be the condition but
> it's missing here.  This WARN_ONCE() will only print the "xcl_name".
> 
> Fixes: 61b490d48618 ("nfsd: fix management of listener transports")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  fs/nfsd/nfsctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 2cd540b26965..ac265d6fde35 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -2027,7 +2027,7 @@ int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info)
>  		xprt = svc_find_listener(serv, xcl_name, net, sa);
>  		if (xprt) {
>  			if (delete)
> -				WARN_ONCE("Transport type=%s already exists\n",
> +				WARN_ONCE(1, "Transport type=%s already exists\n",
>  					  xcl_name);
>  			svc_xprt_put(xprt);
>  			continue;

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Chuck Lever Feb. 17, 2025, 2:34 p.m. UTC | #2
From: Chuck Lever <chuck.lever@oracle.com>

On Mon, 17 Feb 2025 10:33:31 +0300, Dan Carpenter wrote:
> The first parameter of WARN_ONCE() is supposed to be the condition but
> it's missing here.  This WARN_ONCE() will only print the "xcl_name".
> 
> 

Squashed into nfsd-next, thanks!

[1/1] nfsd: Fix a WARN_ONCE() message
      (no commit info)

--
Chuck Lever
diff mbox series

Patch

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 2cd540b26965..ac265d6fde35 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -2027,7 +2027,7 @@  int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info)
 		xprt = svc_find_listener(serv, xcl_name, net, sa);
 		if (xprt) {
 			if (delete)
-				WARN_ONCE("Transport type=%s already exists\n",
+				WARN_ONCE(1, "Transport type=%s already exists\n",
 					  xcl_name);
 			svc_xprt_put(xprt);
 			continue;