Whamcloud - gitweb
Fix typo (errant extra character).
[tools/e2fsprogs.git] / e2fsck / journal.c
index ec575ee..f3399f9 100644 (file)
@@ -27,7 +27,6 @@
 
 #ifdef CONFIG_JBD_DEBUG                /* Enabled by configure --enable-jfs-debug */
 static int bh_count = 0;
-int journal_enable_debug = 2;
 #endif
 
 /*
@@ -186,8 +185,8 @@ static errcode_t e2fsck_get_journal(e2fsck_t ctx, journal_t **ret_journal)
        struct kdev_s           *dev_fs = NULL, *dev_journal;
        const char              *journal_name = 0;
        journal_t               *journal = NULL;
-       errcode_t               retval;
-       io_manager              io_ptr;
+       errcode_t               retval = 0;
+       io_manager              io_ptr = 0;
        unsigned long           start = 0;
        int                     free_journal_name = 0;
        int                     ext_journal = 0;
@@ -620,7 +619,9 @@ int e2fsck_check_ext3_journal(e2fsck_t ctx)
 
        retval = e2fsck_get_journal(ctx, &journal);
        if (retval) {
-               if (retval == EXT2_ET_BAD_INODE_NUM)
+               if ((retval == EXT2_ET_BAD_INODE_NUM) ||
+                   (retval == EXT2_ET_JOURNAL_TOO_SMALL) ||
+                   (retval == EXT2_ET_NO_JOURNAL))
                        return e2fsck_journal_fix_bad_inode(ctx, &pctx);
                return retval;
        }
@@ -790,7 +791,7 @@ int e2fsck_run_ext3_journal(e2fsck_t ctx)
  * This function will move the journal inode from a visible file in
  * the filesystem directory hierarchy to the reserved inode if necessary.
  */
-const static char * const journal_names[] = {
+static const char * const journal_names[] = {
        ".journal", "journal", ".journal.dat", "journal.dat", 0 };
 
 void e2fsck_move_ext3_journal(e2fsck_t ctx)