diff options
author | Xiubo Li <xiubli@redhat.com> | 2021-07-05 09:22:55 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2021-09-02 22:49:16 +0200 |
commit | 59b312f36230ea91ebb6ce1b11f2781604495d30 (patch) | |
tree | dd7f238d7f7f8aebb13dc6462dc03de92bba9d8b /fs/ceph/caps.c | |
parent | fba97e8025015b63b1bdb73cd868c8ea832a1620 (diff) | |
download | linux-59b312f36230ea91ebb6ce1b11f2781604495d30.tar.gz linux-59b312f36230ea91ebb6ce1b11f2781604495d30.tar.bz2 linux-59b312f36230ea91ebb6ce1b11f2781604495d30.zip |
ceph: make iterate_sessions a global symbol
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index c2d654156783..a42dbc343749 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -4226,33 +4226,9 @@ static void flush_dirty_session_caps(struct ceph_mds_session *s) dout("flush_dirty_caps done\n"); } -static void iterate_sessions(struct ceph_mds_client *mdsc, - void (*cb)(struct ceph_mds_session *)) -{ - int mds; - - mutex_lock(&mdsc->mutex); - for (mds = 0; mds < mdsc->max_sessions; ++mds) { - struct ceph_mds_session *s; - - if (!mdsc->sessions[mds]) - continue; - - s = ceph_get_mds_session(mdsc->sessions[mds]); - if (!s) - continue; - - mutex_unlock(&mdsc->mutex); - cb(s); - ceph_put_mds_session(s); - mutex_lock(&mdsc->mutex); - } - mutex_unlock(&mdsc->mutex); -} - void ceph_flush_dirty_caps(struct ceph_mds_client *mdsc) { - iterate_sessions(mdsc, flush_dirty_session_caps); + ceph_mdsc_iterate_sessions(mdsc, flush_dirty_session_caps, true); } void __ceph_touch_fmode(struct ceph_inode_info *ci, |