aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index b81be9a56487..1a70a3ebf013 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -337,8 +337,7 @@ static struct ceph_cap *__get_cap_for_mds(struct ceph_inode_info *ci, int mds)
337} 337}
338 338
339/* 339/*
340 * Return id of any MDS with a cap, preferably FILE_WR|WRBUFFER|EXCL, else 340 * Return id of any MDS with a cap, preferably FILE_WR|BUFFER|EXCL, else -1.
341 * -1.
342 */ 341 */
343static int __ceph_get_cap_mds(struct ceph_inode_info *ci, u32 *mseq) 342static int __ceph_get_cap_mds(struct ceph_inode_info *ci, u32 *mseq)
344{ 343{
@@ -346,7 +345,7 @@ static int __ceph_get_cap_mds(struct ceph_inode_info *ci, u32 *mseq)
346 int mds = -1; 345 int mds = -1;
347 struct rb_node *p; 346 struct rb_node *p;
348 347
349 /* prefer mds with WR|WRBUFFER|EXCL caps */ 348 /* prefer mds with WR|BUFFER|EXCL caps */
350 for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) { 349 for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) {
351 cap = rb_entry(p, struct ceph_cap, ci_node); 350 cap = rb_entry(p, struct ceph_cap, ci_node);
352 mds = cap->mds; 351 mds = cap->mds;
@@ -831,7 +830,7 @@ int __ceph_caps_file_wanted(struct ceph_inode_info *ci)
831{ 830{
832 int want = 0; 831 int want = 0;
833 int mode; 832 int mode;
834 for (mode = 0; mode < 4; mode++) 833 for (mode = 0; mode < CEPH_FILE_MODE_NUM; mode++)
835 if (ci->i_nr_by_mode[mode]) 834 if (ci->i_nr_by_mode[mode])
836 want |= ceph_caps_for_mode(mode); 835 want |= ceph_caps_for_mode(mode);
837 return want; 836 return want;