linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: remove redundant test on unsigned
@ 2009-06-22 22:53 Roel Kluin
  2009-08-11  2:48 ` Theodore Tso
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-06-22 22:53 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, Andrew Morton

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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: remove redundant test on unsigned
  2009-06-22 22:53 [PATCH] ext4: remove redundant test on unsigned Roel Kluin
@ 2009-08-11  2:48 ` Theodore Tso
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-08-11  2:48 UTC (permalink / raw)
  To: Roel Kluin; +Cc: linux-ext4, Andrew Morton

On Tue, Jun 23, 2009 at 12:53:07AM +0200, Roel Kluin wrote:
> unsigned i_block cannot be less than 0.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Applied, my apologies for the delay.

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-11 13:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 22:53 [PATCH] ext4: remove redundant test on unsigned Roel Kluin
2009-08-11  2:48 ` Theodore Tso

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).