diff mbox

nfsd: fix a warning message

Message ID 20151121102850.GA7002@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Nov. 21, 2015, 10:28 a.m. UTC
The WARN() macro takes a condition and a format string.  The condition
was accidentally left out here so it just prints the function name
instead of the message.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jeff Layton Nov. 22, 2015, 1:04 p.m. UTC | #1
On Sat, 21 Nov 2015 13:28:50 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> The WARN() macro takes a condition and a format string.  The condition
> was accidentally left out here so it just prints the function name
> instead of the message.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 6b800b5..7af023f 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -2240,7 +2240,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
>  	base = resp->cstate.data_offset;
>  	slot->sl_datalen = buf->len - base;
>  	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
> -		WARN("%s: sessions DRC could not cache compound\n", __func__);
> +		WARN(1, "%s: sessions DRC could not cache compound\n",
> +		     __func__);
>  	return;
>  }
>  

Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J. Bruce Fields Nov. 23, 2015, 7:05 p.m. UTC | #2
On Sun, Nov 22, 2015 at 08:04:18AM -0500, Jeff Layton wrote:
> On Sat, 21 Nov 2015 13:28:50 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:

Thanks, applying for 4.5.--b.

> 
> > The WARN() macro takes a condition and a format string.  The condition
> > was accidentally left out here so it just prints the function name
> > instead of the message.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > index 6b800b5..7af023f 100644
> > --- a/fs/nfsd/nfs4state.c
> > +++ b/fs/nfsd/nfs4state.c
> > @@ -2240,7 +2240,8 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
> >  	base = resp->cstate.data_offset;
> >  	slot->sl_datalen = buf->len - base;
> >  	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
> > -		WARN("%s: sessions DRC could not cache compound\n", __func__);
> > +		WARN(1, "%s: sessions DRC could not cache compound\n",
> > +		     __func__);
> >  	return;
> >  }
> >  
> 
> Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6b800b5..7af023f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2240,7 +2240,8 @@  nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
 	base = resp->cstate.data_offset;
 	slot->sl_datalen = buf->len - base;
 	if (read_bytes_from_xdr_buf(buf, base, slot->sl_data, slot->sl_datalen))
-		WARN("%s: sessions DRC could not cache compound\n", __func__);
+		WARN(1, "%s: sessions DRC could not cache compound\n",
+		     __func__);
 	return;
 }