shithub: lwext4

Download patch

ref: 966cb0dd4ef6fdc79610b147871d39422408e2ee
parent: 9503c359b58ef633f2de0f3a169c94e15edecccf
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sun Feb 14 09:53:58 EST 2016

ext4_extent: cosmetic fixes on error code handling. Part 2.

--- a/src/ext4_extent.c
+++ b/src/ext4_extent.c
@@ -660,7 +660,7 @@
 	err = ext4_ext_dirty(inode_ref, curp);
 
 out:
-	if (!err && set_to_ix) {
+	if (err == EOK && set_to_ix) {
 		curp->index = ix;
 		curp->p_block = ext4_idx_pblock(ix);
 	}
@@ -988,7 +988,7 @@
 	err = ext4_ext_dirty(inode_ref, curp);
 
 out:
-	if (!err) {
+	if (err == EOK) {
 		curp->extent = ex;
 		curp->p_block = ext4_ext_pblock(ex);
 	}
@@ -1540,7 +1540,7 @@
 		err = ext4_ext_split_extent_at(inode_ref, ppath, split + blocks,
 					       EXT4_EXT_MARK_UNWRIT1 |
 						   EXT4_EXT_MARK_UNWRIT2);
-		if (!err) {
+		if (err == EOK) {
 			err = ext4_ext_split_extent_at(inode_ref, ppath, split,
 						       EXT4_EXT_MARK_UNWRIT1);
 		}