]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: check new snapc for validity, not the old one
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 30 Jul 2012 17:52:39 +0000 (10:52 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Sat, 4 Aug 2012 01:48:53 +0000 (18:48 -0700)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/internal.cc

index 7790f665c484fa2c81c47a4e3bdf58e9d4dfd961..b664872bc070bcb4cbd3b99fc5a691e3d7bb8023 100644 (file)
@@ -1287,7 +1287,7 @@ namespace librbd {
        _flush(ictx);
       }
 
-      if (!ictx->snapc.is_valid()) {
+      if (!new_snapc.is_valid()) {
        lderr(cct) << "image snap context is invalid!" << dendl;
        return -EIO;
       }