]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: pass 'newly issued caps' to Client::check_cap_issue() 8353/head
authorYan, Zheng <zyan@redhat.com>
Tue, 29 Mar 2016 13:50:58 +0000 (21:50 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 29 Mar 2016 13:55:49 +0000 (21:55 +0800)
Client::check_cap_issue() expects caller to pass 'newly issued caps'
to it. But in Client::check_cap_issue(), varible 'issued' is caps
client alread has.

Fixes: http://tracker.ceph.com/issues/15303
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc

index 177a61e937b8dcfe1e1ed73e3cf1c00b4ca6c14c..a572721d5328f0e38b98fe6b04b6bc5301d11c34 100644 (file)
@@ -4807,7 +4807,7 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, MClient
   if (m->get_op() == CEPH_CAP_OP_IMPORT && m->get_wanted() != wanted)
     check = true;
 
-  check_cap_issue(in, cap, issued);
+  check_cap_issue(in, cap, new_caps);
 
   // update caps
   if (old_caps & ~new_caps) {