From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Trond Myklebust <trond.myklebust@primarydata.com>,
Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@poochiereds.net>,
Anna Schumaker <anna.schumaker@netapp.com>,
Sagi Grimberg <sagig@mellanox.com>,
linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 2/2] xprtrdma: checking for NULL instead of IS_ERR()
Date: Fri, 06 Nov 2015 18:34:50 +0000 [thread overview]
Message-ID: <563CF2CA.5050409@Netapp.com> (raw)
In-Reply-To: <20151105083952.GB19405@mwanda>
On 11/05/2015 03:39 AM, Dan Carpenter wrote:
> The rpcrdma_create_req() function returns error pointers or success. It
> never returns NULL.
>
> Fixes: f531a5dbc451 ('xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, Dan! These patches don't look urgent, so if it's okay with you then I'll save them for 4.5.
Anna
>
> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
> index 2dcb44f..97554ca 100644
> --- a/net/sunrpc/xprtrdma/backchannel.c
> +++ b/net/sunrpc/xprtrdma/backchannel.c
> @@ -42,8 +42,8 @@ static int rpcrdma_bc_setup_rqst(struct rpcrdma_xprt *r_xprt,
> size_t size;
>
> req = rpcrdma_create_req(r_xprt);
> - if (!req)
> - return -ENOMEM;
> + if (IS_ERR(req))
> + return PTR_ERR(req);
> req->rl_backchannel = true;
>
> size = RPCRDMA_INLINE_WRITE_THRESHOLD(rqst);
> --
> 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
>
WARNING: multiple messages have this Message-ID (diff)
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Trond Myklebust <trond.myklebust@primarydata.com>,
Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@poochiereds.net>,
Anna Schumaker <anna.schumaker@netapp.com>,
Sagi Grimberg <sagig@mellanox.com>, <linux-nfs@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch 2/2] xprtrdma: checking for NULL instead of IS_ERR()
Date: Fri, 6 Nov 2015 13:34:50 -0500 [thread overview]
Message-ID: <563CF2CA.5050409@Netapp.com> (raw)
In-Reply-To: <20151105083952.GB19405@mwanda>
On 11/05/2015 03:39 AM, Dan Carpenter wrote:
> The rpcrdma_create_req() function returns error pointers or success. It
> never returns NULL.
>
> Fixes: f531a5dbc451 ('xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, Dan! These patches don't look urgent, so if it's okay with you then I'll save them for 4.5.
Anna
>
> diff --git a/net/sunrpc/xprtrdma/backchannel.c b/net/sunrpc/xprtrdma/backchannel.c
> index 2dcb44f..97554ca 100644
> --- a/net/sunrpc/xprtrdma/backchannel.c
> +++ b/net/sunrpc/xprtrdma/backchannel.c
> @@ -42,8 +42,8 @@ static int rpcrdma_bc_setup_rqst(struct rpcrdma_xprt *r_xprt,
> size_t size;
>
> req = rpcrdma_create_req(r_xprt);
> - if (!req)
> - return -ENOMEM;
> + if (IS_ERR(req))
> + return PTR_ERR(req);
> req->rl_backchannel = true;
>
> size = RPCRDMA_INLINE_WRITE_THRESHOLD(rqst);
> --
> 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
>
next prev parent reply other threads:[~2015-11-06 18:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 8:39 [patch 2/2] xprtrdma: checking for NULL instead of IS_ERR() Dan Carpenter
2015-11-05 8:39 ` Dan Carpenter
2015-11-05 14:08 ` Chuck Lever
2015-11-05 14:08 ` Chuck Lever
2015-11-06 18:34 ` Anna Schumaker [this message]
2015-11-06 18:34 ` Anna Schumaker
2015-11-06 20:04 ` Dan Carpenter
2015-11-06 20:04 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563CF2CA.5050409@Netapp.com \
--to=anna.schumaker@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=jlayton@poochiereds.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.