linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: jmoyer@redhat.com, rwheeler@redhat.com, eshishki@redhat.com,
	sandeen@redhat.com, jack@suse.cz, tytso@mit.edu,
	lczerner@redhat.com
Subject: [PATCH 4/4] Ext4 check for negative err from sb_issue_discard
Date: Wed,  4 Aug 2010 17:30:13 +0200	[thread overview]
Message-ID: <1280935813-4478-4-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1280935813-4478-1-git-send-email-lczerner@redhat.com>

sb_issue_discard is returning negative error code, so check for
negative value instead of positive.

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

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a16a813..a8fe7f1 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2589,7 +2589,7 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
 					(unsigned long long)discard_block,
 					entry->count);
 			ret = sb_issue_discard(sb, discard_block, entry->count);
-			if (ret == EOPNOTSUPP) {
+			if (ret == -EOPNOTSUPP) {
 				ext4_warning(sb,
 					"discard not supported, disabling");
 				clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
-- 
1.7.2


  parent reply	other threads:[~2010-08-04 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04 15:30 [PATCH 1/4] Add ioctl FITRIM Lukas Czerner
2010-08-04 15:30 ` [PATCH 2/4] Add batched discard support for ext3 Lukas Czerner
2010-08-04 15:30 ` [PATCH 3/4] Add batched discard support for ext4 Lukas Czerner
2010-08-04 15:59   ` Jan Kara
2010-08-04 15:30 ` Lukas Czerner [this message]
2010-08-16 16:57   ` [PATCH 4/4] Ext4 check for negative err from sb_issue_discard Eric Sandeen

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=1280935813-4478-4-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=eshishki@redhat.com \
    --cc=jack@suse.cz \
    --cc=jmoyer@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=rwheeler@redhat.com \
    --cc=sandeen@redhat.com \
    --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 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).