Skip to content

Commit fa0aa3b

Browse files
ukernelidryomov
authored andcommitted
ceph: fix message order check in handle_cap_export()
If caps for importer mds exists, but cap id mismatch, client should have received corresponding import message. Because cap ID does not change as long as client holds the caps. Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent c858a07 commit fa0aa3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ceph/caps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3427,7 +3427,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
34273427
tcap = __get_cap_for_mds(ci, target);
34283428
if (tcap) {
34293429
/* already have caps from the target */
3430-
if (tcap->cap_id != t_cap_id ||
3430+
if (tcap->cap_id == t_cap_id &&
34313431
ceph_seq_cmp(tcap->seq, t_seq) < 0) {
34323432
dout(" updating import cap %p mds%d\n", tcap, target);
34333433
tcap->cap_id = t_cap_id;

0 commit comments

Comments
 (0)