Sblock fill by using to_le32/to_le_16 macros & drop gdt_reserved blocks
[lwext4.git] / lwext4 / ext4_bcache.c
index 165cd8ad8ce81e91166e2edac804b23a058f02f1..07c60e22ae3c202cc64edb740ff2be2250d09c0e 100644 (file)
@@ -115,6 +115,8 @@ int ext4_bcache_alloc(struct ext4_bcache *bc, struct ext4_block *b,
                        /*Set valid cache data and id*/
                        b->data = bc->data + i * bc->itemsize;
                        b->cache_id = i;
+
+                       /* If data in the caxhe is up-to-date */
                        b->uptodate = ext4_bcache_test_flag(bc, i, BC_UPTODATE);
 
                        return EOK;
@@ -155,6 +157,8 @@ int ext4_bcache_alloc(struct ext4_bcache *bc, struct ext4_block *b,
                /*Set valid cache data and id*/
                b->data = bc->data + cache_id * bc->itemsize;
                b->cache_id = cache_id;
+
+               /* Data in the cache is not up-to-date anymore. */
                ext4_bcache_clear_flag(bc, cache_id, BC_UPTODATE);
                b->uptodate = false;