From: Roel Kluin <roel.kluin@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] ext4: remove redundant test on unsigned
Date: Tue, 23 Jun 2009 00:53:07 +0200 [thread overview]
Message-ID: <4A400B53.2080903@gmail.com> (raw)
unsigned i_block cannot be less than 0.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Maybe a test `if (i_block > MAX)' but what should MAX be?
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 7c17ae2..3cd567d 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -343,9 +343,7 @@ static int ext4_block_to_path(struct inode *inode,
int n = 0;
int final = 0;
- if (i_block < 0) {
- ext4_warning(inode->i_sb, "ext4_block_to_path", "block < 0");
- } else if (i_block < direct_blocks) {
+ if (i_block < direct_blocks) {
offsets[n++] = i_block;
final = direct_blocks;
} else if ((i_block -= direct_blocks) < indirect_blocks) {
next reply other threads:[~2009-06-22 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 22:53 Roel Kluin [this message]
2009-08-11 2:48 ` [PATCH] ext4: remove redundant test on unsigned Theodore Tso
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=4A400B53.2080903@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--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 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.