]> git.neil.brown.name Git - history.git/commitdiff
JFS: Remove assert(i < MAX_ACTIVE)
authorDave Kleikamp <shaggy@kleikamp.austin.ibm.com>
Fri, 27 Sep 2002 03:46:26 +0000 (22:46 -0500)
committerDave Kleikamp <shaggy@kleikamp.austin.ibm.com>
Fri, 27 Sep 2002 03:46:26 +0000 (22:46 -0500)
If the log (journal) superblock is changed between the time we mount
and unmount the volume, don't trap.  Instead complain, and exit
gracefully.

fs/jfs/jfs_logmgr.c

index a8b1ba7819ca8a4c8f6a24ec0ea742adfe646b1f..2fa8516328013c6a5c78c172fec38b167e554ad6 100644 (file)
@@ -1552,7 +1552,12 @@ static int lmLogFileSystem(struct jfs_log * log, char *uuid, int activate)
                                memcpy(logsuper->active[i].uuid, NULL_UUID, 16);
                                break;
                        }
-               assert(i < MAX_ACTIVE);
+               if (i == MAX_ACTIVE) {
+                       jERROR(1,("Somebody stomped on the journal!\n"));
+                       lbmFree(bpsuper);
+                       return EIO;
+               }
+               
        }
 
        /*