From: Xiubo Li <xiubli@xxxxxxxxxx> This will covert the inode to ceph_client. URL: https://tracker.ceph.com/issues/61590 Cc: Patrick Donnelly <pdonnell@xxxxxxxxxx> Reviewed-by: Patrick Donnelly <pdonnell@xxxxxxxxxx> Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/snap.c | 8 +++++--- fs/ceph/super.h | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 09939ec0d1ee..9dde4b5f513d 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c @@ -329,7 +329,8 @@ static int cmpu64_rev(const void *a, const void *b) /* * build the snap context for a given realm. */ -static int build_snap_context(struct ceph_snap_realm *realm, +static int build_snap_context(struct ceph_mds_client *mdsc, + struct ceph_snap_realm *realm, struct list_head *realm_queue, struct list_head *dirty_realms) { @@ -425,7 +426,8 @@ static int build_snap_context(struct ceph_snap_realm *realm, /* * rebuild snap context for the given realm and all of its children. */ -static void rebuild_snap_realms(struct ceph_snap_realm *realm, +static void rebuild_snap_realms(struct ceph_mds_client *mdsc, + struct ceph_snap_realm *realm, struct list_head *dirty_realms) { LIST_HEAD(realm_queue); @@ -858,7 +860,7 @@ int ceph_update_snap_trace(struct ceph_mds_client *mdsc, /* rebuild_snapcs when we reach the _end_ (root) of the trace */ if (realm_to_rebuild && p >= e) - rebuild_snap_realms(realm_to_rebuild, &dirty_realms); + rebuild_snap_realms(mdsc, realm_to_rebuild, &dirty_realms); if (!first_realm) first_realm = realm; diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 9655ea46e6ca..4e78de1be23e 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -507,6 +507,12 @@ ceph_sb_to_mdsc(const struct super_block *sb) return (struct ceph_mds_client *)ceph_sb_to_fs_client(sb)->mdsc; } +static inline struct ceph_client * +ceph_inode_to_client(const struct inode *inode) +{ + return (struct ceph_client *)ceph_inode_to_fs_client(inode)->client; +} + static inline struct ceph_vino ceph_vino(const struct inode *inode) { -- 2.40.1