Patchwork [5/6] ext4: remove useless code in ext4_ext_split

login
register
mail settings
Submitter Yongqiang Yang
Date Nov. 17, 2011, 2:03 a.m.
Message ID <1321495405-9583-5-git-send-email-xiaoqiangnk@gmail.com>
Download mbox | patch
Permalink /patch/126111/
State New
Headers show

Comments

Yongqiang Yang - Nov. 17, 2011, 2:03 a.m.
New allocated blocks have been checked after allocating,
so there is no need to recheck them.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/extents.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

Patch

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 720070d..d483635 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -857,11 +857,6 @@  static int ext4_ext_split(handle_t *handle, struct inode *inode,
 
 	/* initialize new leaf */
 	newblock = ablocks[--a];
-	if (unlikely(newblock == 0)) {
-		EXT4_ERROR_INODE(inode, "newblock == 0!");
-		err = -EIO;
-		goto cleanup;
-	}
 	bh = sb_getblk(inode->i_sb, newblock);
 	if (!bh) {
 		err = -EIO;