HAMMER VFS - Fix hammer lock assertion panic when REDO recovery fails
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Apr 2010 04:27:49 +0000 (21:27 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 14 Apr 2010 04:27:49 +0000 (21:27 -0700)
* REDO recovery failed to release a buffer in its error path, resulting
  in a panic later on.  This patch adds the proper release.

Reported-by: Venkatesh Srinivas <me@acm.jhu.edu>
sys/vfs/hammer/hammer_recover.c

index 250d587..77cf9be 100644 (file)
@@ -698,12 +698,13 @@ hammer_recover_stage2(hammer_mount_t hmp, hammer_volume_t root_volume)
                bytes -= head->head.hdr_size;
        }
        KKASSERT(error || bytes == 0);
+
+done:
        if (buffer) {
                hammer_rel_buffer(buffer, 0);
                buffer = NULL;
        }
 
-done:
        /*
         * Cleanup rterm tree
         */