From: Jeff Layton <jlayton@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
David Howells <dhowells@redhat.com>
Cc: Ilya Dryomov <idryomov@gmail.com>,
ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ceph: Fix an Oops in error handling
Date: Tue, 02 Feb 2021 07:37:57 -0500 [thread overview]
Message-ID: <f0477211cafbdc24883e978ab976610333f5fb67.camel@kernel.org> (raw)
In-Reply-To: <YBjne8A1gn0mvQtT@mwanda>
On Tue, 2021-02-02 at 08:47 +0300, Dan Carpenter wrote:
> The "req" pointer is an error pointer and not NULL so this check needs
> to be fixed.
>
> Fixes: 1cf7fdf52d5a ("ceph: convert readpage to fscache read helper")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> fs/ceph/addr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 5eec6f66fe52..fb0238a4d34f 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -273,7 +273,7 @@ static void ceph_netfs_issue_op(struct netfs_read_subrequest *subreq)
> if (err)
> iput(inode);
> out:
> - if (req)
> + if (!IS_ERR_OR_NULL(req))
> ceph_osdc_put_request(req);
> if (err)
> netfs_subreq_terminated(subreq, err);
Good catch.
David, could you take this into your fscache-next branch?
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2021-02-02 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 5:47 [PATCH] ceph: Fix an Oops in error handling Dan Carpenter
2021-02-02 12:35 ` Ilya Dryomov
2021-02-02 12:37 ` Jeff Layton [this message]
2021-02-02 14:19 ` 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=f0477211cafbdc24883e978ab976610333f5fb67.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=dhowells@redhat.com \
--cc=idryomov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 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).