From patchwork Wed Dec 7 05:21:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongqiang Yang X-Patchwork-Id: 129914 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0B0531007D2 for ; Wed, 7 Dec 2011 19:23:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754115Ab1LGIXy (ORCPT ); Wed, 7 Dec 2011 03:23:54 -0500 Received: from mail-gx0-f174.google.com ([209.85.161.174]:38694 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753078Ab1LGIXx (ORCPT ); Wed, 7 Dec 2011 03:23:53 -0500 Received: by ggnr5 with SMTP id r5so355546ggn.19 for ; Wed, 07 Dec 2011 00:23:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=qBgwROHQKbyNBs3lDSnE+wRmJ0zVaflUhesnqzdYKLs=; b=UWP53N0IshWnLbNn6ywvH4+nrsCIKPtqks7zNccT/huW6YU+fzXbYQuVv7YAvcqdtN CpJkK0m34P/Rlb67ZMUkkTlVL4echydaTEU1FFXcKECQ6RWEV+dYvcCERCpYogx8TWCa pHPVxDVwr9WFUHikFWzqxWnyIGVj77+84XFmY= Received: by 10.50.189.231 with SMTP id gl7mr20454337igc.44.1323246232932; Wed, 07 Dec 2011 00:23:52 -0800 (PST) Received: from localhost.localdomain ([159.226.43.42]) by mx.google.com with ESMTPS id jm11sm4124612ibb.1.2011.12.07.00.23.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Dec 2011 00:23:52 -0800 (PST) From: Yongqiang Yang To: linux-ext4@vger.kernel.org Cc: achender@linux.vnet.ibm.com, hughd@google.com, tytso@mit.edu, Yongqiang Yang Subject: [PATCH 1/2] ext4: remove a wrong BUG_ON in ext4_ext_convert_to_initialized Date: Wed, 7 Dec 2011 13:21:26 +0800 Message-Id: <1323235287-29806-1-git-send-email-xiaoqiangnk@gmail.com> X-Mailer: git-send-email 1.7.5.1 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org If a file is fallocated on a hole, map->m_lblk + map->m_len may be greater than ee_block + ee_len. Signed-off-by: Yongqiang Yang Reviewed-by: Eric Gouriou --- 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 6f0300e..29bb629 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2943,7 +2943,6 @@ static int ext4_ext_convert_to_initialized(handle_t *handle, /* Pre-conditions */ BUG_ON(!ext4_ext_is_uninitialized(ex)); BUG_ON(!in_range(map->m_lblk, ee_block, ee_len)); - BUG_ON(map->m_lblk + map->m_len > ee_block + ee_len); /* * Attempt to transfer newly initialized blocks from the currently