From: Jeff Layton <jlayton@kernel.org>
To: ceph-devel@vger.kernel.org
Cc: idryomov@gmail.com
Subject: [PATCH] ceph: properly put ceph_string reference after async create attempt
Date: Tue, 25 Jan 2022 16:08:42 -0500 [thread overview]
Message-ID: <20220125210842.114067-1-jlayton@kernel.org> (raw)
The reference acquired by try_prep_async_create is currently leaked.
Ensure we put it.
Fixes: 9a8d03ca2e2c ("ceph: attempt to do async create when possible")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ceph/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index ea1e9ac6c465..cbe4d5a5cde5 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -766,8 +766,10 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
restore_deleg_ino(dir, req->r_deleg_ino);
ceph_mdsc_put_request(req);
try_async = false;
+ ceph_put_string(rcu_dereference_raw(lo.pool_ns));
goto retry;
}
+ ceph_put_string(rcu_dereference_raw(lo.pool_ns));
goto out_req;
}
}
--
2.34.1
next reply other threads:[~2022-01-25 21:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 21:08 Jeff Layton [this message]
2022-01-26 16:22 ` [PATCH] ceph: properly put ceph_string reference after async create attempt Ilya Dryomov
2022-01-26 16:25 ` Jeff Layton
2022-01-26 16:47 ` Ilya Dryomov
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=20220125210842.114067-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.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.