linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Use negative error code
@ 2010-09-10 18:51 Lukas Czerner
  2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
  2010-09-20 13:34 ` [PATCH 1/2] Use negative error code Ted Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Lukas Czerner @ 2010-09-10 18:51 UTC (permalink / raw)
  To: linux-ext4; +Cc: sandeen, tytso, adilger, lczerner

sb_issue_discard() is returning negative error code, so check for
-EOPNOTSUPP.

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 4b4ad4b..ec2793a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2567,7 +2567,7 @@ static inline void ext4_issue_discard(struct super_block *sb,
 	trace_ext4_discard_blocks(sb,
 			(unsigned long long) discard_block, count);
 	ret = sb_issue_discard(sb, discard_block, 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.2


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

end of thread, other threads:[~2010-09-20 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 18:51 [PATCH 1/2] Use negative error code Lukas Czerner
2010-09-10 18:51 ` [PATCH 2/2] Don't hold spinlock while calling ext4_issue_discard() Lukas Czerner
2010-09-20 13:44   ` Ted Ts'o
2010-09-20 13:34 ` [PATCH 1/2] Use negative error code Ted Ts'o

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