ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ceph: Fix an Oops in error handling
@ 2021-02-02  5:47 Dan Carpenter
  2021-02-02 12:35 ` Ilya Dryomov
  2021-02-02 12:37 ` Jeff Layton
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-02-02  5:47 UTC (permalink / raw)
  To: Jeff Layton; +Cc: Ilya Dryomov, ceph-devel, linux-kernel, kernel-janitors

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);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-02 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-02-02 14:19   ` Dan Carpenter

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).