ext4_bcache: remove buffer from dirty list when it is invalidated.
authorngkaho1234 <ngkaho1234@gmail.com>
Mon, 28 Dec 2015 13:13:42 +0000 (13:13 +0000)
committerngkaho1234 <ngkaho1234@gmail.com>
Mon, 28 Dec 2015 13:18:54 +0000 (13:18 +0000)
lwext4/ext4_bcache.c

index a03f9495c04c7fd7bc2b160701e803b1a4fddc09..a8b1855ccda08ac88d4501559a6907d02909e3ca 100644 (file)
@@ -187,6 +187,9 @@ void ext4_bcache_invalidate_lba(struct ext4_bcache *bc,
                        break;
 
                /* Clear both dirty and up-to-date flags. */
+               if (ext4_bcache_test_flag(buf, BC_DIRTY))
+                       ext4_bcache_remove_dirty_node(bc, buf);
+
                ext4_bcache_clear_dirty(buf);
        }
 }