diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ceph/caps.c | 10 | ||||
-rw-r--r-- | fs/ceph/super.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 52befa65fbf7..e3b848d7698d 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -327,6 +327,16 @@ static struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds) | |||
327 | return NULL; | 327 | return NULL; |
328 | } | 328 | } |
329 | 329 | ||
330 | struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci, int mds) | ||
331 | { | ||
332 | struct ceph_cap *cap; | ||
333 | |||
334 | spin_lock(&ci->vfs_inode.i_lock); | ||
335 | cap = __get_cap_for_mds(ci, mds); | ||
336 | spin_unlock(&ci->vfs_inode.i_lock); | ||
337 | return cap; | ||
338 | } | ||
339 | |||
330 | /* | 340 | /* |
331 | * Return id of any MDS with a cap, preferably FILE_WR|BUFFER|EXCL, else -1. | 341 | * Return id of any MDS with a cap, preferably FILE_WR|BUFFER|EXCL, else -1. |
332 | */ | 342 | */ |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 44d10cb0aeca..8ceb62380d3f 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -816,6 +816,8 @@ extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc); | |||
816 | extern int ceph_fsync(struct file *file, int datasync); | 816 | extern int ceph_fsync(struct file *file, int datasync); |
817 | extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, | 817 | extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, |
818 | struct ceph_mds_session *session); | 818 | struct ceph_mds_session *session); |
819 | extern struct ceph_cap *ceph_get_cap_for_mds(struct ceph_inode_info *ci, | ||
820 | int mds); | ||
819 | extern int ceph_get_cap_mds(struct inode *inode); | 821 | extern int ceph_get_cap_mds(struct inode *inode); |
820 | extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps); | 822 | extern void ceph_get_cap_refs(struct ceph_inode_info *ci, int caps); |
821 | extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had); | 823 | extern void ceph_put_cap_refs(struct ceph_inode_info *ci, int had); |