jbd2: correctly unescape journal data blocks
[sfrench/cifs-2.6.git] / fs / jbd2 / recovery.c
index 921680663fa2771319837ad1ff24d4c8f9d8c55e..5d0405a9e7ca081f1ce72cefd4d4b82c10c9b3fd 100644 (file)
@@ -397,7 +397,7 @@ static int do_one_pass(journal_t *journal,
                struct buffer_head *    obh;
                struct buffer_head *    nbh;
 
-               cond_resched();         /* We're under lock_kernel() */
+               cond_resched();
 
                /* If we already know where to stop the log traversal,
                 * check right now that we haven't gone past the end of
@@ -535,7 +535,7 @@ static int do_one_pass(journal_t *journal,
                                        memcpy(nbh->b_data, obh->b_data,
                                                        journal->j_blocksize);
                                        if (flags & JBD2_FLAG_ESCAPE) {
-                                               *((__be32 *)bh->b_data) =
+                                               *((__be32 *)nbh->b_data) =
                                                cpu_to_be32(JBD2_MAGIC_NUMBER);
                                        }
 
@@ -641,7 +641,7 @@ static int do_one_pass(journal_t *journal,
                                if (chksum_err) {
                                        info->end_transaction = next_commit_ID;
 
-                                       if (!JBD2_HAS_COMPAT_FEATURE(journal,
+                                       if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
                                           JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){
                                                printk(KERN_ERR
                                                       "JBD: Transaction %u "