diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-07-23 22:09:50 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-09-16 13:06:24 +0300 |
commit | 5de16b30d3121eca26c8c898cc0eff090e21dda6 (patch) | |
tree | eafeb9a506ca3dc1ad1a68c4eeb3ff58021d5414 /fs/ceph/caps.c | |
parent | b72b13eb203835a8a07c280939dd17584c6a688e (diff) | |
download | linux-5de16b30d3121eca26c8c898cc0eff090e21dda6.tar.xz |
ceph: remove ceph_get_cap_mds and __ceph_get_cap_mds
Nothing calls these routines.
Signed-off-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 | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index d17bde5d4f9a..4615f2501e15 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -458,37 +458,6 @@ struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci, int mds) } /* - * Return id of any MDS with a cap, preferably FILE_WR|BUFFER|EXCL, else -1. - */ -static int __ceph_get_cap_mds(struct ceph_inode_info *ci) -{ - struct ceph_cap *cap; - int mds = -1; - struct rb_node *p; - - /* prefer mds with WR|BUFFER|EXCL caps */ - for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) { - cap = rb_entry(p, struct ceph_cap, ci_node); - mds = cap->mds; - if (cap->issued & (CEPH_CAP_FILE_WR | - CEPH_CAP_FILE_BUFFER | - CEPH_CAP_FILE_EXCL)) - break; - } - return mds; -} - -int ceph_get_cap_mds(struct inode *inode) -{ - struct ceph_inode_info *ci = ceph_inode(inode); - int mds; - spin_lock(&ci->i_ceph_lock); - mds = __ceph_get_cap_mds(ceph_inode(inode)); - spin_unlock(&ci->i_ceph_lock); - return mds; -} - -/* * Called under i_ceph_lock. */ static void __insert_cap_node(struct ceph_inode_info *ci, |