From patchwork Thu Nov 17 02:03:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/6] ext4: remove useless BUG_ON in ext4_ext_insert_extent From: Yongqiang Yang X-Patchwork-Id: 126108 Message-Id: <1321495405-9583-2-git-send-email-xiaoqiangnk@gmail.com> To: tytso@mit.edu Cc: linux-ext4@vger.kernel.org, Yongqiang Yang Date: Thu, 17 Nov 2011 10:03:21 +0800 npath is set to NULL and is not set again before BUG_ON, so the BUG_ON is useless. Signed-off-by: Yongqiang Yang --- fs/ext4/extents.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) 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);