linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb
@ 2013-01-26 22:58 Wang Shilong
  2013-01-28 14:07 ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Wang Shilong @ 2013-01-26 22:58 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

Because 'block + count < block' always comes to false, it is useless
to have this check, just remove it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext3/balloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 22548f5..c557f22 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -507,7 +507,6 @@ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb,
 	sbi = EXT3_SB(sb);
 	es = sbi->s_es;
 	if (block < le32_to_cpu(es->s_first_data_block) ||
-	    block + count < block ||
 	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext3_error (sb, "ext3_free_blocks",
 			    "Freeing blocks not in datazone - "
-- 1.7.11.7


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb
@ 2012-01-26 22:55 Wang Shilong
  0 siblings, 0 replies; 8+ messages in thread
From: Wang Shilong @ 2012-01-26 22:55 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

Because 'block + count < block' always comes to false, it is useless
to have this check, just remove it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext3/balloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 22548f5..c557f22 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -507,7 +507,6 @@ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb,
 	sbi = EXT3_SB(sb);
 	es = sbi->s_es;
 	if (block < le32_to_cpu(es->s_first_data_block) ||
-	    block + count < block ||
 	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext3_error (sb, "ext3_free_blocks",
 			    "Freeing blocks not in datazone - "
-- 1.7.11.7


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb
@ 2011-01-26 22:48 Wang Shilong
  2013-01-27  7:40 ` Andreas Dilger
  0 siblings, 1 reply; 8+ messages in thread
From: Wang Shilong @ 2011-01-26 22:48 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

Because 'block + count < block' always comes to false, it is useless
to have this check, just remove it.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext3/balloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 22548f5..c557f22 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -507,7 +507,6 @@ void ext3_free_blocks_sb(handle_t *handle, struct super_block *sb,
 	sbi = EXT3_SB(sb);
 	es = sbi->s_es;
 	if (block < le32_to_cpu(es->s_first_data_block) ||
-	    block + count < block ||
 	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext3_error (sb, "ext3_free_blocks",
 			    "Freeing blocks not in datazone - "
-- 1.7.11.7


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

end of thread, other threads:[~2013-01-29 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-26 22:58 [PATCH 2/2] Ext3: remove a useless check for the function ext3_free_blocks_sb Wang Shilong
2013-01-28 14:07 ` Jan Kara
2013-01-29  6:01   ` Wang Shilong
2013-01-29 14:40     ` Jan Kara
2013-01-29 17:08       ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2012-01-26 22:55 Wang Shilong
2011-01-26 22:48 Wang Shilong
2013-01-27  7:40 ` Andreas Dilger

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