diff mbox series

[v4,1/2] ceph: export __get_cap_for_mds() helper

Message ID 20230419061402.183915-2-xiubli@redhat.com
State New
Headers show
Series [v4,1/2] ceph: export __get_cap_for_mds() helper | expand

Commit Message

Xiubo Li April 19, 2023, 6:14 a.m. UTC
From: Xiubo Li <xiubli@redhat.com>

This is one helper without the ci->i_ceph_lock and will be used
in another file.

Cc: stable@vger.kernel.org
URL: https://bugzilla.redhat.com/show_bug.cgi?id=2186264
URL: https://tracker.ceph.com/issues/43272
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/ceph/caps.c  | 2 +-
 fs/ceph/super.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index cf29e395af23..2732f46532ec 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -432,7 +432,7 @@  void ceph_reservation_status(struct ceph_fs_client *fsc,
  *
  * Called with i_ceph_lock held.
  */
-static struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds)
+struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds)
 {
 	struct ceph_cap *cap;
 	struct rb_node *n = ci->i_caps.rb_node;
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index a5e84f8b67ba..a226d36b3ecb 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -1225,6 +1225,8 @@  extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc,
 				    struct ceph_mds_session *session);
 void ceph_kick_flushing_inode_caps(struct ceph_mds_session *session,
 				   struct ceph_inode_info *ci);
+extern struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci,
+					  int mds);
 extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci,
 					     int mds);
 extern void ceph_take_cap_refs(struct ceph_inode_info *ci, int caps,