From: "Jon ERNST" <jonernst@gmx.com>
To: linux-ext4@vger.kernel.org
Subject: [ext4] extent tree es_len can be zero?
Date: Tue, 30 Apr 2013 00:59:19 -0400 [thread overview]
Message-ID: <20130430045920.296280@gmx.com> (raw)
Hi ,list,
extent tree es_len can be zero?
if we call ext4_es_end when es_len is zero, it will have problem.
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 95796a1..49a8da2 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -108,7 +108,7 @@
* tree are ordered by logical block no.
*
* -- operations on a extent status tree
- * There are three important operations on a delayed extent tree: find
+ * There are three important operations on a delayed extent tree: finding
* next extent, adding a extent(a range of blocks) and removing a extent.
*
* -- race on a extent status tree
@@ -195,7 +195,7 @@ static void ext4_es_print_tree(struct inode *inode)
static inline ext4_lblk_t ext4_es_end(struct extent_status *es)
{
- BUG_ON(es->es_lblk + es->es_len < es->es_lblk);
+ BUG_ON(es->es_lblk + es->es_len <= es->es_lblk);
return es->es_lblk + es->es_len - 1;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2013-04-30 4:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 4:59 Jon ERNST [this message]
2013-05-02 2:55 ` [ext4] extent tree es_len can be zero? Zheng Liu
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=20130430045920.296280@gmx.com \
--to=jonernst@gmx.com \
--cc=linux-ext4@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.