Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 1/2] ext4: no need to cond_resched() in ext4_trim_all_free()
Date: Thu, 27 Apr 2017 10:36:40 +0200	[thread overview]
Message-ID: <1493282200-32257-1-git-send-email-lczerner@redhat.com> (raw)

There is no need to call cond_resched() in ext4_trim_all_free() since
blkdev_issue_discard() already takes care of that. So just remove it.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 fs/ext4/mballoc.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 354dc1a..4879766 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -5163,12 +5163,6 @@ ext4_trim_all_free(struct super_block *sb, ext4_group_t group,
 			break;
 		}
 
-		if (need_resched()) {
-			ext4_unlock_group(sb, group);
-			cond_resched();
-			ext4_lock_group(sb, group);
-		}

             reply	other threads:[~2017-04-27  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27  8:36 Lukas Czerner [this message]
2017-04-30  4:26 ` [PATCH 1/2] ext4: no need to cond_resched() in ext4_trim_all_free() Theodore Ts'o
2017-05-04 11:19   ` Lukas Czerner

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=1493282200-32257-1-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox