From: Yan, Zheng Date: Fri, 21 Feb 2014 03:07:35 +0000 (+0800) Subject: client: use ceph_seq_cmp() to compare cap seq/mseq X-Git-Tag: v0.79~179^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a7b7c311b4037331035f7946009313fe515195e4;p=ceph.git client: use ceph_seq_cmp() to compare cap seq/mseq Signed-off-by: Yan, Zheng --- diff --git a/src/client/Client.cc b/src/client/Client.cc index cc3a3465162..21e1eea42aa 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2924,7 +2924,7 @@ void Client::add_update_cap(Inode *in, MetaSession *mds_session, uint64_t cap_id if (flags & CEPH_CAP_FLAG_AUTH) { if (in->auth_cap != cap && - (!in->auth_cap || in->auth_cap->mseq < mseq)) { + (!in->auth_cap || ceph_seq_cmp(in->auth_cap->mseq, mseq) < 0)) { if (in->auth_cap && in->flushing_cap_item.is_on_list()) { ldout(cct, 10) << "add_update_cap changing auth cap: removing myself from flush_caps list" << dendl; in->flushing_cap_item.remove_myself(); @@ -3538,7 +3538,7 @@ void Client::handle_cap_export(MetaSession *session, Inode *in, MClientCaps *m) ++p) { if (p->first == mds) cap = p->second; - if (p->second->mseq > m->get_mseq()) { + if (ceph_seq_cmp(p->second->mseq, m->get_mseq()) > 0) { found_higher_mseq = true; ldout(cct, 5) << "handle_cap_export ino " << m->get_ino() << " mseq " << m->get_mseq() << " EXPORT from mds." << mds