From: Jeff Layton <jlayton@kernel.org>
To: ceph-devel@vger.kernel.org
Subject: [PATCH] ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails
Date: Thu, 12 Nov 2020 10:42:10 -0500 [thread overview]
Message-ID: <20201112154210.304979-1-jlayton@kernel.org> (raw)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ceph/inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ab02966ef0a4..88bbeb05bd27 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1335,6 +1335,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req)
in, ceph_vinop(in));
if (in->i_state & I_NEW)
discard_new_inode(in);
+ else
+ iput(in);
goto done;
}
req->r_target_inode = in;
--
2.28.0
reply other threads:[~2020-11-12 15:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201112154210.304979-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=ceph-devel@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