linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / md / dm-exception-store.c
index d12379b..ab8756a 100644 (file)
@@ -16,8 +16,6 @@
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
 
-#define DM_MSG_PREFIX "snapshots"
-
 /*-----------------------------------------------------------------
  * Persistent snapshots, by persistent we mean that the snapshot
  * will survive a reboot.
@@ -519,6 +517,16 @@ static void persistent_commit(struct exception_store *store,
                if (r)
                        ps->valid = 0;
 
+               /*
+                * Have we completely filled the current area ?
+                */
+               if (ps->current_committed == ps->exceptions_per_area) {
+                       ps->current_committed = 0;
+                       r = zero_area(ps, ps->current_area + 1);
+                       if (r)
+                               ps->valid = 0;
+               }
+
                for (i = 0; i < ps->callback_count; i++) {
                        cb = ps->callbacks + i;
                        cb->callback(cb->context, r == 0 ? 1 : 0);
@@ -526,16 +534,6 @@ static void persistent_commit(struct exception_store *store,
 
                ps->callback_count = 0;
        }
-
-       /*
-        * Have we completely filled the current area ?
-        */
-       if (ps->current_committed == ps->exceptions_per_area) {
-               ps->current_committed = 0;
-               r = zero_area(ps, ps->current_area + 1);
-               if (r)
-                       ps->valid = 0;
-       }
 }
 
 static void persistent_drop(struct exception_store *store)