]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove caps from revoking list when caps are voluntarily released 4481/head
authorYan, Zheng <zyan@redhat.com>
Tue, 28 Apr 2015 07:45:32 +0000 (15:45 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 28 Apr 2015 12:23:38 +0000 (20:23 +0800)
Fixes: #11482
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 86788c4ea4155f0388b7ebaf475a3d3c37d39331)

src/mds/Capability.h

index 9d7af3d3f7e9d18860c6ef018a30adde0db086e3..55922ab3711ec84389d5e931c4a120d1fe23c994 100644 (file)
@@ -209,8 +209,13 @@ public:
       _revokes.pop_front();
       changed = true;
     }
-    if (changed)
+    if (changed) {
       _calc_issued();
+      if (_issued == _pending) {
+       item_revoking_caps.remove_myself();
+       item_client_revoking_caps.remove_myself();
+      }
+    }
   }