shithub: lwext4

Download patch

ref: fe2cde8c8128fff855522a84a8f2864e6ed69686
parent: 3cf60458bf3372fac2b27087bdecef25fc8e6c18
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Thu Jan 21 02:59:35 EST 2016

ext4_journal: two changes below.

  - reset end_write(_arg) to NULL when buffer is invalidated.
  - set lb_id to @lba when a direct call to ext4_bcache_find_get succeeds.

--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -191,6 +191,8 @@
 		if (ext4_bcache_test_flag(buf, BC_DIRTY))
 			ext4_bcache_remove_dirty_node(bc, buf);
 
+		buf->end_write = NULL;
+		buf->end_write_arg = NULL;
 		ext4_bcache_clear_dirty(buf);
 	}
 }
@@ -214,6 +216,7 @@
 
 		ext4_bcache_inc_ref(buf);
 
+		b->lb_id = lba;
 		b->buf = buf;
 		b->data = buf->data;
 	}