All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Shilong <wangshilong1991@gmail.com>
To: jack@suse.cz
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 1/2] Ext2: remove a useless check for the function ext2_free_blocks
Date: Sat, 26 Jan 2013 14:58:18 -0800	[thread overview]
Message-ID: <51045F8A.7030106@gmail.com> (raw)

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

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

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

diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 2616d0e..081929c 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -498,7 +498,6 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
 	unsigned freed = 0, group_freed;
 
 	if (block < le32_to_cpu(es->s_first_data_block) ||
-	    block + count < block ||
 	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext2_error (sb, "ext2_free_blocks",
 			    "Freeing blocks not in datazone - "
-- 1.7.11.7


             reply	other threads:[~2013-01-26  6:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 22:58 Wang Shilong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-26 22:55 [PATCH 1/2] Ext2: remove a useless check for the function ext2_free_blocks Wang Shilong
2011-01-26 22:47 Wang Shilong

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=51045F8A.7030106@gmail.com \
    --to=wangshilong1991@gmail.com \
    --cc=jack@suse.cz \
    --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.