]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly evaluate unstable locks when evicting client 31548/head
authorYan, Zheng <zyan@redhat.com>
Tue, 12 Nov 2019 03:28:57 +0000 (11:28 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 12 Nov 2019 03:41:44 +0000 (11:41 +0800)
make sure we call Locker::eval_gather() for inodes in 'to_eval' list.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/42759
src/mds/Locker.cc

index 27d8a16eb57f0e37730c03633349d77f23895712..d34748f05b9f037d091d175ffa0285a585517478 100644 (file)
@@ -2143,6 +2143,7 @@ bool Locker::revoke_stale_caps(Session *session)
   // invalidate all caps
   session->inc_cap_gen();
 
+  bool ret = true;
   std::vector<CInode*> to_eval;
 
   for (auto p = session->caps.begin(); !p.end(); ) {
@@ -2159,8 +2160,10 @@ bool Locker::revoke_stale_caps(Session *session)
     if (!revoking)
       continue;
 
-    if (revoking & CEPH_CAP_ANY_WR)
-      return false;
+    if (revoking & CEPH_CAP_ANY_WR) {
+      ret = false;
+      break;
+    }
 
     int issued = cap->issued();
     CInode *in = cap->get_inode();
@@ -2195,7 +2198,7 @@ bool Locker::revoke_stale_caps(Session *session)
       request_inode_file_caps(in);
   }
 
-  return true;
+  return ret;
 }
 
 void Locker::resume_stale_caps(Session *session)