linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: achender@linux.vnet.ibm.com, hughd@google.com, tytso@mit.edu,
	Yongqiang Yang <xiaoqiangnk@gmail.com>
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	[thread overview]
Message-ID: <1323235287-29806-1-git-send-email-xiaoqiangnk@gmail.com> (raw)

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 <xiaoqiangnk@gmail.com>
---
 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
-- 
1.7.5.1


             reply	other threads:[~2011-12-07  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  5:21 Yongqiang Yang [this message]
2011-12-07  5:21 ` [PATCH 2/2] ext4: let ext4_bio_write_page handle EOF correctly Yongqiang Yang
2011-12-14  3:33   ` Ted Ts'o
2011-12-09 22:41 ` [PATCH 1/2] ext4: remove a wrong BUG_ON in ext4_ext_convert_to_initialized Eric Gouriou
     [not found]   ` <CAGBYx2boc0OtAOq7BNurQkCZG0Oeyf2LLd+F-9EvwL31CNccmw@mail.gmail.com>
2011-12-13  0:01     ` Eric Gouriou
2011-12-14  3:33 ` Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323235287-29806-1-git-send-email-xiaoqiangnk@gmail.com \
    --to=xiaoqiangnk@gmail.com \
    --cc=achender@linux.vnet.ibm.com \
    --cc=hughd@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).