diff options
author | Xiubo Li <xiubli@redhat.com> | 2020-09-03 09:01:39 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-10-12 15:29:26 +0200 |
commit | 2678da88f4b449300d56e0e7a9e77d1a79c83463 (patch) | |
tree | 4c59dcf1d7706783cc11e697065d94155d08c60d /fs/ceph/inode.c | |
parent | c5f575ed08c38d077a581a1ec0c48c23ee6b7c21 (diff) | |
download | lwn-2678da88f4b449300d56e0e7a9e77d1a79c83463.tar.gz lwn-2678da88f4b449300d56e0e7a9e77d1a79c83463.zip |
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/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index d163fa96cb40..1fed0e827eb7 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -558,8 +558,7 @@ void ceph_evict_inode(struct inode *inode) * caps in i_snap_caps. */ if (ci->i_snap_realm) { - struct ceph_mds_client *mdsc = - ceph_inode_to_client(inode)->mdsc; + struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); if (ceph_snap(inode) == CEPH_NOSNAP) { struct ceph_snap_realm *realm = ci->i_snap_realm; dout(" dropping residual ref to snap realm %p\n", @@ -739,7 +738,7 @@ int ceph_fill_inode(struct inode *inode, struct page *locked_page, struct ceph_mds_session *session, int cap_fmode, struct ceph_cap_reservation *caps_reservation) { - struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc; + struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb); struct ceph_mds_reply_inode *info = iinfo->in; struct ceph_inode_info *ci = ceph_inode(inode); int issued, new_issued, info_caps; |