summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2020-09-03 09:01:39 -0400
committerIlya Dryomov <idryomov@gmail.com>2020-10-12 15:29:26 +0200
commit2678da88f4b449300d56e0e7a9e77d1a79c83463 (patch)
tree4c59dcf1d7706783cc11e697065d94155d08c60d /fs/ceph/super.h
parentc5f575ed08c38d077a581a1ec0c48c23ee6b7c21 (diff)
downloadlinux-2678da88f4b449300d56e0e7a9e77d1a79c83463.tar.bz2
ceph: add ceph_sb_to_mdsc helper support to parse the mdsc
This will help simplify the code. [ jlayton: fix minor merge conflict in quota.c ] Signed-off-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index a3995ebe0623..483a52d281cd 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -451,6 +451,12 @@ ceph_sb_to_client(const struct super_block *sb)
return (struct ceph_fs_client *)sb->s_fs_info;
}
+static inline struct ceph_mds_client *
+ceph_sb_to_mdsc(const struct super_block *sb)
+{
+ return (struct ceph_mds_client *)ceph_sb_to_client(sb)->mdsc;
+}
+
static inline struct ceph_vino
ceph_vino(const struct inode *inode)
{