]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: don't provide an invalid watch handle on error
authorJason Dillaman <dillaman@redhat.com>
Tue, 11 Aug 2015 18:38:59 +0000 (14:38 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 6 Nov 2015 01:42:42 +0000 (20:42 -0500)
If the linger op was canceled due to an error, don't provide
the caller with the pointer to the invalidated linger op.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librados/IoCtxImpl.cc

index f12c9214a3027dc1ae8d1637f0ab29e82f6cea21..e36fac4c22d3bcde7234c38dab6714b052371ea1 100644 (file)
@@ -1235,6 +1235,7 @@ int librados::IoCtxImpl::watch(const object_t& oid,
 
   if (r < 0) {
     objecter->linger_cancel(linger_op);
+    *handle = 0;
   }
 
   return r;