shithub: lwext4

Download patch

ref: 1ae9cc5b1e82cbd73d01d5c8431e1679336cc776
parent: 734cf0ec11fc0ebc853ade833158918bd10f3690
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Jan 30 13:28:04 EST 2016

ext4_fs: fix read_only not being set on ext4_fs structure.

--- a/src/ext4_fs.c
+++ b/src/ext4_fs.c
@@ -66,6 +66,8 @@
 
 	fs->bdev = bdev;
 
+	fs->read_only = read_only;
+
 	r = ext4_sb_read(fs->bdev, &fs->sb);
 	if (r != EOK)
 		return r;
@@ -82,7 +84,7 @@
 		return r;
 
 	if (read_only)
-		fs->read_only = true;
+		fs->read_only = read_only;
 
 	/* Compute limits for indirect block levels */
 	uint32_t blocks_id = bsize / sizeof(uint32_t);