Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8c2f3ae authored by Yan, Zheng's avatar Yan, Zheng Committed by Sage Weil
Browse files

ceph: check migrate seq before changing auth cap



We may receive old request reply from the exporter MDS after receiving
the importer MDS' cap import message.

Signed-off-by: default avatarYan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent fc2744aa
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -612,9 +612,11 @@ retry:
		__cap_delay_requeue(mdsc, ci);
	}

	if (flags & CEPH_CAP_FLAG_AUTH)
	if (flags & CEPH_CAP_FLAG_AUTH) {
		if (ci->i_auth_cap == NULL ||
		    ceph_seq_cmp(ci->i_auth_cap->mseq, mseq) < 0)
			ci->i_auth_cap = cap;
	else if (ci->i_auth_cap == cap) {
	} else if (ci->i_auth_cap == cap) {
		ci->i_auth_cap = NULL;
		spin_lock(&mdsc->cap_dirty_lock);
		if (!list_empty(&ci->i_dirty_item)) {