projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c137a32
)
ceph: make sure write caps are registered with auth MDS
author
Yan, Zheng
<zheng.z.yan@intel.com>
Sat, 8 Mar 2014 01:51:45 +0000
(09:51 +0800)
committer
Sage Weil
<sage@inktank.com>
Sat, 5 Apr 2014 04:07:05 +0000
(21:07 -0700)
Only auth MDS can issue write caps to clients, so don't consider
write caps registered with non-auth MDS as valid.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/caps.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ceph/caps.c
b/fs/ceph/caps.c
index 17543383545c162f58425fbc8629a99f1c5a717e..d9ef44e5474ee7e667d881c5051922a55061d36a 100644
(file)
--- a/
fs/ceph/caps.c
+++ b/
fs/ceph/caps.c
@@
-885,7
+885,10
@@
int __ceph_caps_mds_wanted(struct ceph_inode_info *ci)
cap = rb_entry(p, struct ceph_cap, ci_node);
if (!__cap_is_valid(cap))
continue;
- mds_wanted |= cap->mds_wanted;
+ if (cap == ci->i_auth_cap)
+ mds_wanted |= cap->mds_wanted;
+ else
+ mds_wanted |= (cap->mds_wanted & ~CEPH_CAP_ANY_FILE_WR);
}
return mds_wanted;
}