ref: a4db81436916151e5a820b5848e420b5ac6f1295
parent: 23644a4048b147390df8bef84b1e9cf4dbea2b8e
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sun Nov 8 02:24:42 EST 2015
Use ext4_block_get_noread when read operation is not required
--- a/lwext4/ext4_extent_full.c
+++ b/lwext4/ext4_extent_full.c
@@ -627,7 +627,7 @@
goto cleanup;
/* For write access.# */
- ret = ext4_block_get(inode_ref->fs->bdev, &bh, newblock);
+ ret = ext4_block_get_noread(inode_ref->fs->bdev, &bh, newblock);
if (ret != EOK)
goto cleanup;
@@ -1129,7 +1129,7 @@
return err;
/* # */
- err = ext4_block_get(inode_ref->fs->bdev, &bh, newblock);
+ err = ext4_block_get_noread(inode_ref->fs->bdev, &bh, newblock);
if (err != EOK) {
ext4_ext_free_blocks(inode_ref, newblock, 1, 0);
return err;
@@ -1723,7 +1723,7 @@
uint32_t block_size = ext4_sb_get_block_size(&inode_ref->fs->sb);
for (i = 0; i < blocks_count; i++) {
struct ext4_block bh = EXT4_BLOCK_ZERO();
- err = ext4_block_get(inode_ref->fs->bdev, &bh, block + i);
+ err = ext4_block_get_noread(inode_ref->fs->bdev, &bh, block + i);
if (err != EOK)
break;