]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly clear new flag for stale client cap
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 12 May 2014 02:24:51 +0000 (10:24 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 12 May 2014 03:14:51 +0000 (11:14 +0800)
CInode::encode_inodestat() should clear the 'new' flag of client
cap even when session is stale, because the 'new' flag prevents
Locker::issue_caps() from sending cap message to client.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/CInode.cc

index 529f1eed6503bc122038bba9e351440e19470b7c..94705de26f67e756323f65b98e8217f6546dbbcf 100644 (file)
@@ -2981,6 +2981,8 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
       e.cap.mseq = cap->get_mseq();
       e.cap.realm = realm->inode->ino();
     } else {
+      if (cap)
+       cap->clear_new();
       e.cap.cap_id = 0;
       e.cap.caps = 0;
       e.cap.seq = 0;