]> Git Repo - J-u-boot.git/blobdiff - fs/ext4/ext4_journal.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[J-u-boot.git] / fs / ext4 / ext4_journal.c
index 3559daf11d2b2d87f3e28cfe5906951276f2773a..e80f797c8dc97a5600b4d3a040730bd664d8860a 100644 (file)
@@ -14,7 +14,9 @@
  */
 
 #include <common.h>
+#include <blk.h>
 #include <ext4fs.h>
+#include <log.h>
 #include <malloc.h>
 #include <ext_common.h>
 #include "ext4_common.h"
@@ -107,22 +109,18 @@ void ext4fs_free_journal(void)
        for (i = 0; i < MAX_JOURNAL_ENTRIES; i++) {
                if (dirty_block_ptr[i]->blknr == -1)
                        break;
-               if (dirty_block_ptr[i]->buf)
-                       free(dirty_block_ptr[i]->buf);
+               free(dirty_block_ptr[i]->buf);
        }
 
        for (i = 0; i < MAX_JOURNAL_ENTRIES; i++) {
                if (journal_ptr[i]->blknr == -1)
                        break;
-               if (journal_ptr[i]->buf)
-                       free(journal_ptr[i]->buf);
+               free(journal_ptr[i]->buf);
        }
 
        for (i = 0; i < MAX_JOURNAL_ENTRIES; i++) {
-               if (journal_ptr[i])
-                       free(journal_ptr[i]);
-               if (dirty_block_ptr[i])
-                       free(dirty_block_ptr[i]);
+               free(journal_ptr[i]);
+               free(dirty_block_ptr[i]);
        }
        gindex = 0;
        gd_index = 0;
@@ -272,8 +270,7 @@ void ext4fs_free_revoke_blks(void)
        struct revoke_blk_list *next_node = NULL;
 
        while (tmp_node != NULL) {
-               if (tmp_node->content)
-                       free(tmp_node->content);
+               free(tmp_node->content);
                tmp_node = tmp_node->next;
        }
 
@@ -409,6 +406,9 @@ int ext4fs_check_journal_state(int recovery_flag)
        char *temp_buff1 = NULL;
        struct ext_filesystem *fs = get_fs();
 
+       if (le32_to_cpu(fs->sb->feature_ro_compat) & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)
+               return 0;
+
        temp_buff = zalloc(fs->blksz);
        if (!temp_buff)
                return -ENOMEM;
@@ -430,7 +430,7 @@ int ext4fs_check_journal_state(int recovery_flag)
                        printf("Recovery required\n");
        } else {
                if (recovery_flag == RECOVER)
-                       printf("File System is consistent\n");
+                       log_debug("File System is consistent\n");
                goto end;
        }
 
This page took 0.027002 seconds and 4 git commands to generate.