Patchwork [2/6] ext4: remove useless BUG_ON in ext4_ext_insert_extent

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

Comments

Yongqiang Yang - Nov. 17, 2011, 2:03 a.m.
npath is set to NULL and is not set again before BUG_ON, so
the BUG_ON is useless.

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

Patch

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 6b4a558..8591bc8 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1718,7 +1718,6 @@  int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
 		next = ext4_ext_next_leaf_block(path);
 	if (next != EXT_MAX_BLOCKS) {
 		ext_debug("next leaf block - %u\n", next);
-		BUG_ON(npath != NULL);
 		npath = ext4_ext_find_extent(inode, next, NULL);
 		if (IS_ERR(npath))
 			return PTR_ERR(npath);