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

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

ceph: make sure write caps are registered with auth MDS



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: default avatarYan, Zheng <zheng.z.yan@intel.com>
parent c137a32a
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -885,7 +885,10 @@ int __ceph_caps_mds_wanted(struct ceph_inode_info *ci)
		cap = rb_entry(p, struct ceph_cap, ci_node);
		cap = rb_entry(p, struct ceph_cap, ci_node);
		if (!__cap_is_valid(cap))
		if (!__cap_is_valid(cap))
			continue;
			continue;
		if (cap == ci->i_auth_cap)
			mds_wanted |= cap->mds_wanted;
			mds_wanted |= cap->mds_wanted;
		else
			mds_wanted |= (cap->mds_wanted & ~CEPH_CAP_ANY_FILE_WR);
	}
	}
	return mds_wanted;
	return mds_wanted;
}
}